Commit Graph

55156 Commits

Author SHA1 Message Date
carson chang
9bb288604d
UX: Remove PluginOutlet spans (#27845) 2024-07-10 20:49:29 -07:00
Robert
d8d3d2184a
FIX: Poll: Show gear button only when there is more than one dropdown item (#27775)
During migration of Poll plugin from widget basis to glimmer, some functionality was inadvertently dropped:

- A single button should appear instead of the dropdown menu when there is only one valid "poll admin" action
- No button should appear when there are no valid "poll admin" actions for current user

This PR restores the original behaviour and adds test coverage (that didn't exist prior to migration, partly why it wasn't caught earlier)

relates to #27204

related meta topic:  https://meta.discourse.org/t/what-is-the-gear-button-under-the-poll-for/315477/2
2024-07-11 11:19:04 +08:00
锦心
8d6a2aad18
UX: Add missing title to notifications-button (#27837)
This commit adds the missing title for notifications-button. In the past, it was automatically fallbacked to the button's key.

Related meta topic: https://meta.discourse.org/t/tracking-toggle-text-on-hover-sometimes-not-translated/315727
2024-07-11 08:37:53 +08:00
dependabot[bot]
8c5553448a
Build(deps): Bump terser from 5.31.1 to 5.31.2 (#27852)
Bumps [terser](https://github.com/terser/terser) from 5.31.1 to 5.31.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.1...v5.31.2)

---
updated-dependencies:
- dependency-name: terser
  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>
2024-07-11 00:56:45 +02:00
Kris
39187d9814
A11Y: improve notification panel layout for high zoom levels (#27848) 2024-07-10 15:50:34 -04:00
Jordan Vidrine
7439fc73b1
UX: modernize the header drop shadow (#27843) 2024-07-10 14:29:36 -05:00
Kris
c780e764d0
A11Y: usercard resizing for high zoom levels (#27846) 2024-07-10 14:51:56 -04:00
Kris
5b73322c41
A11Y: improve topic entrance aria-label, title (#27842)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-07-10 14:15:14 -04:00
Kris
0e3ed7ea2a
A11Y: improve topic list table markup for screenreaders (#27808)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-07-10 13:14:36 -04:00
chapoi
aedff155bd
UX: user page copy change responses -> replies (#27841) 2024-07-10 18:30:14 +02:00
Kris
0ac1a43fef
A11Y: aria-current="page" is more appropriate for navigation bar links (#27835) 2024-07-10 12:24:51 -04:00
Jarek Radosz
8fa61410aa
DEV: Add missing outlet args to glimmer topic list components (#27838) 2024-07-10 17:10:19 +02:00
Jarek Radosz
318dad23c4
DEV: Remove extra whitespace from render-glimmer-container (#27839) 2024-07-10 17:04:18 +02:00
Joffrey JAFFEUX
89bcf955c0
DEV: migrates groups-info to gjs (#27832)
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-07-10 16:14:04 +02:00
Joffrey JAFFEUX
52ea5c7eb0
DEV: migrates user-summary-section to gjs (#27834) 2024-07-10 16:13:33 +02:00
Régis Hanol
d2873d9775
DEV: wait a bit for chat message to persist (#27830)
Internal ref t/132745
2024-07-10 16:11:50 +02:00
Joffrey JAFFEUX
67c3f29486
DEV: removes hidden-details component (#27833)
Not used anywhere
2024-07-10 16:05:45 +02:00
dependabot[bot]
322db8adb5
Build(deps): Bump faraday from 2.9.2 to 2.10.0 (#27781)
Bumps [faraday](https://github.com/lostisland/faraday) from 2.9.2 to 2.10.0.
- [Release notes](https://github.com/lostisland/faraday/releases)
- [Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lostisland/faraday/compare/v2.9.2...v2.10.0)

---
updated-dependencies:
- dependency-name: faraday
  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-07-10 14:50:14 +02:00
Jarek Radosz
a4309e5543
DEV: Add logger to default gems list (#27828)
…and sort both lists alphabetically

(unlocks #27781)
2024-07-10 14:36:13 +02:00
dependabot[bot]
3f2a0e26db
Build(deps): Bump @json-editor/json-editor from 2.10.0 to 2.15.1 (#27824)
Bumps [@json-editor/json-editor](https://github.com/json-editor/json-editor) from 2.10.0 to 2.15.1.
- [Changelog](https://github.com/json-editor/json-editor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/json-editor/json-editor/compare/2.10.0...2.15.1)

---
updated-dependencies:
- dependency-name: "@json-editor/json-editor"
  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-07-10 12:41:34 +01:00
dependabot[bot]
c4bc645717
Build(deps-dev): Bump ember-cli from 5.9.0 to 5.10.0 (#27776)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
- [Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/compare/v5.9.0...v5.10.0)

---
updated-dependencies:
- dependency-name: ember-cli
  dependency-type: direct:development
  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-07-10 12:28:45 +01:00
David Taylor
a4aebc83ac
DEV: Add simple test for json-schema-editor and remove extra await (#27827)
Followup to ce3d91f422
2024-07-10 12:22:31 +01:00
dependabot[bot]
55e5cd3b96
Build(deps-dev): Bump rubocop from 1.64.1 to 1.65.0 (#27825)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.64.1 to 1.65.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.64.1...v1.65.0)

---
updated-dependencies:
- dependency-name: rubocop
  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>
2024-07-10 13:00:50 +02:00
dependabot[bot]
0cecb6c053
Build(deps-dev): Bump parser from 3.3.3.0 to 3.3.4.0 (#27826)
Bumps [parser](https://github.com/whitequark/parser) from 3.3.3.0 to 3.3.4.0.
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v3.3.3.0...v3.3.4.0)

---
updated-dependencies:
- dependency-name: parser
  dependency-type: indirect
  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>
2024-07-10 13:00:39 +02:00
David Taylor
ce3d91f422
DEV: Load @json-editor/json-editor using webpack async import (#27773) 2024-07-10 11:15:42 +01:00
Jarek Radosz
270a0d9e0f
DEV: Clean up package.json/yarn.lock (#27823)
* DEV: Remove msgf/core from the root package.json

* run yarn install

* yarn-deduplicate && yarn
2024-07-10 10:40:13 +01:00
Loïc Guitaut
ab99f31760 DEV: Fix the I18n integrity spec
Before Rails 7.1, the `config.i18n.raise_on_missing_translations` option
was raising only in controllers and views, now it’s anywhere in the app.
It means it raises each time `#description` is called for a setting that
is missing a proper description (and we have a ton of them). Most of the
time it’s fine, as those are usually settings that aren’t shown to the
user.

We can’t just let the code blow up every time there’s a setting with a
missing description, that’s why it’s currently returning an empty
string when the translation is missing.

However, this silently broke our I18n integrity spec that was relying on
the old “Translation missing” message to detect missing translations.

This patch addresses this issue by checking the description isn’t an
empty string. It caught a missing translation by the way.
2024-07-10 11:39:13 +02:00
Loïc Guitaut
8b067230ef DEV: Fix a missing dependency to @messageformat/core 2024-07-10 10:59:00 +02:00
Régis Hanol
758b9dd0ba
FEATURE: email attachments in a details (#27804)
This change how we present attachments from incoming emails to now be "hidden" in a "[details]" so they don't "hang" at the end of the post.

This is especially useful when using Discourse as a support tool where email is the main communication channel. For various reasons, images are often duplicated by email user agents, and hiding them behind the details block help keep the conversation focused on the isssue at hand.

Internal ref t/122333
2024-07-10 09:59:27 +02:00
Loïc Guitaut
301713ef96 DEV: Upgrade the MessageFormat library (JS)
This patch upgrades the MessageFormat library to version 3.3.0 from
0.1.5.

Our `I18n.messageFormat` method signature is unchanged, and now uses the
new API under the hood.

We don’t need dedicated locale files for handling pluralization rules
anymore as everything is now included by the library itself.

The compilation of the messages now happens through our
`messageformat-wrapper` gem. It then outputs an ES module that includes
all its needed dependencies.

Most of the changes happen in `JsLocaleHelper` and in the `ExtraLocales`
controller.

A new method called `.output_MF` has been introduced in
`JsLocaleHelper`. It handles all the fetching, compiling and
transpiling to generate the proper MF messages in JS. Overrides and
fallbacks are also handled directly in this method.

The other main change is that now the MF translations are served through
the `ExtraLocales` controller instead of being statically compiled in a
JS file, then having to patch the messages using overrides and
fallbacks. Now the MF translations are just another bundle that is
created on the fly and cached by the client.
2024-07-10 09:51:25 +02:00
Bianca Nenciu
6591a0654b
FIX: Destroy Drafts when increasing sequences (#27739)
Drafts used to be deleted instead of being destroyed. The callbacks that
clean up the upload references were not being called. As a result, the
upload references were not cleaned up and uploads were not deleted
either. This has been partially fixed in 9655bf3e.
2024-07-10 10:43:11 +03:00
Ted Johansson
acc8b46d51
FIX: Make category filter in review page clearable (#27820)
On the review page, once you select a category to filter by, while you can still change the category, you can not clear it.

After this commit, we pass the "clearable" select-kit option through.
2024-07-10 15:24:01 +08:00
Alan Guo Xiang Tan
c9775d5f72
DEV: Apply Logster.store.ignore to DiscourseLogstashLogger as well (#27819)
This commit updates `DiscourseLogstashLogger#add_with_opts` to avoid
logging messages that matches regexp patterns configured in
`Logster.store.ignore`. Those error logs are mostly triggered by clients
and do not serve any useful purpose.
2024-07-10 13:51:42 +08:00
Martin Brennan
d4c603984f
DEV: Make sure header hidden buttons are valid (#27818)
Followup 0434112aa7,
we introduced HideApplicationHeaderButtons there
but didn't validate the buttons passed to it. With this
commit we do, and send an error to the browser console
if an invalid one is used.
2024-07-10 15:50:22 +10:00
Ted Johansson
e364ed2ad1
FIX: Disallow all client-side routing when action is required (#27817)
When a user action is required and enforced, such as filling up newly added required fields or adding a 2FA method, we disable routing on the client-side. However, this could be bypassed by first loading an always allowed page, such as /faq and then client-side routing away from there.

This commit fixes that by 1) moving the logic for checking if routing is restricted and if a given path is allowed into a service and 2) hoisting the willTransition hook into the application router and use the newly created service to check whether to abort transitions or not.
2024-07-10 13:33:52 +08:00
Alan Guo Xiang Tan
3fee52eae3
PERF: Update docker:test to run QUnit with more cores if available (#27816)
This commit updates the `docker:test` rake task to run core and plugin
QUnit tests in parallel using half the number of available CPU
processors to speed up time it takes to run the tests on hardware with
more CPU cores.

Before this commit, core QUnit tests ran by the `docker:test` rake task was capped at 3 parallel
processes while plugin QUnit tests was not ran in parallel.
2024-07-10 11:27:20 +08:00
Alan Guo Xiang Tan
b4b7fa17af
DEV: Add exception class/message to DiscourseLogstashLogger take 2 (#27815)
This is the second take of af2bd4cc50 to
account for messages which contains newlines.
2024-07-10 11:04:17 +08:00
Alan Guo Xiang Tan
0b64cb9d8c
Revert "DEV: Remove git_version from DiscourseLogstashLogger log event (#27730)" (#27814)
This reverts commit bb0daa33cd.

This commit was not causing the problems we thought it was.
2024-07-10 10:36:22 +08:00
Martin Brennan
54fba2005f
DEV: Remove findBy usage in admin-sidebar (#27813)
We prefer not to use these Ember array extensions anymore
2024-07-10 11:58:52 +10:00
Martin Brennan
eca4ed8f80
DEV: Remove old defer_track_visit_v2 method (#27812)
Followup b46e1fe2aa
2024-07-10 11:40:45 +10:00
Alan Guo Xiang Tan
af2bd4cc50
DEV: Add exception class and message fields to DiscourseLogstashLogger (#27787)
This commit updates `DiscourseLogstashlogger` to add the
`exception_class` and `exception_message` field to the log line when the
`progname` of the log message is `web-exception` which is Logster's
logging of exceptions during a web request.

The `exception_class` and `exception_message` fields allows consumers of
the logs to easily group logs together.
2024-07-10 08:54:39 +08:00
dependabot[bot]
7049838673
Build(deps-dev): Bump sass from 1.77.6 to 1.77.7 (#27809)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.6 to 1.77.7.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.77.6...1.77.7)

---
updated-dependencies:
- dependency-name: sass
  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>
2024-07-10 08:53:51 +08:00
Martin Brennan
560e8aff75
FEATURE: Allow oneboxing private GitHub URLs (#27705)
This commit adds the ability to onebox private GitHub
commits, pull requests, issues, blobs, and actions using
a new `github_onebox_access_token` site setting. The token
must be set up in correctly to have access to the repos needed.

To do this successfully with the Oneboxer, we need to skip
redirects on the github.com host, otherwise we get a 404
on the URL before it is translated into a GitHub API URL
and has the appropriate headers added.
2024-07-10 09:39:31 +10:00
Martin Brennan
8c038d9498
FIX: Smart list jankiness in Chrome and fix for Firefox (#27762)
Last week I disabled smart lists in Firefox in 2ab4913d13.

This week the same issue presented itself in Chrome. Turns out,
the list modification was still not firing at the right time
in the event chain. I investigated and it looks as though
`beforeinput` is a better fit, since:

> This allows web apps to override text edit behavior before the browser
modifies the DOM tree, and provides more control over input events to
improve performance.

c.f. https://developer.mozilla.org/en-US/docs/Web/API/Element/beforeinput_event
and https://webkit.org/blog/7358/enhanced-editing-with-input-events/
and https://www.w3.org/TR/uievents/#events-keyboard-event-order

The order of keyboard events is `keydown` -> `beforeinput` -> `input` -> `keyup`

I changed to detect the event type of `insertLineBreak` which is
not always consistently true in `input` events. If it's true when
`beforeinput` is fired then we go ahead with the smart list when
`input` fires.
2024-07-10 09:31:16 +10:00
Jarek Radosz
0165460626
FIX: Scroll to top shortcut regressed in b757275 (#27807) 2024-07-10 00:19:45 +02:00
Sérgio Saquetim
08891ccf06
DEV: Escape the filter in the admin sidebar no results message (#27806) 2024-07-09 19:15:10 -03:00
Sérgio Saquetim
bbd67eff08
DEV: Improve the sidebar section expansion handling (#27805)
Handles the cases where the sections titles are Unicode only strings, allowing them to be expanded separately if the Unicode string contains letters.

Also prevents a sidebar section with the header hidden to be displayed collapsed.
2024-07-09 18:32:29 -03:00
Discourse Translator Bot
dd67375de7
Update translations (#27790) 2024-07-09 23:12:03 +02:00
carson chang
e4b223af6f
UX: Remove "Dismiss notifications" autofocus (#27798)
* UX: Remove "Dismiss notifications" autofocus

* Linting: Remove newline
2024-07-09 13:47:33 -07:00
Joffrey JAFFEUX
56cd318728
DEV: removes unused badge-selector (#27803) 2024-07-09 21:06:13 +02:00