Commit Graph

24202 Commits

Author SHA1 Message Date
David Taylor
88a4a7f4f0
DEV: Silence "glimmer topic list" success message in tests (#30654) 2025-01-09 09:37:37 +11:00
Sérgio Saquetim
e5d6ca0451
DEV: Fix triple click selection in WebKit derived browsers (#30628)
On WebKit-based browsers, triple clicking on the last paragraph of a post won't stop at the end of the paragraph, leaking the selection into the following nodes until it finds a non-empty node.

This commit introduces a workaround to fix this behavior.
2025-01-08 19:14:15 -03:00
Mark VanLandingham
a29b964329
DEV: Add behavior transformer for full page search loadMore (#30648) 2025-01-08 15:44:58 -06:00
Joffrey JAFFEUX
40f7941f2b
FIX: emoji-picker minor improvements (#30645)
- uses emojiSearch to ensure we have the same result than autocomplete when filtering emojis (for example search aliases were not working correctly because of this)
- reset the visible sections when clearing filter to ensure we are not attempting to display all the emojis at once which would be slow
- prevents flashing of the full emoji list before showing filtered results
- correctly reset recent favorites and only show them when used
2025-01-08 22:10:50 +01:00
Mark VanLandingham
4da7904ffd
REVERT: "DEV: Convert admin API keys to conform to UI guidelines"
This reverts commit d9ddc25808.

I noticed that Webhook admin UI is now inaccessible through the subheader
2025-01-08 11:03:40 -06:00
David Taylor
2ff511a4e4
DEV: Gracefully handle missing localstorage in dev-tools initializer (#30643)
I'm not sure if this is a real-world consideration... but our `test/smoke-test.mjs` script runs chrome with `--disable-local-storage`, so it needs to work.
2025-01-08 16:11:17 +00:00
David Taylor
498481e5be
DEV: Introduce 'dev tools' toolbar and plugin-outlet debugger (#30624)
This commit introduces a new 'dev tools' feature for core, theme and plugin developers. This is enabled by default in development environments, and can be enabled in production by running `enableDevTools()` in the browser console. 

When enabled, it will load a separate dev-tools JS/CSS bundle, and show a new toolbar on the left of the page. Dev Tools will remain enabled until the 'x' button is clicked, or `disableDevTools()` is run in the console.

The toolbar currently has three buttons:

- "Toggle safe mode" provides an easy way to toggle all themes/plugins on/off

- "Toggle verbose localization" is a toggle for our existing locale debugging feature

- "Debug plugin outlets" is inspired by the popular 'plugin outlet locations' theme component. It hooks into core's plugin outlet system, and renders a button into every single outlet. Those buttons have a tooltip which shows more information about the outlet, including all of the outletArg values. To inspect the value further, buttons allow the values to be saved to globals and logged to the console.

All of this is implemented under `/static`, and is only async-import()-d when the dev tools are enabled. Therefore, we can continue to add more tools, with zero performance cost to ordinary users of Discourse.
2025-01-08 15:26:18 +00:00
Jordan Vidrine
9779cc9d5e
UX: Conditionally render permalinks filter (#30633) 2025-01-08 06:18:01 -06:00
David Taylor
6330e6ceae
DEV: Set glimmer-topic-list to 'auto' by default (#30582)
This will cause the glimmer topic-list to be enabled for sites with compatible customizations. Incompatible customizations will print a deprecation message to the console, along with a link to more information.

Also cleans up a handful of specs/behaviour which were revealed by switching the default.

More details at https://meta.discourse.org/t/343404
2025-01-08 12:00:56 +00:00
Ella E.
3f729b23bc
UX: Align silence reason header text with content alignment (#30639) 2025-01-08 04:42:42 -07:00
David Taylor
61450b0947
DEV: Drop deprecated decorateTopicTitle API (#30626) 2025-01-08 11:01:27 +00:00
Joffrey JAFFEUX
6740a340ca
DEV: unifies emoji picker (#28277)
The chat emoji picker is renamed emoji-picker, and the old emoji-picker is removed.

This commit doesn't attempt to fully rework a new emoji-picker but instead tries to migrate everything to one picker (the chat one) and add small changes.

Other notable changes:
- all the favorite emojis code has been mixed into one service which is able to store one state per context, favorites emojis will be stored for all topics, and for each chat channel. Meaning that if you always use a specific emoji in a channel, it will only show as favorite emoji in this channel.
- a lot of static code has been removed which should improve initial load perf of discourse. Initially this code was around to improve the performance of the emoji picker rendering.
- the emojis are now stored, once the full list has been loaded, if you close and reopen the picker it won't have to load them again.

List of components:

- `<EmojiPicker />` will render a button which will open a dropdown
- `<EmojiPickerContent />` represents the content of the dropdown alone, it's useful when you want to render a picker from an action which is not the default picker button
- `<EmojiPickerDetached />` just a simple wrapper over `<EmojiPickerContent />` to make it easier to use it with `this.menu.show(...)`

---------

Co-authored-by: Renato Atilio <renatoat@gmail.com>
2025-01-08 11:41:36 +01:00
Ted Johansson
d9ddc25808
DEV: Convert admin API keys to conform to UI guidelines (#30096)
This PR updates the admin API keys page to follow the Admin UI Guidelines. In addition it modernizes all the JavaScript involved in this admin area.
2025-01-08 18:11:38 +08:00
Sam
9cf78ba195
FEATURE: show silence reason when viewing silenced users (#30635)
This adds the Silence Reason column to silenced user lists.

This feature helps combat large spam attacks cause you can quickly see
why a user was silenced and then bulk act on all the silenced users
2025-01-08 16:04:19 +11:00
Ella E.
a88c86beef
FIX: Cleaned up horizontal nav scrolling so arrows show/hide properly (#30621) 2025-01-07 18:07:44 -07:00
dependabot[bot]
a08d6e8f37
Build(deps-dev): Bump the embroider group with 2 updates (#30629)
Bumps the embroider group with 2 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat) and [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core).


Updates `@embroider/compat` from 3.7.1 to 3.8.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/compat)

Updates `@embroider/core` from 3.4.20 to 3.5.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/core)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
- dependency-name: "@embroider/core"
  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>
2025-01-08 01:14:49 +01:00
dependabot[bot]
a2739df96b
Build(deps): Bump ace-builds from 1.37.2 to 1.37.3 (#30630)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.2 to 1.37.3.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.2...v1.37.3)

---
updated-dependencies:
- dependency-name: ace-builds
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 00:14:34 +01:00
dependabot[bot]
3bf20c6b33
Build(deps-dev): Bump @swc/core from 1.10.4 to 1.10.6 (#30632)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.4 to 1.10.6.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.10.4...v1.10.6)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 00:13:52 +01:00
dependabot[bot]
eef35c89c4
Build(deps-dev): Bump @floating-ui/dom from 1.6.12 to 1.6.13 (#30631)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.12 to 1.6.13.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.13/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 00:13:28 +01:00
Sérgio Saquetim
2a459b3dfe
DEV: Enable the Glimmer post menu admin notices (#30595) 2025-01-07 14:37:50 -03:00
Sérgio Saquetim
7fd2fb6b85
DEV: Display feedback in the Glimmer post menu on iOS / iPadOS devices (#30594)
This commit introduces a workaround for a behavior observed in Safari for iOS / iPadOS where the feedback message wasn't being displayed after clicking on the copy button in the Glimmer post menu
2025-01-07 14:37:14 -03:00
Mark VanLandingham
260017de1d
FIX: Move posts modal passing topic instance rather than ID (#30622)
Fixes issue in type difference due to modernization in this commit  df9de3022f
2025-01-07 09:38:46 -06:00
Martin Brennan
c1a46995a7
FIX: Wizard improvements post-merge part 1 (#30612)
* FIX: Wizard improvements post-merge part 1

Followup 3135f472e2

Fixes the following:

* On mobile, the Styling step was very narrow
* When clicking Next on the Styling step after previously
  selecting Hot, we got an error

Also makes the following UX improvements for the preview:

* Use different topic titles for Latest and Hot
* Also make Hot view and reply numbers higher

This helps differentiate the two previews.

* DEV: Review fixes
2025-01-07 17:01:05 +10:00
Martin Brennan
8185770d63
UX: Admin setting page consistency - Files and Other (#30572) (#30614)
Followup c2282439b3

Make the Files and Other config pages reached from the sidebar
use our consistent site setting page rules.

Also slightly improves AdminAreaSettings so we don't show
"Settings not found" when still loading settings.
2025-01-07 16:39:00 +10:00
Gary Pendergast
ec3b6d57c2
UX: Admin setting page consistency - Onebox (#30611)
Create a basic config page that only contains Onebox-related settings, to replace the "onebox" category view linked to from "Onebox" in the admin sidebar.
2025-01-07 16:21:53 +11:00
Gary Pendergast
46e4290a2a
UX: Admin setting page consistency - User API (#30610)
Create a basic config page that only contains user API-related settings, to replace the "user_api" category view linked to from "User API" in the admin sidebar.
2025-01-07 16:05:54 +11:00
Gary Pendergast
18a8ca38ff
UX: Admin setting page consistency - Rate Limits (#30609)
Create a basic config page that only contains rate limiting-related settings, to replace the "rate_limits" category view linked to from "Rate limits" in the admin sidebar.
2025-01-07 15:46:40 +11:00
Gary Pendergast
ef8b62ae0a
UX: Admin setting page consistency - Developer (#30607)
Create a basic config page that only contains developer-related settings, to replace the "developer" category view linked to from "Developer" in the admin sidebar.
2025-01-07 15:17:36 +11:00
Gary Pendergast
9ffbf93aa7
UX: Admin setting page consistency - Spam (#30606)
Create a basic config page that only contains security-related settings, to replace the "security" category view linked to from "Security settings" in the admin sidebar.
2025-01-07 15:17:15 +11:00
Krzysztof Kotlarek
51a444ab53
FIX: consistent delete button for admin panel (#30592)
Move the delete button to more options to follow guide https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780#p-1605522-h-5d-table-26
2025-01-07 14:05:45 +11:00
Gary Pendergast
d9d1da82cb
UX: Admin setting page consistency - Security (#30598)
Create a basic config page that only contains security-related settings, to replace the "security" category view linked to from "Security settings" in the admin sidebar.
2025-01-07 13:48:40 +11:00
Martin Brennan
70381a1e39
UX: Admin setting page consistency - Experimental (#30572) (#30603)
Followup c2282439b3

Make the Experimental config page reached from the sidebar
use our consistent site setting page rules.
2025-01-07 12:22:10 +10:00
Martin Brennan
725e146dca
FIX: Calculate experiment_enabled on server for "What's new?" (#30599)
Experimental "What's new?" feature feed items previously calculated
a boolean for experimentEnabled on the client based on the siteSettings
service, and this would control the initial state of the experiment
toggle.

However this requires the person who creates the site setting for the
experiment to remember to set it to `client: true`. This commit removes
that manual step by calculating whether the experiment is enabled
server-side, where we have access to all the site settings.
2025-01-07 11:27:24 +10:00
Martin Brennan
30be75460f
UX: Admin setting page consistency - Group permissions (#30528) (#30578)
* UX: Admin setting page consistency - Group permissions (#30528)

Followup c2282439b3 and
21470e4afd

Adds a new "Group permissions" page and group_permissions site
setting area, which shows every single group-based site setting
in the app and core plugins.

Also adds a "trust_levels" area to show on the already moved
admin "Trust level" settings page, since that previously was
showing a mix of trust level settings and allowed group settings.

* DEV: Review fixes
2025-01-07 11:25:21 +10:00
Ella E.
fd909dd348
UX: Refactor nav stack active element (#30601)
* UX: Add a grey background and bold text to highlight the active element in the nav stack
2025-01-06 18:14:17 -07:00
dependabot[bot]
5202532acb
Build(deps): Bump ace-builds from 1.37.1 to 1.37.2 (#30590)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.1 to 1.37.2.
- [Release notes](https://github.com/ajaxorg/ace-builds/releases)
- [Changelog](https://github.com/ajaxorg/ace-builds/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ajaxorg/ace-builds/compare/v1.37.1...v1.37.2)

---
updated-dependencies:
- dependency-name: ace-builds
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 01:35:00 +01:00
Martin Brennan
bcc34420bb
UX: Remove version from "What's new?" items (#30596)
This version number is a technical detail that controls
what items show up on certain sites, most admins don't
need this level of detail. Remove it here, maybe we can
add it back in some hidden way later if needed.
2025-01-07 10:06:10 +10:00
Martin Brennan
d8692faf00
UX: More translations for admin dashboard (#30570)
Followup 8d5c4ecc33

Implement review suggestions from https://github.com/discourse/discourse/pull/30541
after merge, and also fix other hardcoded strings on this
dashboard.
2025-01-07 09:49:34 +10:00
Kris
f0ac25cf35
UX: adjust mobile to avoid progress bar jitter (#30591) 2025-01-06 17:57:24 -05:00
David Taylor
210559edc8
DEV: Support expand-pinned modifier in legacy topic-list (#30587)
This provides an easier upgrade path for themes/plugins. Matches the strategy used for other new topic-list-related modifiers.
2025-01-06 22:33:36 +00:00
Kris
116c3f7f8d
UX: improve table hover states, fix table button margin issue (#30585) 2025-01-06 13:59:48 -05:00
Kris
3dfe1a9fda
UX: add missing icon for open_topic small action (#30586) 2025-01-06 13:50:58 -05:00
Kris
1ae341fa38
UX: only show red count in IP lookup when greater than 0 (#30584) 2025-01-06 11:58:12 -05:00
David Taylor
486ff2a564
UX: Do not anchor scroll on topic navigation/map (#30580)
topic-navigation and topic-map appear in the DOM before the post stream, and are then rearranged with CSS grid. That means that, if they are entirely within the viewport, and does not have a fixed/sticky position, then they will be chosen as the browser's scroll anchor point.

We never want these elements to be used as the anchor, so we can set `overflow-anchor: none`.

https://meta.discourse.org/t/344386/16
2025-01-06 10:13:29 +00:00
Gary Pendergast
f5126199f6
UX: Admin setting page consistency - Navigation (#30574)
Create a basic config page that only contains navigation-related settings, to replace the setting filtered view linked to from "Navigation" in the admin sidebar.
2025-01-06 17:44:33 +11:00
Martin Brennan
17f4052068
UX: Admin setting page consistency - Search (#30528) (#30573)
Followup c2282439b3

Make the Search config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 16:36:48 +10:00
Martin Brennan
9a87baaab4
UX: Admin setting page consistency - Legal (#30572)
Followup c2282439b3

Make the Legal config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 16:08:42 +10:00
Martin Brennan
21470e4afd
UX: Admin setting page consistency - Trust levels (#30571)
Followup c2282439b3

Make the trust levels config page reached from the sidebar
use our consistent site setting page rules.
2025-01-06 15:53:18 +10:00
Martin Brennan
e987874204
FIX: Dashboard last checked date was always English (#30569)
The `problemsTimestamp` on the admin dashboard was always
forcing the "en" locale for some reason, we can remove the locale
entirely because we already set the locale for moment.js using
I18n on the server-side.

c.f. https://meta.discourse.org/t/last-check-date-not-localized-in-admin-dashboard/345483
2025-01-06 14:59:21 +10:00
Gary Pendergast
5463b845e3
UX: Admin setting page consistency - Site Logo (#30567)
Create a basic config page that only contains site logo settings, to replace the "branding" category linked to from "Site logo" in the admin sidebar.
2025-01-06 15:45:19 +11:00