David Taylor
53069fcb8e
DEV: Silence header upgrade deprecations for now ( #25947 )
...
We'll unsilence once we've published a clear upgrade path.
2024-02-29 00:36:23 +00:00
dependabot[bot]
9acb4f55f2
Build(deps): Bump the babel group with 2 updates ( #25939 )
...
* Build(deps): Bump the babel group with 2 updates
Bumps the babel group with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core ) and [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone ).
Updates `@babel/core` from 7.23.9 to 7.24.0
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.24.0/packages/babel-core )
Updates `@babel/standalone` from 7.23.10 to 7.24.0
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.24.0/packages/babel-standalone )
---
updated-dependencies:
- dependency-name: "@babel/core"
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: babel
- dependency-name: "@babel/standalone"
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: babel
...
Signed-off-by: dependabot[bot] <support@github.com>
* Clean up accidentally duplicated deps
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-02-29 00:27:17 +01:00
dependabot[bot]
62e5c96487
Build(deps-dev): Bump the embroider group with 3 updates ( #25940 )
...
Bumps the embroider group with 3 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat ), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core ) and [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros ).
Updates `@embroider/compat` from 3.4.4 to 3.4.5
- [Release notes](https://github.com/embroider-build/embroider/releases )
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md )
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat )
Updates `@embroider/core` from 3.4.4 to 3.4.5
- [Release notes](https://github.com/embroider-build/embroider/releases )
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md )
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core )
Updates `@embroider/macros` from 1.13.5 to 1.14.0
- [Release notes](https://github.com/embroider-build/embroider/releases )
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md )
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/macros )
---
updated-dependencies:
- dependency-name: "@embroider/compat"
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: embroider
- dependency-name: "@embroider/core"
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: embroider
- dependency-name: "@embroider/macros"
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: embroider
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-28 23:40:46 +01:00
Keegan George
faec73e1e0
DEV: Override jsuites CSS in core ( #25944 )
2024-02-28 14:35:08 -08:00
Kris
b532c780c6
A11Y: markup sidebar form errors as live regions ( #25937 )
2024-02-28 15:31:57 -05:00
Isaac Janzen
0e5307d8e2
DEV: Add glimmer header deprecation notice ( #25891 )
...
- Remove `_customHeaderClasses`. It was not supposed to have been a part of the glimmer header PR
- Add deprecation notice to `addHeaderPanel`
# Example
<img width="437" alt="Screenshot 2024-02-26 at 2 50 39 PM" src="https://github.com/discourse/discourse/assets/50783505/23fce1ee-fff9-4071-8c34-a480cec7e2e7 ">
2024-02-28 11:59:44 -07:00
Jarek Radosz
36a9b5d0fa
DEV: Introduce a helper for handling events ( #25433 )
...
Instead of
```hbs
{{on "input" (action this.foo value="target.value")}}
{{on "input" (action (mut this.bar) value="target.value")}}
```
you can use:
```hbs
{{on "input" (with-event-value this.foo)}}
{{on "input" (with-event-value (fn (mut this.bar)))}}
```
or in gjs:
```gjs
import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import withEventValue from "discourse/helpers/with-event-value";
…
{{on "input" (withEventValue (fn (mut this.bar)))}}
```
2024-02-28 14:00:53 +01:00
David Taylor
4116bd9595
DEV: Drop ember-functions-as-helper-polyfill ( #25926 )
...
No longer required on recent Ember
2024-02-28 10:06:36 +00:00
John L. Clark
9a07a9872f
FEATURE: Allow rowspan
and colspan
attributes on HTML tables ( #20973 )
...
Augment the `allowList` for HTML tables to allow the `rowspan` and
`colspan` attributes on `th` and `td` elements.
2024-02-28 16:59:36 +11:00
Krzysztof Kotlarek
9e9673fac5
DEV: save/restore the previous sidebar panel state ( #25899 )
...
In this PR, the admin panel remembers the previous state and restores it when the admin panel is deactivated.
https://github.com/discourse/discourse/pull/25781
However, it would be better to have a more generic solution. When the panel is changed, the previous state is saved in the sidebarState. When a user returns to the specific panel, a previously remembered state is restored.
2024-02-28 12:33:59 +11:00
Krzysztof Kotlarek
8b5204579c
FEATURE: filter admin sidebar ( #25853 )
...
Ability to filter admin sidebar. The filter can be cleared. In addition, it can be accessed with ctrl+/ shortcut
2024-02-28 12:15:02 +11:00
Kris
ffce2dd04f
A11Y: when adding custom sidebar link, first input of new row should get focus ( #25920 )
...
* A11Y: when adding custom sidebar links, ensure first input of new row gets focus
* switch to afterRender decorator
2024-02-28 11:39:25 +11:00
Jarek Radosz
f44bee1333
DEV: Use autocomplete="new-password"
( #25913 )
...
And normalize `<PasswordField />` arguments
(we were getting `[DOM] Input elements should have autocomplete attributes (suggested: "current-password")` in smoke test logs, this may or may not fix that 😛 )
2024-02-27 13:29:12 +01:00
Jarek Radosz
7a14831695
DEV: Remove ember-router-service-refresh-polyfill ( #25910 )
2024-02-27 11:10:19 +01:00
Jarek Radosz
299b323d9a
DEV: Update ember-cli to 5.6.0 ( #25886 )
2024-02-27 10:48:30 +01:00
David Battersby
8bfa2bcf3a
UX: flexible autocomplete width ( #25900 )
...
When tagging a user in composer, the autocomplete div has a fixed width, causing longer names and usernames to get cut off. This change allows the div to expand up until a max-width of 600px on desktop.
2024-02-27 17:17:30 +08:00
Kris
4df4584396
DEV: adds topic-below-suggested
plugin outlet ( #25896 )
2024-02-26 18:53:13 -05:00
Osama Sayegh
3f4537eeb5
FEATURE: Schema theme setting input fields ( #25811 )
...
Continue from https://github.com/discourse/discourse/pull/25673 .
This commit starts building the inputs pane of schema theme settings. At the moment only string fields are rendered, but more types will be added in future commits.
2024-02-27 01:07:32 +03:00
Blake Erickson
52d357c1d1
DEV: Add loading spinner to install theme modal ( #25888 )
...
This commit adds a loading spinner when installing a theme as sometimes
installing a theme can take quite a bit of time this way we have some
indication that things are still working as the theme is being
installed.
2024-02-26 14:14:21 -07:00
Isaac Janzen
8805a34001
DEV: Add before / after header-buttons plugin outlets ( #25887 )
2024-02-26 12:56:21 -07:00
dependabot[bot]
a85e4adc85
Build(deps-dev): Bump ember-qunit from 6.2.0 to 8.0.2 ( #25880 )
...
* Build(deps-dev): Bump ember-qunit from 6.2.0 to 8.0.2
Bumps [ember-qunit](https://github.com/emberjs/ember-qunit ) from 6.2.0 to 8.0.2.
- [Release notes](https://github.com/emberjs/ember-qunit/releases )
- [Commits](https://github.com/emberjs/ember-qunit/compare/v6.2.0...v8.0.2 )
---
updated-dependencies:
- dependency-name: ember-qunit
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* shim for plugins/themes
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2024-02-26 16:18:33 +00:00
chapoi
9ce2c20ab0
UX: make sure a-tag uses border radius var ( #25882 )
2024-02-26 16:17:04 +01:00
Mark VanLandingham
7adedfa37a
DEV: appEvents when desktop/push JS notifications are opened ( #25823 )
2024-02-26 09:00:39 -06:00
dependabot[bot]
aee6f1d0fb
Build(deps): Bump @glimmer/syntax from 0.84.3 to 0.88.1 ( #25879 )
...
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm ) from 0.84.3 to 0.88.1.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases )
- [Changelog](https://github.com/glimmerjs/glimmer-vm/blob/main/CHANGELOG.md )
- [Commits](https://github.com/glimmerjs/glimmer-vm/compare/v0.84.3...v0.88.1 )
---
updated-dependencies:
- dependency-name: "@glimmer/syntax"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 15:20:26 +01:00
dependabot[bot]
03af9a796e
Build(deps): Bump ember-resolver from 10.1.1 to 11.0.1 ( #25865 )
...
Bumps [ember-resolver](https://github.com/ember-cli/ember-resolver ) from 10.1.1 to 11.0.1.
- [Release notes](https://github.com/ember-cli/ember-resolver/releases )
- [Changelog](https://github.com/ember-cli/ember-resolver/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ember-cli/ember-resolver/compare/v10.1.1...v11.0.1 )
---
updated-dependencies:
- dependency-name: ember-resolver
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 15:15:51 +01:00
David Taylor
588a79c80c
DEV: Merge root JS packages ( #25857 )
...
Before this commit, we had a yarn package set up in the root directory and also in `app/assets/javascripts`. That meant two `yarn install` calls and two `node_modules` directories. This commit merges them both into the root location, and updates references to node_modules.
A previous attempt can be found at https://github.com/discourse/discourse/pull/21172 . This commit re-uses that script to merge the `yarn.lock` files.
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-02-26 13:45:58 +00:00
David Taylor
794ef67268
DEV: Remove package.json and yarn.lock symlinks
...
These were part of the Ember 3/5 feature-flagging system, which is no longer required.
2024-02-26 12:22:05 +00:00
David Taylor
542cb22fd4
DEV: Drop Ember 3 feature flag
2024-02-26 12:22:05 +00:00
dependabot[bot]
1d5f7f92e8
Build(deps): Bump terser from 5.27.2 to 5.28.1 in /app/assets/javascripts ( #25849 )
...
* Build(deps): Bump terser in /app/assets/javascripts
Bumps [terser](https://github.com/terser/terser ) from 5.27.2 to 5.28.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md )
- [Commits](https://github.com/terser/terser/compare/v5.27.2...v5.28.1 )
---
updated-dependencies:
- dependency-name: terser
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update lockfiles for ember version flag
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-02-26 12:36:55 +08:00
Isaac Janzen
23bce774d7
DEV: Update user dropdown aria-label ( #25845 )
2024-02-23 16:11:47 -07:00
Isaac Janzen
21f23cc032
DEV: Convert header to glimmer ( #25214 )
...
Here is a breakdown of the changes that will be implemented in this PR.
# Widgets -> Glimmer
Obviously, the intention of the todo here is to convert the header from widgets to glimmer. This PR splits the respective widgets as so:
### widgets/site-header.js
```mermaid height=200
flowchart TB
A[widgets/site-header.js]
A-->B[components/glimmer-site-header.gjs]
```
### widgets/header.js and children
```mermaid height=200
flowchart TB
A[widgets/header.js]
A-->B[components/glimmer-header.gjs]
B-->C[glimmer-header/contents.gjs]
C-->D[./auth-buttons.gjs]
C-->E[./icons.gjs]
C-->F[./user-menu-wrapper.gjs]
C-->G[./hamburger-dropdown-wrapper.gjs]
C-->H[./user-menu-wrapper.gjs]
C-->I[./sidebar-toggle.gjs]
C-->J[./topic/info.gjs]
```
There are additional components rendered within the `glimmer-header/*` components, but I will leave those out for now. From this view you can see that we split apart the logic of `widgets/header.js` into 10+ components. Breaking apart these mega files has many benefits (readability, etc).
# Services
I have introduced a [header](cdb42caa04/app/assets/javascripts/discourse/app/services/header.js
) service. This simplifies how we pass around data in the header, as well as fixes a bug we have with "swiping" menu panels.
# Modifiers
Added a [close-on-click-outside](cdb42caa04/app/assets/javascripts/discourse/app/modifiers/close-on-click-outside.js
) modifier that is built upon the [close-on-click-outside modifier](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/float-kit/addon/modifiers/close-on-click-outside.js ) that @jjaffeux built for float-kit. I think we could replace float-kit's implementation with mine and have it in a centralized location as they are extremely similar.
# Tests
Rewrote the existing header tests ([1](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/tests/integration/components/widgets/header-test.js ), [2](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/tests/integration/components/site-header-test.js )) as system tests.
# Other
- Converted `widgets/user-status-bubble.js` to a gjs component
- Converted `widgets/sidebar-toggle.js` to a gjs component
- Converted `topicFeaturedLinkNode()` to a gjs component
- Deprecated the [docking mixin](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/mixins/docking.js )
2024-02-23 11:08:15 -07:00
Penar Musaraj
d10b1aaedd
Revert "FIX: Show Uncategorized in category-chooser ( #25794 )" ( #25843 )
...
This reverts commit 1df473b530
.
2024-02-23 12:21:44 -05:00
Penar Musaraj
b205abadfc
Revert "UX: allow fullscreen composer on mobile ( #25787 )" ( #25842 )
...
This reverts commit 13eabff739
.
2024-02-23 12:21:26 -05:00
Joffrey JAFFEUX
dd292b31cc
FIX: do not raise error on transition aborted ( #25841 )
2024-02-23 16:44:50 +01:00
David Taylor
20a36f0b8f
DEV: Include deprecation link in warning banner ( #25839 )
2024-02-23 14:28:23 +00:00
Kris
1ac8922013
DEV: update classes, remove unused CSS ( #25825 )
2024-02-23 09:14:37 -05:00
chapoi
28fc4010b0
UX: remove hardcoded value ( #25499 )
2024-02-23 11:58:12 +01:00
Martin Brennan
cd6fd515fe
FIX: Prevent admin sidebar errors in safe mode ( #25832 )
...
In safe mode plugins are not loaded, so the plugin admin
routes are not loaded. This was causing errors in the
admin sidebar because we are trying to show links to the plugin
admin routes.
This fixes the issue by just not adding the plugin links if
we are in safe mode.
2024-02-23 17:04:42 +10:00
Sam
207cb2052f
FIX: muted tags breaking hot page when filtered to tags ( #25824 )
...
Also, remove experimental setting and simply use top_menu for feature detection
This means that when people eventually enable the hot top menu, there will
be topics in it
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-02-23 17:11:39 +11:00
Martin Brennan
1ad8e85b37
FIX: Do not double-highlight admin plugin links in sidebar ( #25808 )
...
I was using adminPlugins instead of adminPlugins.index for the Installed Plugins
link in admin sidebar, which was causing Ember to highlight the main link and a plugin
link at the same time.
We only want to highlight the top level Installed Plugins link if we are on that page,
not if we are on e.g. the chat plugin admin route.
2024-02-23 09:56:17 +10:00
Kris
59fccfc4a1
UX: group names shouldn't always be capitalized ( #25820 )
2024-02-22 15:56:40 -05:00
Kris
9005a14508
UX: fix topic map link expansion hover ( #25822 )
2024-02-22 15:47:38 -05:00
Keegan George
10c83a80aa
FIX: Regression with onFilesPicked
action ( #25819 )
2024-02-22 12:03:05 -08:00
Bianca Nenciu
35adf6046e
FIX: Make category-drop search subcategories ( #25817 )
...
Subcategories were not returned when lazy loaded categories are enabled.
This commit implements the old behavior which displayed only top level
categories when there was no search term, but when there was one, it
searched subcategories too.
This commit also removes the client-side ordering of categories, because
the results are already ordered on the server-side.
2024-02-22 21:35:35 +02:00
Sérgio Saquetim
57ab42d4ca
FEATURE: Add automatic before
and after
outlets to wrapper plugin outlets ( #24254 )
...
Recently, Discourse introduced the concept of wrapper plugin outlets, which enables plugins and theme-components lo replace the wrapped content:
```
<PluginOutlet @name="wrapper-outlet-example" @outletArgs={{hash model=@model}}>
<div>Overridable content</div>
</PluginOutlet>
```
This commit adds automatic outlets that are placed `before` and `after wrapper plugin outlets. Connectors them can leverage these new automatic outlets to mount content at these positions, which greatly enhances the use case of the wrapper outlets.
These new auto outlets can be used in two ways:
- Using the standard folder base structure: the folder name that identifies the outlet in which the connector must be mounted must add the suffixes `__before`or `__after` to the outlet name. For the outlet in the example above, the connector should be placed into the `.../connectors/wrapper-outlet-example__before`or `.../connectors/wrapper-outlet-example__after`folders.
- Using API calls: this commit also introduces two new plugin APIs, `api.renderBeforeWrapperOutlet` and `renderAfterWrapperOutlet`. These new APIs can be used in the same way as `api.renderInOutlet`but will only work for wrapper outlets.
For the outlet above when using these new APIs alongside the gjs file format, one could define a component to be placed before the content of the outlet like:
```
api.renderBeforeWrapperOutlet('wrapper-outlet-example', <template>Hello from before the content</template>);
```
or after:
```
api.renderAfterWrapperOutlet('wrapper-outlet-example', <template>Hello from after the content</template>);
```
2024-02-22 15:25:34 -03:00
Bianca Nenciu
1df473b530
FIX: Show Uncategorized in category-chooser ( #25794 )
...
The uncategorized category was not rendered correctly and it was also
sometimes displayed twice. This commit is a similar bug fix to commit
76647d3a34
and is a follow up to commit
63a50b12fd
.
2024-02-22 19:30:55 +02:00
Joffrey JAFFEUX
5ea1882e17
FIX: followRedirects when changing sidebar panel ( #25814 )
...
It was necessary in chat as we will for example:
- transition to `/chat`
- and then attempt to transition to ideal first channel, eg: `/chat/-/1`
- and then redirect to `/chat/browse` if no channels exist
Prior to this fix, clicking on `chat` button in the sidebar from the homepage would work but generate an error in the console:
```
Uncaught (in promise) TransitionAborted: TransitionAborted
at buildTransitionAborted (http://127.0.0.1:4200/assets/vendor.js:42895:17 )
at logAbort (http://127.0.0.1:4200/assets/vendor.js:43345:12 )
at PrivateRouter.transitionDidError (http://127.0.0.1:4200/assets/vendor.js:24561:44 )
at http://127.0.0.1:4200/assets/vendor.js:43129:35
at invokeCallback (http://127.0.0.1:4200/assets/vendor.js:45239:17 )
at publish (http://127.0.0.1:4200/assets/vendor.js:45225:9 )
at publishRejection (http://127.0.0.1:4200/assets/vendor.js:45174:5 )
at http://127.0.0.1:4200/assets/vendor.js:40914:52
at invoke (http://127.0.0.1:4200/assets/vendor.js:39539:16 )
at Queue.flush (http://127.0.0.1:4200/assets/vendor.js:39455:13 )
at DeferredActionQueues.flush (http://127.0.0.1:4200/assets/vendor.js:39611:21 )
at Backburner._end (http://127.0.0.1:4200/assets/vendor.js:40040:34 )
at Backburner._boundAutorunEnd (http://127.0.0.1:4200/assets/vendor.js:39776:14 )
```
As explained above, this was only redproducible when no channels are present.
2024-02-22 14:19:32 +01:00
David Taylor
502eceb570
DEV: Replace add-archetype-class mixin with body-class helper ( #25813 )
2024-02-22 13:11:24 +00:00
chapoi
13eabff739
UX: allow fullscreen composer on mobile ( #25787 )
2024-02-22 13:01:27 +01:00
Alan Guo Xiang Tan
c56c3adfde
DEV: Fix invalid test in 5dba5c4208
( #25810 )
...
Why this change?
The previous test setup did not actually act as a regression test
because the test will still pass even when the fix is removed. This
commit uses a rendering test instead to ensure that Ember is tracking
the property change.
2024-02-22 19:10:23 +08:00