Commit Graph

356 Commits

Author SHA1 Message Date
06feeed187 DEV: Update @ember/optional-features (#17193) 2022-06-22 00:12:33 +02:00
216663effa DEV: Update ember-cli-dependency-checker (#17192) 2022-06-22 00:12:24 +02:00
b50056a9f3 DEV: Update ember-cli-inject-live-reload (#17191) 2022-06-22 00:12:15 +02:00
0421a14319 DEV: Actually debounce functions in tests (#16213) 2022-06-21 23:34:04 +02:00
9cb9d1105e DEV: Update ember-auto-import (#17176) 2022-06-21 22:06:41 +02:00
7fd38f4933 DEV: Remove isLegacyEmber (#17181) 2022-06-21 15:01:03 -05:00
41028a84ef DEV: add deprecation notice to isLegacyEmber (#17186) 2022-06-21 14:08:12 -05:00
011a16cb8a DEV: Rename translatedtitle to translatedTitle (#17160) 2022-06-20 12:28:05 -06:00
1ada3a9404 DEV: Remove use of run-loop-and-computed-dot-access (#17113)
Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
2022-06-17 09:43:13 -05:00
fcb4e5a1a1 DEV: Make wizard an ember addon (#17027)
Co-authored-by: David Taylor <david@taylorhq.com>
2022-06-17 14:50:21 +02:00
c054a47d9a DEV: Add escapeRegExp util (#17051)
This was re-implemented in a number of places - it makes more sense as a utility function.
2022-06-10 10:37:54 +10:00
9cd165d6b4 DEV: Add deprecation notice to discourse-common/utils/decorators (#17052) 2022-06-09 13:07:58 -05:00
839ae52c20 DEV: Remove 'decamelize' string prototype extensions (#16747) 2022-05-13 11:32:19 -05:00
aa95a3d654 DEV: Remove 'dasherize' string prototype extensions (#16740)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
2022-05-13 10:56:23 -05:00
d58a1e180d DEV: Update ember-try to 2.0.0 (#16606) 2022-05-03 11:04:16 -04:00
86a783b3ad DEV: Replace deprecated String.prototype.substr() (#16233)
String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-04-01 17:35:17 +02:00
ac612987ef FIX: Build correct post and topic shareUrl (#16332)
The links returned by post.url and topic.url are relative, but contain
the subdirectory. When getAbsoluteURL is called to construct the
complete share URL, it adds the host and the subdirectory again. As a
result the created URLs contained the subdirectory twice.
2022-04-01 00:02:01 +03:00
147ffadcf3 DEV: Update Uppy to 2.1.6 (#16227) 2022-03-23 09:28:55 -04:00
99b2cfe26e DEV: Disallow Ember global usage (#16147)
…and sprinkle `// eslint-disable-next-line no-undef` throughout the code where is unavoidable for now
2022-03-09 17:54:07 +01:00
94ea1afc43 DEV: Allow @discourseComputed in native classes (#16097)
(also fixes `writeable` -> `writable` typo)
2022-03-04 17:04:40 +01:00
b05fddaa7c DEV: Clean up the decorators file (#16058) 2022-02-26 02:33:25 +01:00
44824bfa3d DEV: Don't check this.element in @afterRender (#16033)
This would allow to use the decorator in tag-less components and in controllers.
2022-02-23 11:35:20 +01:00
2d30dd439f DEV: Add chat_quoted notification type (#15968)
This is needed for the notification sent when quoting
chat messages inside a post.
2022-02-16 15:22:08 +10:00
a01b1dd648 PERF: Update ember-auto-import and webpack (#15919)
This makes a small improvement to 'cold cache' ember-cli build times, and a large improvement to 'warm cache' build times

The ember-auto-import update means that vendor is now split into multiple files for efficiency. These are named `chunk.*`, and should be included immediately after the `vendor.js` file. This commit also updates the rails app to render script tags for these chunks.

This change was previously merged, and caused memory-related errors on RAM-constrained machines. This was because Webpack 5 switches from multiple worker processes to a single multi-threaded process. This meant that it was hitting node's default heap size limit (~500mb on a 1GB RAM server). Discourse's standard install procedure recommends adding 2GB swap to 1GB-RAM machines, so we can afford to override's Node's default via the `--max-old-space-size` flag.
2022-02-14 11:21:39 +00:00
c4e34047a1 DEV: Prefix deprecation notices and api warnings with theme name/id 2022-02-14 10:11:19 +00:00
76aadc67bb Revert "DEV: Prefix deprecation notices and api warnings with theme name/id" (#15902)
This reverts commit a4ff69bd99e5ca00ee8c26cf0e9bbabc3c36e23b.

Follow-up to 8e5b945b0ffd8ab5f5156ae52e460cef0136a551
2022-02-11 11:37:12 +08:00
a4ff69bd99 DEV: Prefix deprecation notices and api warnings with theme name/id 2022-02-10 22:56:11 +00:00
4cceb55621 Revert "PERF: Update ember-auto-import (#15814)" (#15854)
This reverts commit f4c6a6185517a7d8a17c3faefb7e2e8cc67c44a8 and a8325c9016230f5171e0b72d7bff069784f64d16

This update of ember-auto-import and webpack causes significantly higher memory use during rebuilds. This made ember-cli totally unusable on 1GB RAM / 2GB swap environments. We don't have a specific need for this upgrade right now, so reverting for now.
2022-02-07 22:41:07 +00:00
f4c6a61855 PERF: Update ember-auto-import (#15814)
This makes a small improvement to 'cold cache' ember-cli build times, and a large improvement to 'warm cache' build times

The ember-auto-import update means that vendor is now split into multiple files for efficiency. These are named `chunk.*`, and should be included immediately after the `vendor.js` file. This commit also updates the rails app to render script tags for these chunks
2022-02-04 11:00:51 +00:00
c985f82174 Revert "PERF: Update ember-auto-import (#15695)" (#15805)
This reverts commit 76022132f77e669ce1d00c1a1dbe811c951464d5. This update introduced 'chunking' of vendored dependencies, which we don't support in the rails app.
2022-02-03 16:54:48 +00:00
76022132f7 PERF: Update ember-auto-import (#15695)
This makes a small improvement to 'cold cache' ember-cli build times, and a large improvement to 'warm cache' build times
2022-02-03 10:01:59 +00:00
e3c5a40432 DEV: Clean up skipped tests (#15747)
Many of the tests work now that other, general fixes have been made.
I've deleted some that seem to have lost functionality.
2022-01-31 15:31:13 -05:00
6272edd121 DEV: Support for running theme test with Ember CLI (third attempt)
The second attempt fixed issues with smoke test.

This one makes sure minification only happens in production mode.
2022-01-13 16:02:07 -05:00
107239a442 Revert "DEV: Support for running theme test with Ember CLI (second attempt)" (#15559)
This reverts commit 2c7906999a6f651ec25f15dd7a6dd11c5e892d68.

The changes break some things in local development (putting JS files
into minified files, not allowing debugger, and others)
2022-01-13 10:05:35 +10:00
2c7906999a DEV: Support for running theme test with Ember CLI (second attempt)
This PR includes support for running theme tests in legacy ember
production envrionments.
2022-01-12 15:43:29 -05:00
dd3ed27930 DEV: Allow utility class domFromString to take in strings with multiple top level elements (#15548)
Previously only `<div>one top element</div>` was allowed because we use `firstChild` instead of `children`.
We also want `<div>one</div><div>two</div>` to work with this method.
2022-01-12 19:49:24 +08:00
252bb87ab3 Revert "DEV: Support for running theme test with Ember CLI" (#15547)
This reverts commit ea84a82f77f22c793baa0fca6d951ba029169adc.

This is causing problems with `/theme-qunit` on legacy, non-ember-cli production sites. Reverting while we work on a fix
2022-01-11 23:38:59 +00:00
ea84a82f77 DEV: Support for running theme test with Ember CLI
This is quite complex as it means that in production we have to build
Ember CLI test files and allow them to be used by our Rails application.

There is a fair bit of glue we can remove in the future once we move to
Ember CLI completely.
2022-01-11 15:42:13 -05:00
e6ab8f5b71 DEV: Re-use main app registry for raw HBS view lookups (#15456)
da6edc1 introduced the `lookupView` method, which initialized a fresh resolver, and used it to directly look up raw-views (with no caching). This worked well, but was not a clean solution. It required initializing an entirely new resolver, and did not have any caching.

This commit updates the `helperContext` to include access to the registry, and uses it to perform raw-view lookups. As well as re-using the registry, this also means we're making use of the resolver's built-in cache.

I haven't been able to measure any noticeable performance impact from this change, but there is certainly less work being done, so it may be beneficial on older devices.

Co-authored-by: Ayke Halder <rr-it@users.noreply.github.com>
2022-01-05 22:22:13 +00:00
bec76f937c DEV: drops jquery from scrolling-post-stream (#15313)
Note that this commit also introduces a `domUtils` helper to handle most complex operations in vanilla JS compared to using jQuery.
2021-12-17 14:52:42 +01:00
cb976ac562 DEV: creates domFromString utility function (#15310) 2021-12-17 09:25:34 +01:00
18a209bd0d DEV: Use Uppy in wizard-field-image uploads (#15269)
We cannot use any of the uppy mixins or core code, because
the code there is not shared with the wizard, and to move
it all to discourse-common would be a task almost equal
difficulty to taking the ring to Mordor.

Therefore, we can just use the uppy vendor libraries in the
wizard, and do a quick-n-dirty version of the uppy upload
code for the wizard-field-image uploader.
2021-12-13 15:23:44 +10:00
7ce6971539 DEV: Add drop-date to drop-dateless deprecations (#15133) 2021-11-30 17:41:04 +01:00
a5fbb90df4 FEATURE: Display pending posts on user’s page
Currently when a user creates posts that are moderated (for whatever
reason), a popup is displayed saying the post needs approval and the
total number of the user’s pending posts. But then this piece of
information is kind of lost and there is nowhere for the user to know
what are their pending posts or how many there are.

This patch solves this issue by adding a new “Pending” section to the
user’s activity page when there are some pending posts to display. When
there are none, then the “Pending” section isn’t displayed at all.
2021-11-29 10:26:33 +01:00
fac6cc0778 DEV: Make @afterRender do just that, no extra next() (#15086) 2021-11-26 20:16:08 +01:00
4c46c7e334 DEV: Remove xlink hrefs (#15059) 2021-11-25 15:22:43 +11:00
de3680eb5c DEV: Re-allow node 17, with a warning (#15083) 2021-11-24 21:16:33 +01:00
c75224e3d9 DEV: Update supported node versions (#15073)
13 and 15 are no longer supported by node, and issues with discourse dependencies prevent us from using 17. (for now)
2021-11-24 18:18:35 +01:00
135fdd59ed PERF: Improve JS app boot speed by optimizing customResolve() (#14990)
Time spent in the 'find module with suffix' portion of our `customResolve` function were adding up to around 100ms-150ms when booting the app. This time is spread over 150+ calls, so it's not immediately obvious in flamegraphs.

This commit implements a (reversed) [Trie](https://en.wikipedia.org/wiki/Trie) which enables fast suffix-based lookups on a list of strings.

In my tests, this requires < 5ms to initialize, and brings the cumulative 'find module with suffix' time down to `< 5ms`. This corresponds to a ~100ms improvement in LCP metrics in my browser.

The only behavior change is to remove support for module filenames which are **not** dasherized. I haven't found any core/theme/plugin modules which are not dasherized in their filenames.
2021-11-18 16:38:00 +00:00
f414d5eace DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00