Commit Graph

19869 Commits

Author SHA1 Message Date
Jarek Radosz
cc447a1ae3
DEV: Simplify TopicNotificationsButton (#29465) 2024-10-29 16:27:23 +01:00
Jarek Radosz
6d918c6307
UX: Remove the admin menu button from expanded mobile timeline (#29464) 2024-10-29 12:12:00 +01:00
David Taylor
b364a13ad3
DEV: Update dynamic component hbs syntax (#29445)
The block form of `{{#component` is not supported by Glint tooling. They recommend using this `{{#let`-based syntax to achieve the same result
2024-10-29 11:11:10 +00:00
David Taylor
336d98732d
DEV: Correct test following 7af72804 (#29463)
Looks like the test was previously asserting the broken behaviour 🤦‍♂️
2024-10-29 10:47:57 +00:00
Akshay Birajdar
a1c9486e3f
FIX: Missing glimmer topic list focus actions on mobile (#29421)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
2024-10-29 11:26:05 +01:00
Natalie Tay
7af728048c
FIX: Copy upon getting logged out (#29462) 2024-10-29 18:19:54 +08:00
Jarek Radosz
ecdf199585
DEV: Refactor composer-/topic-presence-display (#29455)
Re-land #29262 as the d-shared-edits incompatibility has now been resolved. This reverts commit a59c07fc45.
2024-10-29 10:44:05 +01:00
Jarek Radosz
ffd3500f0b
DEV: Remove unused component args (#29454) 2024-10-29 10:43:55 +01:00
David Battersby
7bcd46b87d
DEV: use service worker for chat sound (#29388)
This change makes use of service workers to determine if we should play chat sounds in the current browser tab. Since users can have multiple tabs open, we currently attempt to play sound across all active tabs.

With this change we iterate over all clients and check if client.focused is true (ie. the current tab/window we have open), if so we allow playing the audio in the current tab and for all other hidden tabs/windows we return false.

---------

Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
2024-10-29 13:15:53 +04:00
Jordan Vidrine
f902e0fdd7
UX: Look and feel changes (#29245)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
This PR:

- Removes components from being displayed in the card
- Adds a DMenu to house previous footer actions
- Allows themes to be updated from this grid, with an animation and different border to show the update is happening
- Stops position of cards changing when default changes
- Fixes outline colour not changing when default changes
- Show a global notice on the page when previewing a theme
- Allows updating a theme from the grid, and showing an indicator of what theme needs to be updated
- Moves "Set as default" to the dropdown for the theme
- Show screenshot for theme if it is available
- Prevent page reloading when updating the theme
- Fixes theme install modal on grid page
- Temporarily remove sorting of default theme to the top
2024-10-29 12:25:17 +10:00
Sam
4d7f70b923
FEATURE: do not insert smart list if SHIFT+Enter is pressed (#29452)
A common pattern in the industry for bypassing smart lists is detection of
the shift key.

This information is not available in the "beforeinput" event but it always
fires afer keydown, so we track if shift is pressed on keydown.
2024-10-29 09:18:52 +10:00
David Taylor
9230d4e7f2
DEV: Update remaining mixins to remove object-literal decorators (#29444)
These are unsupported by modern tooling (including ts/glint parsers), so we are working to remove them. The easiest path for mixins is to switch back to the mega-legacy EmberObject syntax for computed/on)
2024-10-28 19:38:52 +00:00
David Taylor
2aed7606a7
DEV: Remove final object-literal decorator from plugin-api-test (#29446) 2024-10-28 19:38:17 +00:00
Ella E.
311c042700
UX: Add description config area card (#29418)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
* DEV: add a description to the config area card component

* UX: update strings and placeholders for your org config area card
2024-10-28 09:39:51 -06:00
David Taylor
de16947b9b
DEV: Update emoji-picker.js to native class syntax (#29438) 2024-10-28 15:27:49 +00:00
David Taylor
8ee00dcbd0
DEV: Update tests to remove/ignore classic-class uses (#29440)
In preparation for https://github.com/discourse/discourse/pull/28610
2024-10-28 15:04:29 +00:00
David Taylor
aa89acbda6
DEV: Upgrade Uppy to v4 (#29397)
Key changes include:

- `@uppy/aws-s3-multipart` is now part of `@uppy/aws-s3`, and controlled with a boolean

- Some minor changes/renames to Uppy APIs

- Uppy has removed batch signing from their S3 multipart implementation. This commit implements a batching system outside of Uppy to avoid needing one-signing-request-per-part

- Reduces concurrent part uploads to 6, because S3 uses HTTP/1.1 and browsers limit concurrent connections to 6-per-host.

- Upstream drop-target implementation has changed slightly, so we now need `pointer-events: none` on the hover element
2024-10-28 14:01:44 +00:00
Martin Brennan
27bdfb6437
FEATURE: Add user preference to disable smart lists (#29434)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Followup 30fdd7738e

Adds a new site setting and corresponding user preference
to disable smart lists. By default they are enabled, because
this is a better experience for most users. A small number of
users would prefer to not have this enabled.

Smart lists automatically append new items to each
list started in the composer when enter is pressed. If
enter is pressed on an empty list item, it is cleared.

This setting will be removed when the new composer is complete.
2024-10-28 14:18:15 +10:00
Martin Brennan
456fbb1dbf
FEATURE: Allow themes to define screenshots (#29079)
This commit allows themes to define up to 2 screenshots
in about.json. These should be paths within the theme's
git repository, images with a 1MB max file size and max width 3840x2160.

These screenshots will be downloaded and stored against a theme
field, and we will use these in the redesigned theme grid UI.

These screenshots will be updated when the theme is updated
in the same way the additional theme files are.

For now this is gated behind a hidden `theme_download_screenshots`
site setting, to allow us to test this on a small number of sites without
making other sites make unnecessary uploads.

**Future considerations:**

* We may want to have a specialized naming system for screenshots. E.g. having light.png/dark.png/some_palette.png
* We may want to show more than one screenshot for the theme, maybe in a carousel or reacting to dark mode or color palette changes
* We may want to allow clicking on the theme screenshot to show a lightbox
* We may want to make an optimized thumbnail image for the theme grid

---------

Co-authored-by: Ted Johansson <ted@discourse.org>
2024-10-28 10:10:20 +10:00
dependabot[bot]
3ff453fdf1
Build(deps-dev): Bump @swc/core from 1.7.39 to 1.7.40 (#29424)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.39 to 1.7.40.
- [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.7.39...v1.7.40)

---
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>
2024-10-28 00:09:10 +01:00
dependabot[bot]
49180d514f
Build(deps-dev): Bump jsuites from 5.6.5 to 5.6.6 (#29429)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.6.5 to 5.6.6.
- [Release notes](https://github.com/jsuites/jsuites/releases)
- [Changelog](https://github.com/jsuites/jsuites/blob/master/changelog.md)
- [Commits](https://github.com/jsuites/jsuites/commits)

---
updated-dependencies:
- dependency-name: jsuites
  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-10-28 00:09:03 +01:00
dependabot[bot]
2809cf1c4d
Build(deps-dev): Bump @ember/optional-features from 2.1.0 to 2.2.0 (#29427)
Bumps [@ember/optional-features](https://github.com/emberjs/ember-optional-features) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/emberjs/ember-optional-features/releases)
- [Changelog](https://github.com/emberjs/ember-optional-features/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-optional-features/commits)

---
updated-dependencies:
- dependency-name: "@ember/optional-features"
  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-10-27 23:20:31 +01:00
dependabot[bot]
7c56117207
Build(deps): Bump @faker-js/faker from 9.0.3 to 9.1.0 (#29425)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.0.3...v9.1.0)

---
updated-dependencies:
- dependency-name: "@faker-js/faker"
  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-10-27 23:19:51 +01:00
dependabot[bot]
0108e7048a
Build(deps): Bump the babel group with 2 updates (#29423)
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.25.9 to 7.26.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.26.0/packages/babel-core)

Updates `@babel/standalone` from 7.25.9 to 7.26.1
- [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.26.1/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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-27 23:06:49 +01:00
Isaac Janzen
1d2b6dbb01
DEV: Add disableDefaultKeyboardShortcuts plugin API to disable default keyboard shortcuts (#29401)
# Context

Add `disableDefaultKeyboardShortcuts` function to the plugin API to allow for disabling [default bindings](e4941278b2/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js (L49)). 

# Details
This function is used to disable a "default" keyboard shortcut. You can pass an array of shortcut bindings as strings to disable them.

**Please note that this function must be called from a pre-initializer.**

Example:
```js
api.disableDefaultKeyboardShortcuts(['command+f', 'shift+c']);
```

- Added system spec, displaying intended behavior
2024-10-25 14:14:04 -05:00
Kris
74bb520877
A11Y: fix and improve user card accessibility (#29399) 2024-10-25 12:43:43 -04:00
Ella E.
92cd2818ad
UX: Update /about config page copy (#29387)
* UX: Update formkit description copy

* UX: Remove unused string
2024-10-25 09:54:28 -06:00
David Taylor
3076b6e8d2
PERF: Update maybeContinueList to avoid replacing the entire post (#29416)
Using execCommand to replace the entire contents of the textarea is very slow for larger posts (it seems the browser does a reflow after every 'virtual keypress').

This commit updates the `maybeContinueList()` function to be more surgical when removing the bullet. Now it only selects & removes the characters which actually need to be deleted

Similar to a7cd220704
2024-10-25 16:37:09 +01:00
chapoi
8ac1f6ad9a
UX: Visual adjustments to login/signup forms (#28680)
This adds several improvements to the signup/login forms. Some of them include:

- Added a minimal signup progress bar design for mobile.
- Made the signup/login modals full height on mobile.
- Improved the activation, account creation, and login-required pages on mobile.
- Removed the subheader and emoji from the welcome component.
- Removed most input instructions.
- Used consistent font size for text below the inputs.
- Displayed input instructions only when the field is focused.
- Improved the vertical alignment of input labels.
- Increased the spacing between inputs.
- Fixed label positioning for custom fields.
- Moved the "(optional)" text for the name input outside the instructions.
- Disabled buttons during login to prevent layout shifts.
- Reused the CTA component for modals as well.
- Matched the invite CTA styles with the signup form.

---------

Co-authored-by: Jan Cernik <jancernik12@gmail.com>
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-10-25 09:34:59 -03:00
David Taylor
7d2aea4d69
DEV: Deprecate uppy-upload-mixin (#29394) 2024-10-24 20:47:25 +01:00
Penar Musaraj
9b1c6f8384
FIX: remove redundant body scroll lock (#29395)
PR #26784 adds the scroll lock in the modal which renders this second scroll lock for SK component redundant. Having it there in fact causes issues on iPads, where it isn't necessary.
2024-10-24 13:41:08 -04:00
Amanda Alves Branquinho
0ecad3a7c9
DEV: Add outlet wrapper for user badges form (#29333)
* DEV: Add outlet wrapper for user badges form

* Add outlet for badge granter table

* add extra args to outlet
2024-10-24 11:10:10 -03:00
Jan Cernik
0983e73c2c
FIX: Enable scroll events in modals for IOS (#29393) 2024-10-24 10:04:03 -04:00
Jan Cernik
ed40c8bfd0
FIX: Remove scroll events for mobile modals (#29391)
* FIX: Remove scroll events for mobile modals
This causes some issues with different devices.
We want to test the side effects of removing this.
2024-10-24 10:18:51 -03:00
David Taylor
f84f7436c5
DEV: Allow parent method to be called using super. in modifyClass (#29389) 2024-10-24 12:11:02 +01:00
David Taylor
4c80beeec9
DEV: Update form-template-field/upload uppy usage (#29367) 2024-10-24 12:05:36 +01:00
David Taylor
8aac0482ac
DEV: Refactor composer-video-thumbnail-uppy (#29370)
- Replaces mixin with uppy-upload lib, and removes duplicated logic
- EmberObject -> plain class
- Moves out of mixin directory
2024-10-24 12:05:16 +01:00
Bianca Nenciu
d37a0d401c
FEATURE: Introduce an optimized style for category page (#29239)
The new style is called `categories_only_optimized` and it is designed
to show only the parent categories, without any subcategories. This
works best for communities with many categories (over a thousand).
2024-10-24 13:46:42 +03:00
Jarek Radosz
ab7547eb7a
DEV: Clean up d-toggle-switch (#29385)
move the template to the bottom, inline `checked`, remove unnecessary `template-lint-disable`
2024-10-24 01:38:55 +02:00
Ella E.
98a3e7d6e2
UX: Consistent styling for admin tables on mobile (#29360)
* UX: Apply admin table classes for consistent mobile styling on custom flags

* UX: Apply admin table classes for consistent mobile styling on custom flags

* UX: Apply admin table classes for consistent mobile styling on backups

* UX: Apply admin table classes for consistent mobile styling on plugins list

* DEV: tweaks on admin table

* UX: Apply admin table classes for consistent mobile styling on chat plugin

* apply prettier

* apply lint

* DEV: removed commented out code

* DEV: removed unnecessary div element

* scroll to the element

* remove the workaround

* revert

* add an extra assertion

* add enabled check

* improve switching

* rm

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-10-23 16:26:21 -06:00
Kris
d57668a703
DEV: add "topic-list-heading-bottom" plugin outlet (#29377) 2024-10-23 17:54:31 -04:00
Krzysztof Kotlarek
2ec5c2c514
FIX: reword auto action type field for flags (#29361)
Simplified wording for `auto_action_type` flags.
2024-10-24 08:52:19 +11:00
dependabot[bot]
98bbfa72d5
Build(deps-dev): Bump @types/jquery in the types group (#29379)
Bumps the types group with 1 update: [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery).


Updates `@types/jquery` from 3.5.31 to 3.5.32
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 23:29:32 +02:00
David Taylor
b7f76d99e8
DEV: Delete unused rerender-on-do-not-disturb-change mixin (#29373)
This was used in the old header/user-menu implementation. It can now be removed
2024-10-23 17:16:08 +01:00
Isaac Janzen
87359cf7aa
DEV: Add typeClass to search AssistantItem (#29369)
When rendering the initial search options, we re-use the `AssistantItem` component. 

`AssistantItem` requires that you pass in the required params to define what _type_ of component it will be - category, tag, tag intersection, user, etc. This flexibility is nice, as we can just loop through all `@results` and pass in params, without having to predefine what _type_ of result it is. 

It is is not very good when it comes to seperating the html strucutre of each unique _type_. This is an example of the initial search results: 

<img width="408" alt="Screenshot 2024-10-23 at 9 04 18 AM" src="https://github.com/user-attachments/assets/46795697-6246-4b60-be18-fea200a57baa">

You can see that both categories **and** tags are being rendered. The HTML strcuture looks like so: 

```html
<ul class="search-menu-assistant">
  <li class="search-menu-assistant-item">
    <a class="search-link" href="#"> CATEGORY </a>
  </li>
  <li class="search-menu-assistant-item">
    <a class="search-link" href="#"> CATEGORY </a>
  </li>
  <li class="search-menu-assistant-item">
    <a class="search-link" href="#"> TAG </a>
  </li>
  <li class="search-menu-assistant-item">
    <a class="search-link" href="#"> TAG </a>
  </li>
</ul>
```

There is no way to differentiate between the types, even though some are categories and others tags.

This PR adds a _typeClass_ to each component, that will be a additional class included at the top level of the component HTML structure. 

```html
<ul class="search-menu-assistant">
  <li class="category search-menu-assistant-item">
    <a class="search-link" href="#"> CATEGORY </a>
  </li>
  <li class="category search-menu-assistant-item">
    <a class="search-link" href="#"> CATEGORY </a>
  </li>
  <li class="tag search-menu-assistant-item">
    <a class="search-link" href="#"> TAG </a>
  </li>
  <li class="tag search-menu-assistant-item">
    <a class="search-link" href="#"> TAG </a>
  </li>
</ul>
```
_See `.category` and `.tag` attached to each `search-menu-assistant-item`._ 

This will help us identify which _type_ it is, and allow devs to target and customize each element by _type_.
2024-10-23 09:47:45 -05:00
Jarek Radosz
a59c07fc45
Revert "DEV: Refactor composer-/topic-presence-display (#29262)" (#29368)
This reverts commit 38ab3f2349.
2024-10-23 16:26:08 +02:00
Jarek Radosz
38ab3f2349
DEV: Refactor composer-/topic-presence-display (#29262)
A followup to f05b984208

* modifiers to keep track of components' lifecycles, instead of did-insert/did-update/willDestroy
* proper glimmer-friendly tracking in related models
* caching
* `@outletArgs`
* gjs
2024-10-23 15:31:07 +02:00
David Taylor
c6c09db5b0
DEV: Refactor user-tip to avoid unneeded wrapper element (#29365)
We were using a modifier purely for its lifecycle hooks - not to modify an element. This commit switches to using a helper, which provides a similar lifecycle, but without needing to be attached to an element.
2024-10-23 13:36:04 +01:00
David Taylor
adef7081a2
DEV: Update uppy-image-uploader uppy mixin usage (#29366) 2024-10-23 12:20:18 +01:00
David Taylor
30eb00ac20
DEV: Update images-uploader uppy usage (#29341)
Also moves this component to the admin bundle. It is only used in the admin panel, and has dependencies on admin-specific i18n strings.
2024-10-23 10:08:09 +01:00
David Taylor
52016e4596
DEV: Update chat-composer-uploads uppy usage (#29339) 2024-10-23 10:07:54 +01:00
David Taylor
51a32de45e
DEV: Modernize uppy-backup-uploader component (#29342)
- remove uppy mixin
- convert to glimmer component
- use gjs authoring format
- move to admin bundle
2024-10-23 10:07:24 +01:00
Krzysztof Kotlarek
cd077ef93b
FIX: visual regression for new features (#29359)
Bug introduced in this PR https://github.com/discourse/discourse/pull/29244

When the experiment toggle button was introduced, new features did not look right when the toggle button was not available.

In addition, the plugin name can be an empty string. In that case, information about new features should be displayed.
2024-10-23 16:16:19 +11:00
Krzysztof Kotlarek
11b62847e7
FEATURE: mandatory fields for compact-list (#29357)
In this PR we introduced mandatory fields for `group-list` https://github.com/discourse/discourse/pull/26612

The same solution should apply to `compact-list`.
2024-10-23 16:16:08 +11:00
dependabot[bot]
fe795c503f
Build(deps-dev): Bump @swc/core from 1.7.36 to 1.7.39 (#29355)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.36 to 1.7.39.
- [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.7.36...v1.7.39)

---
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>
2024-10-23 01:36:46 +02:00
dependabot[bot]
3aaeedefc7
Build(deps): Bump @json-editor/json-editor from 2.15.1 to 2.15.2 (#29356)
Bumps [@json-editor/json-editor](https://github.com/json-editor/json-editor) from 2.15.1 to 2.15.2.
- [Changelog](https://github.com/json-editor/json-editor/blob/master/CHANGELOG.md)
- [Commits](https://github.com/json-editor/json-editor/compare/2.15.1...2.15.2)

---
updated-dependencies:
- dependency-name: "@json-editor/json-editor"
  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-10-23 01:36:39 +02:00
Kris
5aa32b4621
A11Y: add screenreader markup for category color pickers (#29351) 2024-10-22 18:38:13 -04:00
dependabot[bot]
5af6edba6f
Build(deps): Bump the babel group with 3 updates (#29352)
Bumps the babel group with 3 updates: [@babel/plugin-proposal-decorators](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-decorators), [@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/plugin-proposal-decorators` from 7.25.7 to 7.25.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.25.9/packages/babel-plugin-proposal-decorators)

Updates `@babel/core` from 7.25.8 to 7.25.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.25.9/packages/babel-core)

Updates `@babel/standalone` from 7.25.8 to 7.25.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.25.9/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/plugin-proposal-decorators"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
- 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-10-23 00:28:54 +02:00
dependabot[bot]
810177fcea
Build(deps-dev): Bump @types/qunit in the types group (#29353)
Bumps the types group with 1 update: [@types/qunit](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/qunit).


Updates `@types/qunit` from 2.19.10 to 2.19.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/qunit)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-23 00:28:45 +02:00
Kris
bca8e1dbc6
A11Y: Label site setting buttons (#29348) 2024-10-22 18:04:42 -04:00
Kris
4983fa6df7
A11Y: add aria-labels to sidebar footer buttons (#29347) 2024-10-22 18:04:36 -04:00
Jarek Radosz
6a9af7c82f
FIX: Show the last rendered user-tip (#29346)
…or a tip with the highest priority.

This regressed in 597ef11195 where we got rid of `next()` calls, so we'd render the first tip we encounter.

The commit also adds a test and updates existing ones.
2024-10-22 22:41:29 +02:00
Renato Atilio
5d1e67b3e1
DEV: refactor textarea text manipulation mixin (#29294)
Refactor of the TextareaTextManipulation from a Mixin to a native class
2024-10-22 17:20:11 -03:00
Osama Sayegh
72f57524b4
UX: Add link to /about in the about config page (#29345)
This commit changes the description for the about config page so it contains a link to the /about page itself for easy access when editing the page.
2024-10-22 21:35:01 +03:00
Jarek Radosz
b2167f7651
UX: Move "watching topic" user-tip to the other button (#29323)
Moves the user-tip from the topic-timeline notifications button to the one at the bottom of the topic page.

Three reasons:
1. new users are more likely to use the button that has the full text (and description) rather than the icon-only one
2. we hide the timeline button when scrolled all the way to the bottom of the page, and then the tip doesn't seems to be attached to anything
3. we might be removing the timeline button altogether in the near future
2024-10-22 18:54:18 +02:00
Jarek Radosz
f45559a8b3
DEV: Add priority to post menu user-tip (#29322)
…and spread out existing priorities
2024-10-22 18:51:19 +02:00
Osama Sayegh
91c674f0bc
FIX: Prevent 'NaN' display by hiding visitor stats on /about until they're ready (#29334)
The visitor stats on the /about page were previously showing as `NaN` immediately after enabling the `display_eu_visitor_stats` site setting because the stats for the /about page are cached and updated once every 30 minutes in a sidekiq job. The `NaN` would go away upon the next run of the relevant sidekiq job, but it's not good UX to display a cryptic `NaN` until the job runs. So, this commit ensures that the visitor stats is not displayed at all until the visitor stats is calculated and available.

Internal topic: t/128480.
2024-10-22 19:29:44 +03:00
David Taylor
856182c7c6
DEV: Update emoji-uploader uppy usage (#29340)
Also moves this component to the admin bundle. It is only used in the admin panel, and has dependencies on admin-specific i18n strings.
2024-10-22 17:07:16 +01:00
Keegan George
cf44502cdf
DEV: Improvements to auto grid images (#29317)
This PR is a follow-up to ea1473e532. When we initially added the experimental feature for automatically adding `[grid]` to images, we add the [grid] surrounding images after all the uploads have been completed.

This can lead to confusion when `[grid]` is delayed to be added in the composer, as users may try to add grid manually leading to breakage. This also leads to issues with Discourse AI's automatic image caption feature.

**In this PR**: we simply move the logic to be added when the images are uploaded and processing. This way, `[grid]` surrounding images is added immediately. We also apply a fix for an edge-case to prevent images from being wrapped in `[grid]` when they are already inside `[grid]` tags.
2024-10-22 06:53:09 -07:00
Jan Cernik
4254a686d5
FIX: Bring back the login-required page for fullpage login (#29316) 2024-10-22 10:05:23 -03:00
David Taylor
ad39688afa
DEV: Update avatar-uploader uppy usage (#29281) 2024-10-22 13:52:32 +01:00
Jarek Radosz
e27e89fbfb
DEV: Deprecate the unused version of debounce (#29324) 2024-10-22 11:34:57 +02:00
Jarek Radosz
b9ec9c7e4f
DEV: Update more asserts to qunit-dom (#29326)
regex find&replace + removing now-unused imports + manually fixing incorrect css selectors (that now got flagged 😌) + manually updating selectors that relied on jq
2024-10-22 11:34:23 +02:00
chapoi
f9d86686ae
UX: DMenu modal add grip and min-height (#29309)
* UX: add min-height to DMenu modal

* UX: add grip handle
2024-10-22 11:22:20 +11:00
Krzysztof Kotlarek
433fadbd52
FEATURE: allow admins to enable announced experimental features (#29244)
Toggle the button to enable the experimental site setting from "What's new" announcement.

The toggle button is displayed when:
- site setting exists and is boolean;
- potentially required plugin is enabled.
2024-10-22 10:56:58 +11:00
Krzysztof Kotlarek
644e6c7f46
FEATURE: auto_action_type field for flags (#29306)
Allow admins to specify if the flag should be `auto_action_type`. If yes, then when an admin flags a post,  it is automatically actioned.

Meta: https://meta.discourse.org/t/allow-creation-of-custom-flags-which-auto-hide-content-similar-to-spam-and-inapproriate/329894
2024-10-22 10:56:31 +11:00
dependabot[bot]
08911eac8f
Build(deps): Bump ace-builds from 1.36.2 to 1.36.3 (#29319)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.36.2 to 1.36.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.36.2...v1.36.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>
2024-10-22 00:00:36 +02:00
Keegan George
ea1473e532
FEATURE: Automatically grid images when 3 or more image uploads (#29260)
This PR adds the feature where three or more image uploads in the composer will result in the images being surrounded by `[grid]` tags. This helps take advantage of the grid feature (https://github.com/discourse/discourse/pull/21513) and display images in a more appealing way immediately after upload.
2024-10-21 11:15:24 -07:00
Jarek Radosz
481d0645a9
DEV: Convert topic-notifications-button to gjs (#29237) 2024-10-21 17:34:56 +02:00
David Taylor
43a0ea876a
DEV: Update watched-word-uploader uppy usage (#29280) 2024-10-21 15:09:14 +01:00
David Taylor
4dabdd38db
DEV: Update create-invite-uploader uppy usage (#29282) 2024-10-21 14:42:48 +01:00
David Taylor
be5b35071b
DEV: UppyUpload improvements (#29279)
These tweaks will help adoption of the non-mixin-based uppy patterns.

- Add `type:`  to default arguments list
- Update pick-files-button to support explicit element registration
- Make `cancelSingleUpload` a public API, and add `cancelAllUploads`
- Remove `isDestroyed` logic - it doesn't do anything outside a component
- Add `@bind` to `setup()`
- Allow `additionalParams` to be a function
- Fix `autoStart` mixin shim
2024-10-21 13:00:54 +01:00
Osama Sayegh
a5497b74be
UX: Simplify invite modal (#28974)
This commit simplifies the initial state of the invite modal when it's opened to make it one click away from creating an invite link. The existing options/fields within the invite modal are still available, but are now hidden behind an advanced mode which can be enabled.

On the technical front, this PR also switches the invite modal to use our FormKit library.

Internal topic: t/134023.
2024-10-21 13:11:43 +03:00
Ted Johansson
b1321b985a
DEV: Allow enabling safe-mode even when missing required fields (#29310)
When a user is missing required fields, they are required to fill those up before continuing to interact with the forum. This applies to admins as well.

We keep a whitelist of paths that can still be visited in this mode: FAQ, About, 2FA setup, and any admin route for admins.

We concluded that admins should still be able to enable safe mode even with missing required fields. Since plugins etc. can potentially mess with the ability to fill those up.
2024-10-21 17:11:43 +08:00
Ted Johansson
6f55457652
DEV: Don't ask admin to re-confirm 'for all users' when requirement didn't change (#29307)
When adding or updating a custom user field to apply to all users (retroactively) we want to alert the admin that this will force all existing users to fill up the field before they are able to access the forum again.

However, we currently show this prompt when making changes only to other attributes on the custom field, i.e. the requirement hasn't changed.

This commit fixes that.
2024-10-21 14:37:46 +08:00
chapoi
a017b60879
UX: DMenu list buttons default styling (#29250) 2024-10-21 05:05:38 +02:00
David Taylor
007a8dabf3
FIX: create-invite-uploader following uppy-upload mixin changes (#29278)
This component will soon be updated to remove the mixin entirely (and add a regression test for it). But for now, this is a quick fix to get it working again.
2024-10-18 12:44:13 +01:00
Joffrey JAFFEUX
fdd4804a8d
FIX: do not overrider trigger when equals 0 (#29269)
This commit is fixing the path which sets a default value to trigger. We were doing `if (!this.model.trigger)` but `this.model.trigger` can have `0` as value, which would trigger this codepath and this codepath was setting the first value of `badgeTriggers` as a default value for trigger.
2024-10-18 08:34:34 +09:00
Bianca Nenciu
c1f078cacf
FIX: Make subcategories page more like categories (#29240)
The subcategories page was not paginated and it was using the
subcategory style from the category settings. The same page style should
be used for categories and subcategories page.
2024-10-17 19:47:53 +03:00
David Taylor
4bb9e0e8c9
DEV: Correct link in uppy-debugging warning message (#29256)
Followup to 06d32a8a
2024-10-17 15:30:18 +01:00
Sam
c08c40dc23
FEATURE: theme_modifiers can depend on theme settings (plus serialize_post_user_badges) (#29227)
Theme modifiers can now be defined as theme settings, this allows for
site operators to override behavior of theme modifiers.

New syntax is:

```
{
    ...
   "modifiers": {
      "modifier_name": {
         "type": "setting",
         "value": "setting_name"
      }
   }
}
```

This also introduces a new theme modifier for serialize_post_user_badges. Name of badge must match the name of the badge in the badges table. The client-side is updated to load this new data from the post-stream serializer.

Co-authored-by: David Taylor <david@taylorhq.com>
2024-10-17 15:16:16 +01:00
David Taylor
7b8ebebe93
DEV: Fix regression in uppy-mixin (#29252)
This API change was unintentionally introduced in 06d32a8a89

Partially reverts 23d90ecb26, but keeps the new specs.
2024-10-17 10:38:19 +01:00
Ted Johansson
34259f8735
FIX: Add back user custom field plugin outlet that was accidentally removed (#29247)
When converting the user custom fields admin form in #29070, I accidentally removed the plugin outlet after-admin-user-fields. This is used by the discourse-authentication-validations plugin, which is now broken on main core.

This commit adds back the plugin outlet in core.
2024-10-17 13:06:55 +08:00
dependabot[bot]
260907c37b
Build(deps): Bump terser from 5.34.1 to 5.36.0 (#29242)
Bumps [terser](https://github.com/terser/terser) from 5.34.1 to 5.36.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.34.1...v5.36.0)

---
updated-dependencies:
- dependency-name: terser
  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-10-16 23:41:58 +02:00
Kris
da571b6ac5
DEV: add before and after mobile categories outlet (#29238) 2024-10-16 16:30:19 -04:00
Jordan Vidrine
f28f82f99e
UX: Multiple fixes to theme card rendering (#29225)
* Improvements, refactors, remove dead code

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-10-16 11:13:36 -05:00
Isaac Janzen
67b6997306
DEV: Add SearchMenu::Results::Assistant plugin outlets
Add plugin outlets for each assistant result type - User, Tag and Categories, Groups, etc. This gives us the ability to add content for each _type_ of search suggestion: 

<img width="216" alt="Screenshot 2024-10-16 at 10 01 09 AM" src="https://github.com/user-attachments/assets/fbbc71fe-a8fe-499b-8377-480dd0ed5f75">

I would have preferred to add a single plugin outlet at the top of the template and pass `this.suggestionType` and `@results`, but that would then require that we carry over a ton of core logic to plugins to calculate which _type_ is being rendered, and it would get unnecessarily messy quick. So instead I opted to create a plugin outlet for each _type_.
2024-10-16 10:46:15 -05:00
Natalie Tay
4aa923aab1
FIX: Support add_directory_column in glimmered table header toggle (#29231)
#29209 introduced a bug where columns to the directory added via add_directory_column are not being translated properly.

This fixes the issue and adds an integration test.
2024-10-16 21:49:01 +08:00
David Taylor
8ee872f7e5
DEV: Modernize tags-uploader component (#29215) 2024-10-16 11:54:59 +01:00
David Taylor
06d32a8a89
DEV: Refactor uppy component mixins into standalone classes (#28710)
This commit replaces all uppy-related mixins with standalone classes. The main entrypoint is now lib/uppy/uppy-upload.js, which has a list of its config options listed at the top of the file. Functionality & logic is completely unchanged.

The uppy-upload mixin is replaced with a backwards-compatibility shim, which will allow us to migrate to the new pattern incrementally.
2024-10-16 11:15:19 +01:00