Commit Graph

24032 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
cbc0ece6e8
DEV: <DSelect /> (#30224)
`<DSelect />` is a wrapper similar to our existing `<DButton />` over the html element `<select>`. The code is ported from form kit which is now directly using `<DSelect />`. Note this component has also been used in edit topic timer modal.

This component is recommended for a small list of text items (no icons, no rich formatting...).

Usage:

```gjs
<DSelect class="my-select" @onChange={{this.handleChange}} as |select|>
  <select.Option @value="foo" class="my-favorite-option">Foo</select.Option>
  <select.Option @value="bar">Bar</select.Option>
</DSelect>
```

This commit comes with a set of assertions:

```gjs
import dselect from "discourse/tests/helpers/d-select-helper";
import { select } from "@ember/test-helpers";

assert
  .dselect(".my-select")
  .hasOption({ value: "bar", label: "Bar" })
  .hasOption({ value: "foo", label: "Foo" })
  .hasNoOption("baz");

await select(".my-select", "foo");

assert.dselect(".my-select").hasSelectedOption({value: "foo", label: "Foo"});
```
2024-12-13 10:40:06 +01:00
Martin Brennan
fae6ffcf06
UX: Introduce <DStatTiles /> component (#30238)
Introduces a new component used to show a grid of stats
on any page, mostly used for dashboards and config pages.
This component yields a hash with a `Tile` component property,
and the caller can loop through their stats and display them
using this component.

Each stat needs a @label and a @value at minimum, but can
also pass in a @tooltip and a @url.
2024-12-13 11:32:46 +10:00
Amanda Alves Branquinho
462e613c08
FIX: pass correct arg to outlet (#30159)
* Fix:pass correct arg to outlet

* Update app/assets/javascripts/discourse/app/components/small-user-list.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-12-12 21:49:22 -03:00
Sérgio Saquetim
c9247cde29
DEV: Only print console message about the Glimmer post menu once (#30255) 2024-12-12 20:40:52 -03:00
Jan Cernik
96417592a3
FIX: Show validation error on confirmation user fields (#30232)
* FIX: Show validation error on confirmation user fields

* test
2024-12-12 18:45:28 -03:00
Sérgio Saquetim
c3e7d97048
DEV: Switch the glimmer post menu to auto and unsilence deprecations (#30161)
This commit starts the rollout of the Glimmer post menu:

- default to `auto`: after the upgrade, it will be enabled on all discourse instances that do not have incompatible customizations

- unsilence the deprecation messages in the console

- removes the setting `glimmer_post_menu_groups` as it's no longer in the test phase
2024-12-12 18:27:02 -03:00
Sérgio Saquetim
6fa52a6499
DEV: Improve tests and fixes small issues in the Glimmer Post Menu (#30234)
This commit improves some tests to using both the glimmer post menu and the widget version.

It also addresses some small issues in the Glimmer Post Menu:

- Deprecated Font Awesome icon in the Edit button
- Set correctly `aria-pressed` in the Like Count when the list of people who liked is visible
- Display the user tip for the Show More button
2024-12-12 15:36:05 -03:00
Régis Hanol
1791abab25
FIX: replace dropdown with button when there's only one option (#30242)
On mobile, in the topic footer buttons, instead of showing all the
buttons, we "merge" some of then into a dropdown.

If the dropdown has only one "option", then it doesn't make sense to
show the "ellipsis" button. Instead, we directly show the button of the
only available option. Saving a click on the way.
2024-12-12 17:56:30 +01:00
Arpit Jalan
357189d9e7
DEV: add plugin outlets to accommodate customizations (#30222)
* DEV: add plugin outlets to accommodate customizations

* add the same outlet in glimmer file
2024-12-12 21:27:45 +05:30
Régis Hanol
b74007db0a
FIX: restore zero-width space character... (#30243)
... that got **wrongly** (my bad) removed in 6ef0b5d508
2024-12-12 16:10:01 +01:00
chapoi
ee567165f1
UX: increase button sizes and timeline size (#30240)
* UX: increase button sizes and timeline size

* UX: bring back tracking btn on topic timeline desktop

* Scope flexing topic-navigation area to mobile + make all buttons same font-size
2024-12-12 16:09:44 +01:00
dependabot[bot]
3ca7c5e438
Build(deps-dev): Bump @swc/core from 1.10.0 to 1.10.1 (#30187)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.10.0...v1.10.1)

---
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-12-12 14:06:57 +01:00
Martin Brennan
203f93bcaf
FIX: Background color for settings overriden filter (#30221)
This was fixed previously but must have regressed, we
are showing a darker grey background around the
"Only show overridden" checkbox for our Settings tab
in config pages.
2024-12-12 10:27:37 +11:00
Keegan George
9df7d6f9a0
UX: Make radio buttons respect forum's accent color (#30235)
Similar to 601780aadf, this change ensures radio buttons respect the forum's accent color. Visual color change only, as such no tests.
2024-12-11 15:22:00 -08:00
Kris
9f68b037d4
UX: fix PM title editing layout (#30233) 2024-12-12 09:18:52 +11:00
Keegan George
601780aadf
UX: Make checkboxes respect forum's accent color (#30231)
This change ensures checkboxes respect the forum's accent color. Visual color change only, as such no tests.
2024-12-11 12:55:22 -08:00
Keegan George
c9119099a9
FIX: Regression allowing async calls to finish before removing uploads (#30230)
This PR fixes a recent regression in e37952c9db that reverted a fix made in 1c4d5dae1c, which allowed for async calls to finish first before removing in progress uploads.
2024-12-11 10:35:46 -08:00
Kris
02eca6e489
UX: add header-categories-wrapper outlet (#30214) 2024-12-11 11:17:43 -05:00
Kris
aabf174ac8
UX: fix admin sidebar header width (#30226) 2024-12-11 11:09:27 -05:00
Sérgio Saquetim
1505978586
DEV: Upgrade dependencies to Ember 5.12 (#30131) 2024-12-11 11:09:25 -03:00
Régis Hanol
6ef0b5d508
Cleanup mobile topic footer area (#30132) 2024-12-11 14:59:37 +01:00
David Taylor
e2dcb71c11
DEV: Fixup verbose localization method name (#30208)
Followup to e5a2ed596c
2024-12-10 17:30:36 +00:00
David Taylor
e5a2ed596c
DEV: make verbose localization work without mutating I18n.t (#30205)
We now extensively reference the `{ i18n }` named export of the `discourse-i18n` package, instead of calling `I18n.t` directly. That means that mutations of `I18n.t` no longer have any impact on most of the app.

This commit updates the verbose localisation logic to be switched by a boolean instead of a method mutation.
2024-12-10 15:46:36 +00:00
Penar Musaraj
0affb5c0bc
FIX: Composer position on DiscourseHub iOS (#30204)
Ensures composer does not go out of view after adding an upload.
2024-12-10 09:42:20 -05:00
zogstrip
aaec80413d FIX: fast edit with a typographic character
When a post containing an apostrophe (') is being cooked, the apostrophe is being converted to the "typographic" version (’) (because we enable markdown-it's **typographer** mode by default in Discourse)

When you select text that contains such apostrophe and then try to save your fast edit, it fails miserably without any error.

That's because when you select text from the DOM, it uses the cooked version which has the typographic apostrophe.

When you save your fast edit, we fetch the raw version of the post, which has the "regular" apostrophe. Thus doing `raw.replace(selectedText, editedText)` doesn't work because `raw` has the regular apostrophe but `selectedText` has the typographic apostrophe.

Since it's somewhat complicated to handle all typographic characters, we would basically have to reverse the process done in `custom-typographer-replacements.js`, we instead bail out and show the composer when we detect such character in the selection.

Internal ref - t/143836
2024-12-10 12:13:10 +01:00
Sam
58e3e0cc4f
FEATURE: add support for "Flagged By" filter in reviewable (#30197)
Previous to this change there was no way to find all the flags
a user raised.

New filter allows you to find all the flags raised by a user.
2024-12-10 18:26:38 +11:00
Martin Brennan
cd8e03086f
UX: Copy for feature feed toggle (#30196)
Makes it so the result of toggling a new feature
feed item is clearer.
2024-12-10 16:24:15 +10:00
Krzysztof Kotlarek
51a5fa036a
UX: the ability to hide the admin header (#30175)
Some pages like new/edit item should not display admin header. New attribute called `@shouldDisplay` was added.

As a proof of concept, the flags page was updated.
2024-12-10 11:59:47 +11:00
Ella E.
d69edab611
FIX: Prevent experimental badge from splitting onto new lines with long titles (#30181)
This PR resolves an issue where the "Experimental" badge would break onto a new line when the title was too long, causing the badge text to separate from the icon. The fix ensures the badge text and icon remain aligned, even with longer titles.
2024-12-10 10:25:45 +10:00
Kris
b0a3017871
DEV: add transformers to navigation bar for theme dev (#30190) 2024-12-09 17:20:45 -05:00
Jan Cernik
ca0ea3d201
FIX: Improve name validation in the signup form (#30150) 2024-12-09 12:06:59 -03:00
Osama Sayegh
acc180611f
FEATURE: Add an option to block IPs and emails to bulk user delete (#29993)
This commit adds an option for blocking the IP and email addresses when bulk-deleting users.

Internal topic: t/140321/11.
2024-12-09 14:25:31 +03:00
Martin Brennan
5e86bc2f43
FIX: Allow anyone who can manage groups to see Automatic tooltip (#30174)
Followup 35ecd0335c

Since we have the moderators_manage_categories_and_groups setting,
more than admins can manage groups, so we need to allow others to
see this Automatic tooltip as well.

Also fixes an inconsistency with canManageGroup between the User
model and Group controller, the latter is correct, allowing management
of automatic groups if can_admin_group permission is true
2024-12-09 13:21:24 +10:00
Martin Brennan
4ddf7e61f9
UX: Move "What's new?" link in admin sidebar to root section (#30144)
This is so the link is more visible, instead of being
buried in the Account section.
2024-12-09 10:01:09 +10:00
Joffrey JAFFEUX
97e593bfbf
FIX: ensures sk can be scrolled on iOS in a modal (#30164)
The modal was disabling body scroll lock and select-kit collection was not whitelisted which was preventing users to be able to scroll a select-kit collection on iOS.
2024-12-09 09:53:22 +10:00
Krzysztof Kotlarek
5759d80091
FIX: correct breadcrumb for admin users page (#30173)
Omission and instead of `permlinks`, `users` title should be used.
2024-12-09 10:52:50 +11:00
dependabot[bot]
a10a5ccf75
Build(deps-dev): Bump qunit from 2.23.0 to 2.23.1 (#30168)
Bumps [qunit](https://github.com/qunitjs/qunit) from 2.23.0 to 2.23.1.
- [Release notes](https://github.com/qunitjs/qunit/releases)
- [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md)
- [Commits](https://github.com/qunitjs/qunit/compare/2.23.0...2.23.1)

---
updated-dependencies:
- dependency-name: qunit
  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-12-09 00:41:30 +01:00
dependabot[bot]
4b2e472d0b
Build(deps-dev): Bump express from 4.21.1 to 4.21.2 (#30167)
Bumps [express](https://github.com/expressjs/express) from 4.21.1 to 4.21.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.1...4.21.2)

---
updated-dependencies:
- dependency-name: express
  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-12-08 23:35:23 +01:00
dependabot[bot]
827f65b3d9
Build(deps-dev): Bump @ember/test-waiters from 3.1.0 to 4.0.0 (#30166)
Bumps [@ember/test-waiters](https://github.com/emberjs/ember-test-waiters) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/emberjs/ember-test-waiters/releases)
- [Changelog](https://github.com/emberjs/ember-test-waiters/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-waiters/commits)

---
updated-dependencies:
- dependency-name: "@ember/test-waiters"
  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-12-08 22:48:56 +01:00
Kelv
e55d4f0c5c
DEV: update deprecated icon names in themes-grid-card (#30162) 2024-12-08 22:18:55 +01:00
Kelv
0f2033dd69
DEV: Update more deprecated Font Awesome icon names (#30163)
* DEV: Update more deprecated Font Awesome icon names

* revert update to icon-library test - test is covering deprecation case
2024-12-08 22:14:28 +01:00
Sérgio Saquetim
b8325f2190
FIX: Recover user deleted post (#30145)
This commit fixes an issue where the recover button would not be displayed for a user delete post.
2024-12-06 15:47:57 -03:00
Régis Hanol
35ecd0335c
UX: only show automatic group tooltip to admins (#30155)
Follow up to #28630 which added the tooltip on automatic group.

It was missing a check to ensure the current user is an admin, since only admins can manage automatic groups.

Reported in https://meta.discourse.org/t/324215 by @moin-Jana
2024-12-06 15:43:03 +01:00
Kris
d35d8193aa
UX: fix PM topic map layout (#30135) 2024-12-06 08:34:54 -05:00
David Taylor
eaa45ae4d0
DEV: Update transformers in topic-list/item (#30105)
These will enable https://github.com/discourse/discourse-topic-thumbnails/pull/60
2024-12-06 10:08:10 +00:00
Martin Brennan
31abb0b59e
UX: Minor fix to admin what's new link (#30143)
Followup 9c4c17ad3f
2024-12-06 14:23:09 +10:00
Martin Brennan
9c4c17ad3f
UX: Change "What's new in Discourse?" link (#30140)
We want to point to our dedicated /admin/whats-new
page which is more focused and has better screenshots
and so on.
2024-12-06 10:11:18 +10:00
Jarek Radosz
13793a3d8e
DEV: Convert bookmark-icon to gjs/glimmer (#30136) 2024-12-05 23:58:43 +01:00
dependabot[bot]
06bc5256df
Build(deps-dev): Bump webpack from 5.97.0 to 5.97.1 (#30138)
Bumps [webpack](https://github.com/webpack/webpack) from 5.97.0 to 5.97.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.97.0...v5.97.1)

---
updated-dependencies:
- dependency-name: webpack
  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-12-05 23:52:02 +01:00
dependabot[bot]
2ae69a7cfd
Build(deps): Bump terser from 5.36.0 to 5.37.0 (#30139)
Bumps [terser](https://github.com/terser/terser) from 5.36.0 to 5.37.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.36.0...v5.37.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-12-05 23:18:45 +01:00