Commit Graph

12717 Commits

Author SHA1 Message Date
David Taylor 9e9e843136 DEV: Allow use of qunit notrycatch mode (#17433)
This is useful when debugging exceptions - when the box is checked, exceptions will be thrown and handled by the browser rather than being absorbed by qunit. This allows developers to intercept the exception and inspect the stack.
2022-07-11 21:40:38 +01:00
Jarek Radosz 006de01943 DEV: Update ember-cli-handlebars (#17429) 2022-07-11 22:25:40 +02:00
Kris 6b57d792bb UX: Fix exp sidebar toggle alignment, add hovers (#17414) 2022-07-11 12:58:48 -04:00
David Taylor dd62b88f78 DEV: Switch from htmlbars-inline-precompile to ember-cli-htmlbars (#17424)
See https://github.com/ember-cli/ember-cli-htmlbars#tagged-template-usage--migrating-from-htmlbars-inline-precompile
2022-07-11 15:25:40 +01:00
Joffrey JAFFEUX f00cf7a119 DEV: uses resize observer to compute header-offset (#17399) 2022-07-11 14:50:52 +02:00
Jarek Radosz 6487179dec DEV: Don't forward test-i18n.js requests (#17422)
This fixes i18n related tests in dev env
2022-07-11 13:14:44 +02:00
Jarek Radosz 2414a175cf DEV: Update message-bus-client (#17421)
This update covers commits:

* e309b6d [BREAKING Make JS client throw if lastId not number](https://github.com/discourse/message_bus/commit/e309b6d533dcc33cb9d3677c9b12a194f5f06990)
* f0bae69 [DEV: removes dead code](https://github.com/discourse/message_bus/commit/f0bae695b011bccc48ca001686114ff1de2f4588)
* a72b930 [FIX: force a poll more consistently when visibility changes](https://github.com/discourse/message_bus/commit/a72b9308b4b7edf273ec914f16be459e831bbd9e)
* 5c01715 [Permit CORS preflight caching](https://github.com/discourse/message_bus/commit/5c01715432c0fd34d7b2695cd3313dc670b9d61b)
* 1789784 [DEV: lint files](https://github.com/discourse/message_bus/commit/17897843b445ee21beba7787d3ef7a3e27079dde)
* b9cfb90 [FIX: do not leak visibility event subscriptions on stop/start](https://github.com/discourse/message_bus/commit/b9cfb90dd66eab522671aff5bc057e6c6559eb95)
2022-07-11 13:09:30 +02:00
Jarek Radosz 4437579a8c DEV: Update ember-qunit (#17251) 2022-07-11 12:40:48 +02:00
Jarek Radosz 189bebb2e4 DEV: Modernize component tests (#17368)
* Use QUnit `module` instead of `discourseModule`
* Use QUnit `test` instead of `componentTest`
* Use angle-bracket syntax
* Remove jQuery usage
* Improve assertions (and actually fix some of them)
2022-07-11 12:29:44 +02:00
David Taylor 0ffa93ccaf FIX: Ensure category-tag filter routes are functioning (#17420)
This regressed as part of the changes in fc36ac6c.

This commit also introduces a test which would have caught the issue.
2022-07-11 10:54:51 +01:00
Jarek Radosz 3b4ed134ba DEV: Remove old hbs-in-script warning (#17418)
7 years, I think that's long enough for people to notice? 😉
2022-07-11 11:42:40 +02:00
David Taylor e62730a4c8 FIX: Ensure splash screen <noscript> is loaded for legacy browsers (#17413)
Previously we would only expand the main `<noscript>` element for older browsers. This commit ensures that we expand all noscript elements on the page, including the one used by the splashscreen to hide itself on the no-js view.
2022-07-11 09:07:10 +01:00
Jarek Radosz a94dee31c4 DEV: Fix emoji-uploader tests (#17395) 2022-07-11 02:06:58 +02:00
Jarek Radosz 25dacc08ce DEV: Update @ember/test-helpers (#17247) 2022-07-11 01:54:25 +02:00
Jarek Radosz 0d6929d935 DEV: Avoid triggering 404 errors in tests (#17404) 2022-07-10 11:09:13 +02:00
Jarek Radosz f19f804525 DEV: Don't try to vibrate in test mode (#17405)
It ends up just triggering an error:

```
[Intervention] Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet: https://www.chromestatus.com/feature/5644273861001216.
```
2022-07-10 10:53:00 +02:00
Jarek Radosz 9365d4e86a DEV: Fix test leakage/flakes (#17407)
Fixes failures like:

```
Unhandled request in test environment: /forum/topics/timings (POST)
```
2022-07-10 10:52:42 +02:00
Jarek Radosz d5dc2496d4 DEV: Update qunit (#17411) 2022-07-10 10:52:14 +02:00
Jarek Radosz 0f01cc7df2 DEV: Reduce jQuery usage in acceptance tests (#17406) 2022-07-10 10:52:02 +02:00
Joe 06ae9229e8 UX: Skip length check on reply drafts (#17408)
We don't count quote characters as part of the reply length.

We don't save drafts if the reply length is less than the min_post_length site setting.

If you start a reply that only contains a bunch of quotes with the intent to continue later, you get no draft.

This PR fixes that.

Note that we still don't save drafts if the composer is completely empty or if you're composing a new topic. This only affects replies.

This PR only changes the behavior if the reply composer contains something regardless of whether that something is a quote or not and ignores the min_post_length site setting.
2022-07-10 13:54:40 +08:00
Daniel Waterworth e91cc340e6 FIX: Add ember redirect for tags/:tag_id -> tag/:tag_id (#17397)
/tags/:tag_id is deprecated, but links may exist in posts.
2022-07-08 14:39:43 -05:00
Joffrey JAFFEUX 9408ea4461 Revert "DEV: glimmerify discourse-root (#17390)" (#17392)
This reverts commit 27408c7e14.
2022-07-08 15:28:40 +02:00
Joffrey JAFFEUX 27408c7e14 DEV: glimmerify discourse-root (#17390)
As a result discourse-root will be tag-less
2022-07-08 13:55:34 +02:00
Jarek Radosz 20851f7240 FIX: Inputs using focusout regressed in #17345 (#17389) 2022-07-08 13:00:33 +02:00
David Taylor a084680f1d DEV: Pass static scripts through Ember CLI (#17373)
All files under `app/assets/javascripts/scripts` will be run through babel, given sourcemaps, and output under `/assets/{name}.js`. This is another step towards removing our sprockets dependence.
2022-07-08 10:13:46 +01:00
Chapoi 9dab97de70 UX: a save should always have a cancel action (#17385) 2022-07-08 10:02:16 +02:00
Alan Guo Xiang Tan b622302351 Revert "UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)" (#17386)
This reverts commit 526e6e7a3b.

Link in dropdown user menu is kept in favor of link in experimental sidebar
2022-07-08 15:44:49 +08:00
Jarek Radosz 94c70a0909 DEV: Silence one more test (#17375)
…and improve silencing added in #17362
2022-07-08 09:15:09 +08:00
Jarek Radosz 215926f295 DEV: Don't use the deprecated route (#17376) 2022-07-08 09:13:43 +08:00
David Taylor 201228162c DEV: Remove temporary GlimmerComponent hack (#17370)
fc36ac6c updated us to a more modern resolver, so this hack is no longer required
2022-07-07 15:08:46 +01:00
Andrei Prigorshnev ef923f1bb1 FEATURE: Publish everyone's status to everyone (#17343) 2022-07-07 17:37:05 +04:00
David Taylor d037796ff4 FIX: Allow connector template names to be camelCase (#17371)
The default Ember resolver implementation allows this for components. We need the same for connectors (which are essentially components behind-the-scenes)
2022-07-07 12:42:23 +01:00
David Taylor 5b0a8bfbcb DEV: Make sass deprecations quieter during test build (#17369) 2022-07-07 11:03:16 +01:00
Jarek Radosz 39c28cec87 DEV: Allow hooks.beforeEach usage w/ component tests (#17360) 2022-07-07 09:57:38 +02:00
Krzysztof Kotlarek 95c257e2ea FEATURE: plugin outlet for sidebar (#17367) 2022-07-07 15:05:20 +08:00
Jarek Radosz c32ac45b29 DEV: Reduce test noise (#17362) 2022-07-07 13:28:40 +08:00
Kris fbc89dd41a UX: improve experimental sidebar transitions (#17358) 2022-07-06 13:31:06 -04:00
David Taylor fc36ac6cde DEV: Modernize Ember Resolver (#17353)
This switches us to use the modern ember resolver package, and re-implements a number of our custom resolution rules within it. The legacy resolver remains for now, and is used as a fallback if the modern resolver is unable to resolve a package. When this happens, a warning will be printed to the console.

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 14:20:00 +01:00
Isaac Janzen 5c4c8d26c7 DEV: Update expand-table table query (#17347)
Instead of selecting the first table in the parent, we now select the first table after the selected <kbd>expand table</kbd> button
2022-07-06 08:01:46 -05:00
Jarek Radosz c3fd91670e DEV: Update linting setup and fix issues (#17345)
Re-lands #16119 and #17298

* Update eslint-config-discourse
* Update linting workflow
* Prettier-ignore stuff
* Update template-lint config
* Auto-fix template issues
* Fix various template issues
  Mostly incorrect attributes and unused templates
* Prettier js files
* Fix template auto-fix regressions
* Small css tweak

Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-07-06 10:37:54 +02:00
Jarek Radosz f7c133ac74 DEV: Update sass (#17349) 2022-07-06 10:35:55 +02:00
David Taylor 6c49ec39ea DEV: Disable RAISE_ON_DEPRECATION (#17351)
Some plugins/themes are still awaiting updates for some deprecations, and they started raising errors in development. It's not clear that the errors are development-only, so it can be quite confusing for developers.

Disabling this flag for now until we can make the messages clearer and fix up existing deprecation issues in themes/plugins.
2022-07-06 11:56:16 +08:00
Kris 59c8774957 UX: Prevent experimental sidebar scroll jumps (#17352) 2022-07-06 10:36:44 +08:00
Peter Wagenet 371bbadb92 No implicit this codemod (#17235)
* Run no-implicit-this codemod for app templates
* Run tagless-ember-components-codemod for plugins
* Turn on no-implicit-this lint
2022-07-05 19:41:31 +02:00
Andrei Prigorshnev c59f1729a6 FEATURE: auto remove user status after predefined period (#17236) 2022-07-05 19:12:22 +04:00
David Taylor 2a7fb4bf3a FIX: Correct error in ip-lookup component definition (#17339)
7caaee2 introduced a duplicate definition of the component JS. This likely happened because we had the template defined under `javascripts/discourse`, and the component JS defined under `javascript/admin`. This commit removes the duplicate definition, and moves the template to the admin addon
2022-07-05 15:13:50 +01:00
Alan Guo Xiang Tan 526e6e7a3b UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)
Sidebar has a link to bookmarks by default
2022-07-05 15:50:25 +08:00
Alan Guo Xiang Tan 843907d1ac UX: Update categories/tags in sidebar only after saving. (#17333)
Adding the category/tag into sidebar before the user has saved was
giving the impression that the user's record has already been updated.
2022-07-05 13:32:12 +08:00
Alan Guo Xiang Tan 4d51f9cad6 UX: Enforce bullet category style in sidebar (#17334)
The other category styles do not fit into how we want the sidebar to
look.
2022-07-05 13:28:51 +08:00
Kris 56c0d8cf92 UX: mobile experimental sidebar improvement (#17302)
First pass at the mobile experimental sidebar improvement.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2022-07-05 11:45:02 +08:00