Commit Graph

57519 Commits

Author SHA1 Message Date
Gary Pendergast
5da6a06ce3
UX: Use DPageHeader on the Emails page (#30781)
There are a few changes here to make the Emails admin page more consistent with the rest of the admin UI.

- The header and navigation menu have been updated.
- The sidebar now stays highlighted when visiting the email admin sub-pages.
- Moved the Template editor from /admin/customize/email_templates to /admin/email/templates, so it fit as a sub-page.
- Removed the link to the Template editor from the Customize section of the old top menu, since it's accessible from the Emails section, instead.
2025-01-15 15:36:16 +11:00
Gary Pendergast
698e7a17dd
UX: Use DPageHeader on the Site Settings page (#30783)
Update the header of the admin Site Settings page to be more consistent with the rest of the admin UI.
2025-01-15 15:19:11 +11:00
Martin Brennan
125e686bf2
FIX: Do not allow_any on fonts site_settings (#30780)
Both heading_font and body_font should not allow
additional user-defined values, these are lists with
predefined choices. The UI already prevents this
because the font selector dropdown is unique, but
we want to make sure the setting definition reflects
this too.
2025-01-15 14:13:34 +10:00
Martin Brennan
5bc522e836
FIX: Double trigger of close user menu (#30732)
When clicking the "new features" notification item for
admins that navigates to /whats-new, the user notification
menu was not closing. This was happening because inside
the UserMenu::Menu component, the `routeDidChange` event
was firing and calling `closeUserMenu()`, however this is already
called inside the `Header` component via `toggleHamburger()`.

This is _only_ happening for the "new features" notification
item, other items have already been destroyed and they do not get
the `routeDidChange` event. No idea why, but this fixes the issue
in a global way.
2025-01-15 10:38:08 +10:00
Penar Musaraj
73b28815e3
FIX: Safari on iOS crashes when pinch-zooming (#30779)
Not sure why, but it looks like this `z-index: -1` on the composer
causes iOS to crash super quickly when pinch zooming . This change was
introduced in 07e5f8907e and is not
strictly necessary, let's try removing.
2025-01-14 23:56:20 +01:00
dependabot[bot]
e600ef02a0
Build(deps): Bump stackprof from 0.2.26 to 0.2.27 (#30777)
Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.26 to
0.2.27.
-
[Changelog](https://github.com/tmm1/stackprof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tmm1/stackprof/compare/v0.2.26...v0.2.27)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 23:38:09 +01:00
Kris
a94009a57d
UX: remove redundant text-decoration: none, follow up to 912b002 (#30775)
This redundant `text-decoration: none` was getting in the way of showing
a strikethrough on the deleted part of the diff

before ("new strike" at the bottom missing the strikethrough): 

![image](https://github.com/user-attachments/assets/4c04696a-efe8-4bb4-a7a7-cf10fcd4b443)


after (strikethrough appears correctly):

![image](https://github.com/user-attachments/assets/22a8c658-6600-47d4-a795-dc3116971485)
2025-01-14 16:33:09 -05:00
Mark VanLandingham
bad869dd81
DEV: Add div with className around Search no results header (#30774)
Another case of text node missing container with a selectable class.
2025-01-14 14:18:51 -06:00
David Taylor
0fcb832244
DEV: Setup deprecation workflow earlier (#30768)
In 0ed4b09527, this code was moved into
app.js, which means it actually ends up running after all the other
imports have been completed. That's too late, and some deprecations are
triggered before that.

This commit moves `setupDeprecationWorkflow` back into its own module,
with a 'side effect only' import from `app.js`.
2025-01-14 20:17:13 +00:00
Kris
912b002dcc
UX: show strikethrough, underline in post edit diff (#30773)
Reported here:
https://meta.discourse.org/t/strike-through-text-is-not-rendered-in-diff/347101

`text-decoration: none` needs a few exceptions here to avoid stripping
out styling that's present in posts


before (strikethrough and underline stripped): 

![image](https://github.com/user-attachments/assets/ecb8cdee-e04b-463f-93a3-16d92797f0cd)


after: 

![image](https://github.com/user-attachments/assets/b250c535-de2f-429a-8764-5a60e74ef953)
2025-01-14 15:00:12 -05:00
Mark VanLandingham
c25e53db7e
FIX: Full page search result infinite scroll with added results (#30771) 2025-01-14 13:23:08 -06:00
Mark VanLandingham
1b19bf690a
DEV: Wrap full page search 'no results' container in div (#30770)
We had no container, this allows folks to customize the styling :)
2025-01-14 13:14:55 -06:00
Discourse Translator Bot
496a739788
Update translations (#30765) 2025-01-14 16:19:49 +01:00
Mark VanLandingham
a89086f799
DEV: Add per_page as public param for TopicQuery (#30716)
This change allows controllers that construct TopicQuery parameters, to pass per_page into the TopicQuery constructor as an option. I can't see why this shouldn't be a public param, so long as we properly validate the value!

Internal discussion at t/145686.
2025-01-14 09:19:19 -06:00
Jarek Radosz
473e37e7b3
Revert "Build(deps-dev): Bump glob from 10.4.5 to 11.0.1 (#30710)" (#30767)
This reverts commit f8c493f3c4.
2025-01-14 15:32:50 +01:00
Renato Atilio
eb64db828e
DEV: move d-composer-position to setupEditor (#30717)
Small refactor to move the `DComposerPosition` component to be a
function used on the `setupEditor` editor lifecycle, so it's
recycled/re-added whenever the editor component is mounted.

Additionally, we reference the passed `editor` instead of the
`event.target`, allowing a `contentEditable` editor (which is a DOM
tree) to still work with the positioning hack.
2025-01-14 10:28:46 -03:00
Kris
7330cfa76a
UX: check category permission before new topic quote (#30753)
Reported here:
https://meta.discourse.org/t/quoting-a-closed-topic-prefills-category-in-composer-that-should-be-off-limits/260009

Currently, if someone tries to quote a topic they don't have permission
to reply to, we'll open a new topic composer with the quote so they can
"continue the discussion". When doing this, we populate the current
category, even if the user doesn't have permission to post in it.

This is misleading, as when the user attempts to submit their topic they
get an error because they lack the category permissions.

This change checks the category permissions before populating it.
2025-01-14 08:28:16 -05:00
dependabot[bot]
f8c493f3c4
Build(deps-dev): Bump glob from 10.4.5 to 11.0.1 (#30710)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.4.5 to 11.0.1.
-
[Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
-
[Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v11.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 13:47:05 +01:00
Jarek Radosz
6cb8b576d0
DEV: Modernize topic-status (#30754)
Deprecates `TopicStatusIcons`. Use "after-topic-status" plugin outlet instead.

Replaces both the widget and gjs header implementations with a new gjs topic-status component.
2025-01-14 13:46:14 +01:00
dependabot[bot]
12c412acc6
Build(deps): Bump @babel/standalone from 7.26.5 to 7.26.6 in the babel group (#30751)
Bumps the babel group with 1 update:
[@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.26.5 to 7.26.6
- [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.6/packages/babel-standalone)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 13:35:58 +01:00
Kelv
3e14f1c9f9
DEV: add FontAwesome 6 upgrade to deprecation warnings handler (#30760)
Our test suite now shows no deprecation counts from official
themes/plugins for the FA6 upgrade, and we've done a few rounds of
removing these in direct references & known settings, so it's time to
enable the admin banner.
2025-01-14 17:55:29 +08:00
David Battersby
33ea3599c2
FIX: prevent multiple requests when clicking drafts trigger (#30736)
Adds a loading state to prevent multiple requests when clicking the
drafts menu button.

We are also making a very slight adjustment to button spacing (needed
for both desktop and mobile).
2025-01-14 11:37:36 +04:00
Gary Pendergast
dbc9fbfd8b
UX: Use DPageHeader on the Components page (#30762)
This change updates the header of the admin Components page to be more consistent with the rest of the admin UI.

The Themes and Components pages share the same templates, so this change switches the header based on which tab is active.
2025-01-14 17:58:08 +11:00
Martin Brennan
19216d293b
UX: Getting started guide fixes (#30757)
* Remove checkboxes from the list of items, these are not dynamic based
on
things actually happening and it’s doubtful anyone else ever does it
manually
* Fix links to filtered site settings and make them go to /admin/config
pages
* Color scheme → palette
2025-01-14 16:10:03 +10:00
Ella E.
dff1327eba
UX: Remove flat icons from wizard step two (#30761)
### What's changed?
This PR removes the flat icons from wizard step 2, as they are not used
elsewhere in the wizard. Keeping the steps consistent with the existing
style improves visual alignment and avoids unnecessary elements.

### Before
<img width="511" alt="image"
src="https://github.com/user-attachments/assets/9e8b6f46-7c35-433b-9f5e-511579bc4768"
/>


### After
<img width="514" alt="image"
src="https://github.com/user-attachments/assets/028e52af-9777-4733-8ff4-1daab5b39e22"
/>
2025-01-13 23:04:42 -07:00
Gary Pendergast
36bbe0a0a6
UX: Use DPageHeader on the Themes page (#30759)
This change updates the header of the admin Themes page to be more consistent with the rest of the admin UI.
2025-01-14 17:00:15 +11:00
Ted Johansson
6b4aa1221c
DEV: Add problem check informing about admin layout deprecation (#30685)
We want to avoid surprises when we make the new admin sidebar baseline, so in addition to announcements, we're also adding a problem check that informs you if you don't have it enabled for any group yet.
2025-01-14 13:22:59 +08:00
Martin Brennan
e9fb4131ea
FIX: Add Type column to Flag Status CSV export (#30756)
This Type column is a special ":post" column on the
Flag Status report, so it did not show by default in
the CSV export of that report. This adds it so the
type of flag e.g. illegal, off topic, innapropriate
is shown in the CSV output.
2025-01-14 13:31:55 +10:00
Martin Brennan
dc0bf90069
UX: Apply admin UI guidelines to Reports pages (#30684)
Applies the admin UI guidelines from
https://meta.discourse.org/t/creating-consistent-admin-interfaces/326780
to the reports list and single report page for admins.


![image](https://github.com/user-attachments/assets/2431901f-0225-4658-b408-ab0865d022e6)

![image](https://github.com/user-attachments/assets/6f9e531b-8fec-405f-8429-151fd261ee2c)

---------

Co-authored-by: Ella <ella.estigoy@gmail.com>
2025-01-14 13:22:08 +10:00
dependabot[bot]
65dec020b8
Build(deps-dev): Bump @fortawesome/fontawesome-free from 6.6.0 to 6.7.2 (#30712)
Bumps
[@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome)
from 6.6.0 to 6.7.2.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
-
[Changelog](https://github.com/FortAwesome/Font-Awesome/blob/6.x/CHANGELOG.md)
-
[Commits](https://github.com/FortAwesome/Font-Awesome/compare/6.6.0...6.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 11:19:25 +08:00
Gary Pendergast
8c86676fcf
DEV: Revert the addition of keywords for all site settings. (#30755)
This is a revert of 92793c5b73.

Following on from discussions after the previous commit, it became evident that it was only a small step towards solving the larger problem of finding site settings in a reliable fashion across multiple languages.

This is going to take more thought and discussion, and since the changes  introduced in the previous commit are effectively non functional without additional work, I'm going to revert it for now.
2025-01-14 13:34:04 +11:00
Ella E.
9ce2ad14d1
FIX: Set fixed width for email group chooser dropdown to prevent resizing based on content (#30740)
This PR addresses an issue where the dropdown container width was
inconsistent, resizing based on its content.

**Changes included:**
- Added a fixed width for the dropdown container.
- Adjusted margin spacing by applying it to the `.identifier` class
instead of `.name`. This prevents awkward spacing when either contains a
large number of characters.

Internal topic: /t/143862
2025-01-13 19:00:09 -07:00
dependabot[bot]
d49d117ca2
Build(deps-dev): Bump lefthook from 1.10.3 to 1.10.4 (#30752)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.3
to 1.10.4.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
-
[Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/evilmartians/lefthook/compare/v1.10.3...v1.10.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 02:51:34 +01:00
dependabot[bot]
1e88a1a1c1
Build(deps-dev): Bump unicode-display_width from 3.1.3 to 3.1.4 (#30750)
Bumps
[unicode-display_width](https://github.com/janlelis/unicode-display_width)
from 3.1.3 to 3.1.4.
-
[Changelog](https://github.com/janlelis/unicode-display_width/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/janlelis/unicode-display_width/compare/v3.1.3...v3.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 02:50:50 +01:00
Kelv
f9af19bca9
DEV: remove viewingActionType mixin (#30692)
This removes the viewing action type mixin. It was previously setting a
property `userActionType` on the user controller but this property was
actually removed since https://github.com/discourse/discourse/pull/4771
(Mar 2017) and doesn't seem referenced anywhere else.

It also sets the same property on the user activity controller and this
is a 1-liner so I've opted to duplicate that across the routes that need
this.
2025-01-14 09:43:06 +08:00
Ruben Oussoren
fba1a483c1
FIX: Avoid loading reactions index when plugin is not installed (#30749)
Adding fix to avoid loading reactions indexes when plugin is not
installed
2025-01-13 17:35:22 -05:00
David Battersby
f9a000ff9f
UX: add placeholder title for drafts (#30747)
Adds a placeholder title for drafts that don't have a saved title.
2025-01-14 01:24:12 +04:00
David Taylor
461dcf44d0
DEV: Add topic-list-item-mobile-avatar wrapper outlet (#30743) 2025-01-13 20:10:37 +00:00
Penar Musaraj
11cc931a64
DEV: Improve composer positioning on tablets (#30745)
Followup to 07e5f89.

See report https://meta.discourse.org/t/-/346876
2025-01-13 15:04:06 -05:00
Kris
f23e196b4f
UX: Switch button focus state to focus-visible (#30744)
From https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible:

> The :focus-visible pseudo-class applies while an element matches the
[:focus](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus)
pseudo-class and the UA ([User
Agent](https://developer.mozilla.org/en-US/docs/Glossary/User_agent))
determines via heuristics that the focus should be made evident on the
element. (Many browsers show a "focus ring" by default in this case.)

This change switches buttons over to `:focus-visible` which shouldn't
change much, except for situations where focus state may linger in cases
when it's not desired, like the tracking button here for example:


![image](https://github.com/user-attachments/assets/57aaa193-0960-4757-a461-47fdcca7de2a)


When using `focus-visible` the `focus` state is no longer visible after
a tap, but the focus state will still appear when using keyboard
navigation or assistive technology like VoiceOver, as seen here:


<img
src="https://github.com/user-attachments/assets/62398532-3e05-4979-91a4-d3ddeb4758cb"
width="300" />
2025-01-13 14:05:51 -05:00
Sérgio Saquetim
828c646aab
DEV: Add latest-topic-list-item-class value transformer (#30718)
Add transformer to enable adding classes to the component `LatestTopicListItem`
2025-01-13 15:39:00 -03:00
David Taylor
d2ee0609a6
DEV: Remove discourse-common package (#30741)
All modules have now been migrated to `discourse/`
2025-01-13 16:01:51 +00:00
David Taylor
acde5c4337
DEV: Enable discourse-common-imports eslint rule (#30742)
Applies the autofix, which caught a few places that were missed in the
original find/replace

See https://github.com/discourse/lint-configs/pull/91
2025-01-13 16:01:34 +00:00
Joffrey JAFFEUX
637a6d7928
DEV: before-panel-body outlet (#30739)
We already have after-panel-body outlet and I will need this one for
`*********-******`.
2025-01-13 16:54:04 +01:00
David Taylor
98fa42f2e2
DEV: Move discourse-common/config/environment to discourse/lib (#30738) 2025-01-13 15:29:26 +00:00
Ella E.
8535a8595c
FIX: Improve sidebar invite link highlight persisting, link tabbing and activation behavior (#30734) 2025-01-13 09:21:06 -06:00
David Taylor
5a565105c9
DEV: Move discourse-common/resolver to discourse/resolver (#30737)
`discourse-common` was created in the past to share logic between the
'wizard' app and the main 'discourse' app. Since then, the wizard has
been consolidated into the main app, so the separation of
`discourse-common` is no longer useful.

This commit moves `discourse-common/resolver` into `discourse/resolver`,
adds shims for the imports, and updates existing uses in core.
2025-01-13 14:08:25 +00:00
David Taylor
0ed4b09527
DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733)
`discourse-common` was created in the past to share logic between the
'wizard' app and the main 'discourse' app. Since then, the wizard has
been consolidated into the main app, so the separation of
`discourse-common` is no longer useful.

This commit moves `discourse-common/(lib|utils)/*` into
`discourse/lib/*`, adds shims for the imports, and updates existing
uses in core.
2025-01-13 13:02:49 +00:00
Jarek Radosz
b28fafd372
DEV: Fix job serialization warnings (#30735)
(…and remove extraneous `stringify_keys` - enqueue already does
`deep_stringify_keys`)

The warning in question:

```
Deprecation notice: Jobs::RunProblemCheck was enqueued with argument values which do not cleanly serialize to/from JSON. This means that the job will be run with slightly different values than the ones supplied to `enqueue`. Argument values should be strings, booleans, numbers, or nil (or arrays/hashes of those value types). (deprecated since Discourse 2.9) (removal in Discourse 3.0)
```
2025-01-13 13:35:40 +01:00
Régis Hanol
1f483f48a0
FIX: remove complicated 'chat_duplicate_message_sensitivity' site setting (#30516)
And change the "formula" to check for duplicate messages to

- no duplicate check in 1:1 DMs
- only duplicate check in group DMs / channels, for posts made by the
same user, in the past 10 seconds

Internal ref - t/144262
2025-01-13 12:32:51 +01:00