Commit Graph

32775 Commits

Author SHA1 Message Date
David Taylor
445951e854
DEV: Ensure plugin outlet parentView deprecation cannot be avoided (#27973)
We'd implemented the deprecation by overriding `get parentView`, and storing the real value on `_parentView`. Unfortunately that meant people could access `_parentView` directly, thereby bypassing the deprecation message.

This commit moves the internal storage to a private field, which cannot be accessed from outside the class. A deprecated getter for `_parentView` is introduced to avoid immediate breakage for any code using this workaround.
2024-07-18 16:48:46 +01:00
Ella E.
79e0aa6a64
UX: fix dashboard nav overflow (#27963) 2024-07-18 09:39:59 -06:00
Kris
9719aa0e2d
DEV: follow-up to avoid using schedule when opening modal from dropdown (#27970) 2024-07-18 10:33:06 -04:00
Kris
6344e3f937
FIX: avoid updating hamburgerVisible in the same computation (#27956) 2024-07-18 08:39:17 -04:00
Joffrey JAFFEUX
4c8812737c
DEV: supports setProperties (#27969)
This is a convenience for when you have multiple properties to set in form kit.

```
// before
set("foo", 1);
set("bar", 2);

//after
setProperties({foo: 1, bar: 2});
```
2024-07-18 14:33:08 +02:00
Joffrey JAFFEUX
1aa24f83bb
DEV: form-kit improvements (#27966)
- correctly support @title on fields
- correctly support @subtitle on fields
- improves error message when a field name is incorrect in assertions
2024-07-18 10:30:18 +02:00
Krzysztof Kotlarek
bb54270e92
Revert "FIX: fallback to custom type for flags (#27961)" (#27962)
This reverts commit 7b6b7ca863.
2024-07-18 14:00:27 +10:00
Krzysztof Kotlarek
7b6b7ca863
FIX: fallback to custom type for flags (#27961)
Before migration is run flags code is evaluated. It is causing error:
```
NoMethodError: undefined method `require_message' for an instance of Flag (NoMethodError)
Did you mean?  require_dependency
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activemodel-7.1.3.4/lib/active_model/attribute_methods.rb:489:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.4/lib/active_record/relation/delegation.rb💯in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.3.4/lib/active_record/relation/delegation.rb💯in `each'
/var/www/discourse/app/models/post_action_type.rb:64:in `reject'
```

The solution is to temporarily fall back to old column name - custom_type
2024-07-18 13:34:01 +10:00
Martin Brennan
48d13cb231
UX: Use a dropdown for SSL mode for group SMTP (#27932)
Our old group SMTP SSL option was a checkbox,
but this was not ideal because there are actually
3 different ways SSL can be used when sending
SMTP:

* None
* SSL/TLS
* STARTTLS

We got around this before with specific overrides
for Gmail, but it's not flexible enough and now people
want to use other providers. It's best to be clear,
though it is a technical detail. We provide a way
to test the SMTP settings before saving them so there
should be little chance of messing this up.

This commit also converts GroupEmailSettings to a glimmer
component.
2024-07-18 10:33:14 +10:00
Krzysztof Kotlarek
c975c7fe1b
FEATURE: custom flag can require additional message (#27908)
Allow admin to create custom flag which requires an additional message.

I decided to rename the old `custom_flag` into `require_message` as it is more descriptive.
2024-07-18 10:10:22 +10:00
chapoi
58b7dde599
UX: remove formkit css bleeding into every dropdown (#27955) 2024-07-17 22:26:47 +02:00
Isaac Janzen
f4b87c744b
DEV: Add after-breadcrumbs plugin outlet (#27954) 2024-07-17 13:30:46 -05:00
Joffrey JAFFEUX
b6b0d68576
DEV: various form-kit tweaks (#27950)
- removes unused css code
- improves password control sizing
- adds more spacing between collection items
- correct a typo in collection class

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2024-07-17 20:18:19 +02:00
Natalie Tay
7d02b45304
DEV: Update webhook site setting for topic voting (#27935) 2024-07-17 20:26:48 +08:00
dependabot[bot]
df6b41464f
Build(deps-dev): Bump @embroider/compat in the embroider group (#27942)
Bumps the embroider group with 1 update: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).


Updates `@embroider/compat` from 3.5.6 to 3.5.7
- [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)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-17 11:46:11 +01:00
dependabot[bot]
2c1719a396
Build(deps): Bump terser from 5.31.2 to 5.31.3 (#27944)
Bumps [terser](https://github.com/terser/terser) from 5.31.2 to 5.31.3.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.31.2...v5.31.3)

---
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-17 11:42:10 +01:00
dependabot[bot]
edcd686597
Build(deps): Bump the babel group across 1 directory with 2 updates (#27943)
Bumps the babel group with 2 updates in the / directory: [@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.24.7 to 7.24.9
- [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.9/packages/babel-core)

Updates `@babel/standalone` from 7.24.7 to 7.24.10
- [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.10/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-17 11:41:52 +01:00
chapoi
2ca06ba236
DEV: form-kit
This PR introduces FormKit, a component-based form library designed to simplify form creation and management. This library provides a single `Form` component, various field components, controls, validation mechanisms, and customization options. Additionally, it includes helpers to facilitate testing and writing specifications for forms.

1. **Form Component**:
   - The main component that encapsulates form logic and structure.
   - Yields various utilities like `Field`, `Submit`, `Alert`, etc.

   **Example Usage**:
   ```gjs
   import Form from "discourse/form";

   <template>
     <Form as |form|>
       <form.Field
         @name="username"
         @title="Username"
         @validation="required"
         as |field|
       >
         <field.Input />
       </form.Field>

       <form.Field @name="age" @title="Age" as |field|>
         <field.Input @type="number" />
       </form.Field>

       <form.Submit />
     </Form>
   </template>
   ```

2. **Validation**:
   - Built-in validation rules such as `required`, `number`, `length`, and `url`.
   - Custom validation callbacks for more complex validation logic.

   **Example Usage**:
   ```javascript
   validateUsername(name, value, data, { addError }) {
     if (data.bar / 2 === value) {
       addError(name, "That's not how maths work.");
     }
   }
   ```

   ```hbs
   <form.Field @name="username" @validate={{this.validateUsername}} />
   ```

3. **Customization**:
   - Plugin outlets for extending form functionality.
   - Styling capabilities through propagated attributes.
   - Custom controls with properties provided by `form` and `field`.

   **Example Usage**:
   ```hbs
   <Form class="my-form" as |form|>
     <form.Field class="my-field" as |field|>
       <MyCustomControl id={{field.id}} @onChange={{field.set}} />
     </form.Field>
   </Form>
   ```

4. **Helpers for Testing**:
   - Test assertions for form and field validation.

   **Example usage**:
   ```javascript
   assert.form().hasErrors("the form shows errors");
   assert.form().field("foo").hasValue("bar", "user has set the value");
   ```

   - Helper for interacting with he form

   **Example usage**:
   ```javascript
   await formKit().field("foo").fillIn("bar");
   ```

5. **Page Object for System Specs**:
   - Page objects for interacting with forms in system specs.
   - Methods for submitting forms, checking alerts, and interacting with fields.

   **Example Usage**:
   ```ruby
   form = PageObjects::Components::FormKit.new(".my-form")
   form.submit
   expect(form).to have_an_alert("message")
   ```

   **Field Interactions**:
   ```ruby
   field = form.field("foo")
   expect(field).to have_value("bar")
   field.fill_in("bar")
   ```


6. **Collections handling**:
   - A specific component to handle array of objects

   **Example Usage**:
   ```gjs
    <Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
      <form.Collection @name="foo" as |collection|>
        <collection.Field @name="bar" @title="Bar" as |field|>
          <field.Input />
        </collection.Field>
      </form.Collection>
    </Form>
   ```
2024-07-17 11:59:35 +02:00
Kris
ef27ee9fb6
UX: allow category names in select-kit to truncate if needed (#27941) 2024-07-16 17:52:17 -04:00
Kris
9a2f94f648
UX: spacing fix for related topics on mobile (#27940) 2024-07-16 17:51:55 -04:00
chapoi
754ccebe80
UX: fix overflowing quote bar (#27938) 2024-07-16 21:17:44 +02:00
Kris
fa3709041b
UX: fix padding on suggested/related toggle in PMs (#27939) 2024-07-16 14:46:15 -04:00
Sérgio Saquetim
7d729603b4
DEV: Improve args deprecation on plugin outlets (#27885) 2024-07-16 14:29:39 -03:00
Kris
d4ade75583
A11Y: remove heading tags from usercards (#27926) 2024-07-16 12:32:53 -04:00
Kris
0d4492c7b7
A11Y: Close header dropdown menus on focusout (#27901)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-07-16 09:11:26 -04:00
锦心
600f2854c7
FEATURE: Log topic slow mode changes (#27934)
Previously, we did not log any topic slow mode changes. This allowed
some malicious (or just careless) TL4 users to delete slow modes created
by moderators at will. Administrators could not see who changed the slow
mode unless they had SQL knowledge and used Data Explorer.

This commit enables logging who turns slow mode on, off, or changes it.

Related meta topic: https://meta.discourse.org/t/why-is-there-no-record-of-who-added-or-removed-slow-mode/316354
2024-07-16 17:08:09 +08:00
Martin Brennan
0783bfbbfe
FIX: Use login SMTP auth for office365 in group mailer (#27931)
Followup 7b627dc14b

In this other commit, I changed the email settings validator
to always use the `login` authentication method for
office365 and outlook, but I didn't change the actual
group SMTP mailer to do this.

This commit fixes that issue and does some minor refactoring.
2024-07-16 16:21:14 +10:00
Martin Brennan
00608a19c6
FIX: Show the SMTP authentication error for group UI (#27914)
Originally in 964da21817
we hid the SMTPAuthenticationError message except in
very specific cases. However this message often contains
helpful information from the mail provider, for example
here is a response from Office365:

> 535 5.7.139 Authentication unsuccessful, user is locked by your
organization's security defaults policy. Contact your administrator.

So, we will show the error message in the modal UI instead
of supressing it with a generic message to be more helpful.
2024-07-16 09:14:17 +10:00
Kris
576f880190
UX: fix name & username width on profile summary (#27925) 2024-07-15 12:49:06 -04:00
David Taylor
0b7099f34e
FIX: 2fa check error for anon users (#27924) 2024-07-15 14:19:04 +01:00
Vinoth Kannan
7b53e610c1
SECURITY: limit the number of characters in watched word replacements.
The watch words controller creation function, create_or_update_word(), doesn’t validate the size of the replacement parameter, unlike the word parameter, when creating a replace watched word. So anyone with moderator privileges can create watched words with almost unlimited characters.
2024-07-15 19:25:17 +08:00
Krzysztof Kotlarek
25485bddee
FIX: refresh flags cache after update (#27909)
`after_commit` should be used before refreshing processes to be sure that the database is already updated.

Also, MessageBus is used instead of events as MessageBus works correctly with many processes;
2024-07-15 19:45:25 +10:00
锦心
4d64205eef
DEV: Add slug parameter to hashtag-decorator (#27917)
In order to facilitate discourse-tag-icons and discourse-category-icons to render icons for post content, we need to provide an additional slug parameter here
2024-07-15 17:22:02 +08:00
Ted Johansson
cf5174da69
FIX: Fix broken out of date themes admin notice (#27916)
The OutOfDateThemes problem check is using an old method of setting the message, by overriding #message. It should instead use #translation_keys. (By chance I noticed the same thing applies to UnreachableThemes.
2024-07-15 16:12:44 +08:00
Kelv
1d277ba96e
DEV: add discourse prefix to deprecation ids to differentiate from ember deprecations (#27910) 2024-07-15 15:10:04 +08:00
Alan Guo Xiang Tan
a3d319ac2f
FIX: StaticController#enter should not redirect to invalid paths (#27913)
This commit updates `StaticController#enter` to not redirect to invalid
paths when the `redirect` param is set. Instead it should redirect to `/` when the
`redirect` param is invalid.
2024-07-15 14:39:37 +08:00
Martin Brennan
5f4dc1042e
FIX: Bold admin sidebar headings (#27912)
We lost these by mistake in fed9055818,
this reinstates them.
2024-07-15 16:31:16 +10:00
Kelv
98cbfd598c
DEV: add deprecation ids for base-url, fa-icon and chat service (#27911) 2024-07-15 14:29:17 +08:00
Martin Brennan
97e2b353f6
FEATURE: Allow for multiple GitHub onebox tokens (#27887)
Followup 560e8aff75

GitHub auth tokens cannot be made with permissions to
access multiple organisations. This is quite limiting.
This commit changes the site setting to be a "secret list"
type, which allows for a key/value mapping where the value
is treated like a password in the UI.

Now when a GitHub URL is requested for oneboxing, the
org name from the URL is used to determine which token
to use for the request.

Just in case anyone used the old site setting already,
there is a migration to create a `default` entry
with that token in the new list setting, and for
a period of time we will consider that token valid to
use for all GitHub oneboxes as well.
2024-07-15 13:07:36 +10:00
Natalie Tay
75236b30d8
FIX: Exclude reply count on posts due to required Comment nesting (#27892)
"Replies" in non-crawler view makes a request when clicked to get all replies, however this does not make sense in the crawler view where we load everything per post number.

So the solution here is to exclude the reply number so we can avoid having to nest all replies in a post.
2024-07-15 09:40:47 +08:00
Ted Johansson
06131bd4fd
FIX: Don't require fields required on sign-up when updating fields (#27888)
### What is the problem?

We have recently added a new option to add user fields required for existing users. This is in contrast to requiring fields only on sign-up.

This revealed an existing problem. Consider the following:

1. User A signs up.
2. Admin adds a new user field required on sign-up. (Should not apply to User A since they already signed up.)
3. User A tries to update their profile.

**Expected behaviour:**

No problem.

**Actual behaviour:**

User A receives an error saying they didn't fill up all required fields.

### How does this fix it?

When updating profile, we only check that required fields that are "for all users" are filled. Additionally, we check that fields that were required on sign-up and have previously been filled are not blanked out.
2024-07-15 09:56:20 +10:00
Krzysztof Kotlarek
9e4e591d60
Revert "FEATURE: custom flag can require additional message (#27706)" (#27906)
This reverts commit c0bcd979e3.
2024-07-15 09:45:57 +10:00
Krzysztof Kotlarek
c0bcd979e3
FEATURE: custom flag can require additional message (#27706)
Allow admin to create custom flag which requires an additional message.

I decided to rename the old `custom_flag` into `require_message` as it is more descriptive.
2024-07-15 08:48:01 +10:00
锦心
63ca30ccb4
FIX: Don't let table-build automatically fill empty headers with default values (#27894)
* FIX: Don't let table-build automatically fill empty headers with default values

The old table builder would fill empty headers with default values A~Z when editing.
This commit makes table-builder respect the old empty headers

related meta topic: https://meta.discourse.org/t/editing-a-table-with-empty-headers-fills-them-in-with-the-default-text-column-a-column-b/268472
2024-07-13 00:41:18 +08:00
David Taylor
271cbcefa9
DEV: Improve safari-class-fields-bugfix transform (#27890)
This tightens things up to reduce the number of initializers which need to be wrapped in an IIFE.

Mirrors the changes made in https://github.com/babel/babel/pull/16569
2024-07-12 17:00:04 +01:00
Kris
a553dd70c0
UX: fix top-list spacing on user summary (#27877) 2024-07-12 09:10:18 -04:00
David Taylor
a2463313a8
DEV: Ensure implicit injections shim is run early (#27829)
This needs to run before any component files are `import`'d. In traditional resolver-based tests, this was working previously because component files would only be loaded 'at runtime'. However, in gjs-based tests (e.g. those introduced in the formkit PR), component files are imported before the application is booted.
2024-07-12 12:08:09 +01:00
David Taylor
895e9a5893
DEV: Revert sass upgrade (#27891)
This reverts commit d05f8285e7 and 727acfee6a. This bump introduced a new deprecation message which is very noisy for us. We'll resolve it before merging again.
2024-07-12 12:07:13 +01:00
Martin Brennan
a0283305ca
FIX: Integer settings wrongly showing overridden from default (#27886)
Followup db993cf8fd

Since in the above commit we converted integer site settings
to actual integers then set that as the new `buffered.value`,
the overridden indicator technically thinks the value has changed,
even if the user sets it back to the default:

```
overridden: propertyNotEqual("setting.default", "buffered.value"),
```

We can fix this by converting the parsed integer back to a string
before setting the buffered setting value.
2024-07-12 12:03:02 +10:00
dependabot[bot]
727acfee6a
Build(deps-dev): Bump sass from 1.77.7 to 1.77.8 (#27881)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.7 to 1.77.8.
- [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.7...1.77.8)

---
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-12 01:35:43 +02:00
dependabot[bot]
a803ac27e7
Build(deps-dev): Bump webpack from 5.92.1 to 5.93.0 (#27882)
Bumps [webpack](https://github.com/webpack/webpack) from 5.92.1 to 5.93.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.92.1...v5.93.0)

---
updated-dependencies:
- dependency-name: webpack
  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-12 01:30:31 +02:00
Sérgio Saquetim
c973dcc411
DEV: Disambiguate how the topic info is handled in the header service (#27810) 2024-07-11 20:18:02 -03:00
carson chang
88c2b1c01b
UX: Wrap text in span (#27853) 2024-07-11 10:40:47 -07:00
Bianca Nenciu
0e48f1aabe
FIX: Include permissions in the tag serializer (#27849)
The 'permissions' field is used by the composer and the category chooser
to render the category.
2024-07-11 19:59:57 +03:00
Joffrey JAFFEUX
654a42171a
DEV: migrates themes-list-item to gjs (#27870) 2024-07-11 14:36:50 +02:00
Joffrey JAFFEUX
797f659eed
DEV: removes unused text-overflow (#27865) 2024-07-11 13:45:16 +02:00
Joffrey JAFFEUX
5cdd6d7c37
DEV: migrates username-preference to gjs (#27864) 2024-07-11 13:28:49 +02:00
Joffrey JAFFEUX
015a38d014
DEV: migrates reviewable-claimed-topic to gjs (#27863) 2024-07-11 11:56:13 +02:00
Joffrey JAFFEUX
48f36e52a4
DEV: migrates user-badge to gjs (#27866)
Co-authored-by: Jarek Radosz <jarek@cvx.dev>
2024-07-11 11:55:42 +02:00
Joffrey JAFFEUX
b024e32e74
DEV: removes unused modal-tab (#27869) 2024-07-11 11:55:25 +02:00
Joffrey JAFFEUX
0614279b9d
DEV: migrates user-stat to gjs (#27867) 2024-07-11 11:55:20 +02:00
Joffrey JAFFEUX
6547f78ff8
DEV: migrates reviewable-created-by to gjs (#27862) 2024-07-11 11:54:35 +02:00
Joffrey JAFFEUX
38f80be810
DEV: migrates reviewable-created-by-name to gjs (#27861) 2024-07-11 11:54:17 +02:00
Joffrey JAFFEUX
7b91aff46f
DEV: migrates related-messages to gjs (#27860) 2024-07-11 11:53:55 +02:00
Joffrey JAFFEUX
da1a049144
DEV: migrates pwa-install-banner to gjs (#27859) 2024-07-11 11:53:39 +02:00
Joffrey JAFFEUX
478b096286
DEV: migrates private-message-glyph to gjs (#27858) 2024-07-11 11:53:24 +02:00
Joffrey JAFFEUX
d5dd5bfb55
DEV: migrates empty-state to gjs (#27857)
Technically there was a wrapping div here, but that shouldn't be necessary.
2024-07-11 11:53:05 +02:00
Joffrey JAFFEUX
11713518ef
DEV: removes unused disabled-icon (#27856) 2024-07-11 11:52:52 +02:00
David Taylor
374279b93e
DEV: Cleanup ace-editor event listeners (#27844)
- set in constructor so they're guaranteed to be present, even if async-import hasn't finished yet
- ensure they're all cleaned up properly
- combine two cleanup methods into one
2024-07-11 10:14:01 +01:00
Loïc Guitaut
5ec227334a FIX: Don’t list values from disabled plugins
Currently, when a plugin registers a new reviewable type or extends a
list method (through `register_reviewble_type` and `extend_list_method`
respectively), the new array is statically computed and always returns
the same value. It will continue to return the same value even if the
plugin is disabled (it can be a problem in a multisite env too).

To address this issue, this patch changes how `extend_list_method`
works. It’s now using `DiscoursePluginRegistry.define_filtered_register`
to create a register on the fly and store the extra values from various
plugins. It then combines the original values with the ones from the
registry. The registry is already aware of disabled plugins, so when a
plugin is disabled, its registered values won’t be returned.
2024-07-11 10:51:48 +02:00
Martin Brennan
7b627dc14b
FIX: Office365/Outlook auth method for group SMTP (#27854)
Both office365 and outlook SMTP servers need LOGIN
SMTP authentication instead of PLAIN (which is what
we are using by default). This commit uses that
unconditionally for these servers, and also makes
sure to use STARTTLS for them too.
2024-07-11 16:16:54 +10:00
carson chang
9bb288604d
UX: Remove PluginOutlet spans (#27845) 2024-07-10 20:49:29 -07: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
Joffrey JAFFEUX
67c3f29486
DEV: removes hidden-details component (#27833)
Not used anywhere
2024-07-10 16:05:45 +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
David Taylor
ce3d91f422
DEV: Load @json-editor/json-editor using webpack async import (#27773) 2024-07-10 11:15:42 +01:00
Loïc Guitaut
8b067230ef DEV: Fix a missing dependency to @messageformat/core 2024-07-10 10:59:00 +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
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
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
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
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