Commit Graph

22805 Commits

Author SHA1 Message Date
Martin Brennan
312a930ac8
UX: Disable plugin list settings button for some plugins (#27124)
For plugins with only an "enabled" site setting, it doesn't
make sense to take them to the site settings page, since the
toggle switch in the list can be used to change enabled/disabled.

This will not be the case for plugins that have their own custom
config page (like Automation), but we will deal with this when
we actually overhaul this plugin to use the new show page.

Also adds another rspec fixture of a test plugin.
2024-05-23 12:04:26 +10:00
dependabot[bot]
aa60dd8e29
Build(deps): Bump @embroider/addon-shim in the embroider group (#27142)
Bumps the embroider group with 1 update: [@embroider/addon-shim](https://github.com/embroider-build/embroider/tree/HEAD/packages/addon-shim).


Updates `@embroider/addon-shim` from 1.8.8 to 1.8.9
- [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/addon-shim)

---
updated-dependencies:
- dependency-name: "@embroider/addon-shim"
  dependency-type: direct:production
  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-05-23 00:32:09 +02:00
Joffrey JAFFEUX
4553bb1717
UX: reset idle on tab focus (#27139)
When users come back to a tab we should consider they are not idle anymore.
2024-05-22 22:13:08 +02:00
Keegan George
0d49571279
DEV: Make uppy markdown resolvers async/await (#27117) 2024-05-22 11:13:25 -07:00
Amanda Alves Branquinho
b0d95c8c78
FEATURE: Add bulk action to bookmark (#26856)
This PR aims to add bulk actions to the user's bookmarks.

After this feature, all users should be able to select multiple bookmarks and perform the actions of "deleting" or "clear reminders"
2024-05-22 12:50:21 -03:00
Jarek Radosz
4c10b2eb33
DEV: Fix home-logo test flakes (#27135) 2024-05-22 17:49:04 +02:00
Kris
24d701f058
UX: clean up email preference layout (#27136) 2024-05-22 11:47:50 -04:00
Jarek Radosz
24230e7461
DEV: Silence whitespace-eating-comment warnings (#27129)
e.g. `unexpectedly found "! no whitespace ~" when slicing source, but expected " no whitespace "`
See: https://github.com/emberjs/ember.js/issues/19392

Co-authored-by: David Taylor <david@taylorhq.com>
2024-05-22 16:21:51 +02:00
Joffrey JAFFEUX
88ebd4c11f
DEV: review follow up (#27128) 2024-05-22 10:33:05 +02:00
Régis Hanol
3d4d21693b
FIX: various revision history modal quirks (#27058)
- FIX: properly scope category changes to what the current user can see
- UX: previous category is now highlighted in "red", new category is highlighted in "green"
- PERF: no need to serialize the categories
- FIX: properly track wiki
- FIX: properly track post_type (aka. Staff Color)
- FIX: properly track making a topic a PM
- FIX: never show the category changes when a topic is made a PM
- PERF: post_revision serializer is now more leaner (never includes title changes when post_number > 1, never includes user changes if there aren't any)
- UX: always sort the tags by name
2024-05-22 10:09:20 +02:00
Joffrey JAFFEUX
52125d849f
FIX: correctly check for disabled notifications, tab and is idle (#27127)
This commit reuses the existing codepath in desktop-notifications and make it available to use to chat.

primaryTab was too hard to test if not impossible in this service test, however isIdle and disabled notifications are correctly tested.
2024-05-22 10:08:05 +02:00
Martin Brennan
3eb6fc058a
FEATURE: Use the new plugin show route from the plugin list (#27097)
Followup 4e7a75a7ec

Several plugins (Gamification, AI) now use the new
plugin show route. Any plugins that are using it can
now redirect to this page via the Settings button in
the plugin list, rather than taking the user to the
old site settings page filtered by category.
2024-05-22 11:34:12 +10:00
Jarek Radosz
4b29ab8572
DEV: Fix glimmer suggested topic item badges (#27123) 2024-05-22 03:06:45 +02:00
Sérgio Saquetim
48b74245b9
DEV: Add the user-dropdown-button__* plugin outlets (#27122) 2024-05-21 20:07:51 -03:00
Ella E
4334fc9bd3
UX: Change admin sidebar expand/collapse all icon (#27120) 2024-05-22 09:07:07 +10:00
Sérgio Saquetim
25060fbabd
DEV: Deprecate the user-dropdown header widget (#27118) 2024-05-21 19:51:42 -03:00
Kris
13a2ca8b09
UX: update px spacing to em for proportionality (#27108) 2024-05-21 13:13:38 -04:00
Jarek Radosz
ea7e6ea459
DEV: Add missing tr wrapper to glimmer topic-list-header (#27107) 2024-05-21 19:00:03 +02:00
Jarek Radosz
5678332ffb
DEV: Add td to the element helper list (#27106)
…so it uses the more performant glimmer/template-only component wrapper instead of falling back to an ember component wrapper. see the `element` helper PR for more details.
2024-05-21 18:59:50 +02:00
Kris
06f48a82ed
UX: switch post action buttons to inline-flex to avoid extra whitespace (#27110) 2024-05-21 11:58:15 -04:00
Kris
fbb0fb92d1
UX: search context box too dark (#27109) 2024-05-21 10:52:14 -04:00
Jarek Radosz
87769a83c4
DEV: Implement glimmer topic-list (#26743)
(experimental)

The initial implementation of glimmer topic-list and related components. Does not include new APIs and isn't compatible with existing customization. That's gonna come in future PRs.

Enabled by adding groups to `experimental_glimmer_topic_list_groups` setting.
2024-05-21 14:36:15 +02:00
Jarek Radosz
eb2df2b7d6
DEV: Clean up sidebar modals (#26999)
1. async/await
2. TrackedSet
3. don't rely on ember array methods
4. list used props
5. move stuff out of constructors
6. don't use ember's Input component
7. convert a function to a method (to avoid passing in a class prop)
8. add missing `@tracked`
9. remove tracking from props that don't need it (not used in templates)
2024-05-21 14:35:22 +02:00
Régis Hanol
fe12cfeab2
FIX: shows errors when converting to public is impossible (#27103)
Follow up to e04ac5e2d8 which missed showing the error messages in the "convert to public" modal 🤦‍♂️
2024-05-21 12:14:31 +02:00
Krzysztof Kotlarek
40d65dddf8
Revert "DEV: move post flags into database (#26951)" (#27102)
This reverts commit 7aff9806eb.
2024-05-21 16:21:07 +10:00
Krzysztof Kotlarek
7aff9806eb
DEV: move post flags into database (#26951)
This is preparation for a feature that will allow admins to define their custom flags. Current behaviour should stay untouched.
2024-05-21 13:15:32 +10:00
chapoi
1dcf756d78
UX: shorten duration of bookmark toasties (#27085) 2024-05-21 10:09:12 +10:00
chapoi
5c09792f79
UX: increase base font-size to 16px (#27087) 2024-05-20 21:08:20 +02:00
David Taylor
fb9a43c282
DEV: Introduce element helper (#27086)
Returns a wrapper component with the given tagname, or an empty wrapper for an empty string.
Similar to the reference implementation of RFC389, with higher-performance shortcuts for common elements.
2024-05-20 17:40:12 +01:00
David Taylor
23b02a3824
DEV: Introduce @dedupeTracked (#27084)
Same as `@tracked`, but skips notifying consumers if the value is unchanged. This introduces some performance overhead, so should only be used where excessive downstream re-evaluations are a problem.

This is loosely based on `@dedupeTracked` in the `tracked-toolbox` package, but without the added complexity of a customizable 'comparator'. Implementing ourselves also avoids the need for pulling in the entire package, which contains some tools which we don't want, or which are now implemented in Ember/Glimmer (e.g. `@cached`).
2024-05-20 15:59:30 +01:00
Martin Brennan
1239178f49
FEATURE: Introduce DBreadcrumbs components (#27049)
This commit introduces the following components:

* DBreadcrumbsContainer - The wrapper template-only component,
  which renders all DBreadcrumbsItem components on the page.
* DBreadcrumbsItem - The component that registers a LinkTo
  for the breadcrumb trail. The breadcrumb > trail > will
  show based on the order these items are rendered on the page.
* BreadcrumbsService - Manages the DBreadcrumbsContainer elements
  on the page via DBreadcrumbsContainerModifier.
* DBreadcrumbsContainerModifier - Handles registering DBreadcrumbsContainer
  elements with the BreadcrumbsService and deregistering them.

For now, we will only use these breadcrumbs in the admin section
of Discourse, and this initial commit only uses them in admin/plugins.

This is heavily based off of
https://github.com/Bagaar/ember-breadcrumbs,
but will be further modified for our needs.
2024-05-20 14:25:54 +10:00
Martin Brennan
f2cdc3b2a4
FIX: Take into account language fallbacks for admin sidebar plugin links (#27061)
This commit fixes an issue where I18n.lookup was being used to
check if a link had a valid I18n key when the `addAdminSidebarSectionLink`
plugin API was used. However this was imperfect -- usually when we do
`I18n.t`, we fall back to the default locale (`en`), but if
`I18n.lookup` is used we do not do this, so we were removing the link
needlessly.

This issue was identified via the plugin API's use in https://github.com/discourse/docker_manager

c.f. https://meta.discourse.org/t/new-admin-sidebar-wheres-the-update-discourse-button/308213/15?u=martin
2024-05-20 09:41:53 +10:00
dependabot[bot]
7f6b3c56cf
Build(deps-dev): Bump sass from 1.77.1 to 1.77.2 (#27078)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.1 to 1.77.2.
- [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.1...1.77.2)

---
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-05-20 07:02:02 +08:00
Joffrey JAFFEUX
f752851030
FIX: mobile modal tweaks (#27073)
- removes `will-change: auto;` which is a performance hack which should be avoided and is probably causing more harm than good here
- lowers swipe velocity to 0.4 to ensure the modal can be dismissed with the thumb
- uses JS CSS animate API to animate the backdrop opacity
- uses the height of the modal container to have more precise values when computing backdrop opacity
- animate the modal container instead of the wrapper
- removes a useless template-lint-disable directive
- simplify the closing animation
- various small code tweaks to limit indirection
2024-05-19 15:43:03 +02:00
carson chang
875a413164
A11Y: Add aria-label to menu tabs (#27071)
* Update menu-tab.hbs

* Update menu-tab.hbs

* linting
2024-05-18 08:39:25 -07:00
Penar Musaraj
a1843104dd
FIX: Broken link to theme in customize colors page (#27069)
This regressed in https://github.com/discourse/discourse/pull/26644
2024-05-17 15:04:12 -06:00
Sérgio Saquetim
501781c2e5
DEV: Add the registerHomeLogoHrefCallback plugin API (#27056)
The `registerHomeLogoHrefCallback` API allows setting a callback function that specifies the URL used in the home logo.
2024-05-17 13:06:47 -03:00
Bianca Nenciu
f5a0da6eba
FIX: Simplify navigation to subcategories page (#27053)
Navigation to subcategories page was possible through the category drop
and the "view all" link or through the category drop from the categories
page. This commit removes the latter method.

Follow up to commit 77b032c2b5.
2024-05-17 13:16:44 +03:00
Sérgio Saquetim
17add599e3
DEV: Add new plugin outlets in the header/topic/info component (#27038)
* Add header-topic-info__before and header-topic-info__after outlets
2024-05-16 19:29:44 -03:00
Jean
63b7a36fac
FEATURE: Extend embeddable hosts with Individual tags and author assignments (#26868)
* FEATURE: Extend embeddable hosts with tags and author assignments
2024-05-16 15:47:01 -04:00
Bianca Nenciu
77b032c2b5
FEATURE: Filter with CategoryDrop on category page (#26689)
Using the CategoryDrop on the categories page redirected the user to the
"latest topics" page with topics only from that category. With these
changes, selecting a category will take the user to a "subcategories
page" where only the subcategories of the selected property will be
displayed.
2024-05-16 10:45:13 +03:00
dependabot[bot]
2a63374887
Build(deps-dev): Bump sinon from 17.0.2 to 18.0.0 (#27039)
Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.2 to 18.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.2...v18.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 09:01:38 +08:00
Isaac Janzen
33871c4830
DEV: Add disabled attribute to form templates (#27033) 2024-05-15 11:40:51 -06:00
Bianca Nenciu
2b5e0bca53
FIX: Async load category for composer (#27004)
Categories are loaded in the composer via the category chooser, but
that only loads a subset of the fields. With these changes, the category
will be loaded async to make sure that the template is updated.
2024-05-15 18:55:15 +03:00
Jarek Radosz
24c55d6797
FIX: Sidebar mode switching on subfolder (#27026) 2024-05-15 10:12:15 +02:00
Sérgio Saquetim
454a343188
DEV: Add plugin outlets on the user-dropdown/notifications component (#27025) 2024-05-14 21:40:38 -03:00
dependabot[bot]
9e40933d83
Build(deps): Bump ember-template-imports from 4.1.0 to 4.1.1 (#27024)
Bumps [ember-template-imports](https://github.com/ember-template-imports/ember-template-imports) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/ember-template-imports/ember-template-imports/releases)
- [Changelog](https://github.com/ember-template-imports/ember-template-imports/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-template-imports/ember-template-imports/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ember-template-imports
  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-05-15 02:27:59 +02:00
Jarek Radosz
d112a49cc5
FIX: Incorrect user menu title/alt (#27019) 2024-05-14 15:46:11 +02:00
Osama Sayegh
722d694305
UX: Use a different JIT message when there are no search results in the users directory (#27009)
This commit adds a different message to the users directory (`/u`) that's shown when there are no results for the search term instead of showing the one for when there are no users on the site yet.

Internal topic: t/126076.
2024-05-14 16:07:45 +03:00
Régis Hanol
941d0f1cf5 FIX: sorting user topics lists
Sorting a topics list in user activities wasn't working because the query parameters weren't passed to `findFiltered()` that does the request to the server.

Made the `sortIcon` more resilient to "input" by always converting the value to a string and checking against `"true"`.

Moved `cleanNullQueryParams()` inside `findFiltered` so we're always removing `null` query parameters.

Internal ref - t/127068
2024-05-14 14:40:49 +02:00