Commit Graph

57399 Commits

Author SHA1 Message Date
Renato Atilio 954ad7218d
DEV: prosemirror 2025-01-11 13:20:48 -03:00
chapoi 030aec0342
simplify toggle further 2025-01-08 16:20:44 -03:00
Renato Atilio f46da69f09
DEV: prosemirror 2025-01-08 16:20:41 -03:00
chapoi e22c77a1bc
remove root selector 2025-01-08 16:20:27 -03:00
chapoi c2ae5499c6
states + rename 2025-01-08 16:20:26 -03:00
chapoi 9439026d21
UX updates to toggle 2025-01-08 16:20:26 -03:00
Renato Atilio 9dc0335bb3
DEV: prosemirror 2025-01-08 16:20:23 -03:00
Kris 55914bf9a3
UX: use font with more glyphs for discobot certificates (#30646) 2025-01-08 13:44:09 -05: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
Natalie Tay 6dd306be55
DEV: Update a defensive test which case is no longer possible (#30640)
Introduced in https://github.com/discourse/discourse/pull/30263, it is also causing flaky tests.
2025-01-08 21:06:04 +08: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 21c8376679
DEV: removes non needed special case (#30638)
Now that we correctly await for the modal to close, we dont need to special case and disable focusTrigger, the flow will now be:

- click an element of the menu
- wait for modal to close
- focus trigger
- trigger action, which will eventually open a modal and attempt to focus the first item
2025-01-08 11:59:16 +01: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
Osama Sayegh 4f9359d056
FIX: Name field should appear in the signup form for login-required sites (#30634)
Meta topic: https://meta.discourse.org/t/full-name-at-sign-up-went-missing/345662/17?u=osama

The preloaded `site` object for anons on login-required sites is a stripped down version of the full object with just a specific set of attributes and doesn't use the site serializer. This results in the `full_name_required_for_signup` and `full_name_visible_in_signup` attributes not making it to the client app when a login-required site is accessed by an anon, causing the name field in the signup form to not be rendered, even when it's required.

This commit includes those attributes in the stripped down version of the `site` object that's used for anons on login-required sites.
2025-01-08 03:49:34 +03: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] 8f31211495
Build(deps): Bump connection_pool from 2.4.1 to 2.5.0 (#30627)
Bumps [connection_pool](https://github.com/mperham/connection_pool) from 2.4.1 to 2.5.0.
- [Changelog](https://github.com/mperham/connection_pool/blob/main/Changes.md)
- [Commits](https://github.com/mperham/connection_pool/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: connection_pool
  dependency-type: indirect
  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>
2025-01-08 00:13:41 +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
Discourse Translator Bot 1d7b1e587a Update translations 2025-01-07 21:56:56 +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
Renato Atilio 9b4dfbbbfe
DEV: skip flaky chat composer emoji spec (#30623)
This test is flaky, sometimes it fails with the hamburger menu blocking the click on the emoji, other times it just doesn't return the list of emojis when the search term is there.

Other similar emoji tests are skipped. Stopping the bleed, but we still need to figure out a more reliable testing strategy here.

Will revisit after #28277 is merged.

ref /t/-/145212
2025-01-07 13:36:43 -03:00
Jarek Radosz 9c661cc2c8
DEV: Remove an old deprecated setting (#30620)
Scheduled to be removed ~3 years ago, there is a migration in place already
2025-01-07 16:59:43 +01: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
Ruben Oussoren 20a16ea231
Adding Import Support for Discourse Reactions Plugin (#30361)
* Adding Import Support for Discourse Reactions Plugin

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-01-07 08:58:26 -05:00
Jarek Radosz affe26f0dd
DEV: Update nokogiri to 1.18.1 (#30554)
Nokogiri/libxml is now more strict in terms of params it receives.

It uses kwargs vs options object (I fixed an issue there in #30545) doesn't accept nil/blank html (fixed here) and most importantly handles encoding in a different way. It seems to require explicitly specifying UTF8.

* Build(deps): Bump nokogiri from 1.16.8 to 1.18.1

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.8 to 1.18.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.8...v1.18.1)

---
updated-dependencies:
- dependency-name: nokogiri
  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>
2025-01-07 12:05:39 +01: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 b6c1e881be
FIX: Ensure popups from the chat composer dropdown gain focus (#30613)
When inserting anything from the chat composer dropdown, any popups opened weren't properly focussed.

This was due to the default behaviour of the dropdown menu closing, which tries to return the focus to the original triggering element. This would normally be the correct behaviour, but here we want the menu to close in the background, handing focus off to the popup, instead.
2025-01-07 17:34:01 +11: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
Alan Guo Xiang Tan dc36bed7d3
DEV: Only check for flaky test report on the `main` branch (#30608)
We don't care about flaky tests on the stable branch for now.
2025-01-07 12:40:01 +08: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
Martin Brennan 19105bfd32
FIX: ChangeFullNameRequiredSetting could fail if setting was already in DB (#30605)
Followup 3187606d34

Fix full_name_requirement INSERT by adding ON CONFLICT DO NOTHING,
on sites that already have this setting this migration will fail.
2025-01-07 13:08:36 +10: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
Natalie Tay 0f0b3a21e6
FIX: Allow attachments to be opened in a new tab instead of downloading them (#30535)
Back then in 31e31ef, we added the Content-Disposition headers so that SVGs get downloaded instead of get run in the browser. Inadvertently, this also causes other attachments like pdfs and videos to be downloaded instead of heeding the "Open in new tab" option that users choose in the browser.

When the header is removed, the default value is "inline", this allows the browser to perform as requested. This also applies to other file types like pdfs, allowing users to "Open in new tab" and view them in the browser instead of always downloading them.

Existing tests (#10205) already do check that SVGs remain downloaded. Some existing tests written for PDFs have been modified to cater for SVGs instead, when there was a bug in defining the filenames per #10108
2025-01-07 10:32:32 +08: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
dependabot[bot] 415918b487
Build(deps): Bump rchardet from 1.8.0 to 1.9.0 (#30556)
Bumps [rchardet](https://github.com/jmhodges/rchardet) from 1.8.0 to 1.9.0.
- [Commits](https://github.com/jmhodges/rchardet/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: rchardet
  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>
2025-01-07 09:59:07 +08:00