20505 Commits

Author SHA1 Message Date
Jarek Radosz
56f9a174fc
DEV: Remove unused tag-drop-link component (#30849) 2025-01-18 10:48:42 +01:00
David Taylor
cf0a4a7e11
DEV: Detect overrides of topic-list and topic-list-item templates (#30847)
New topic-list should not be auto-enabled in this case
2025-01-17 16:23:18 +00:00
Joffrey JAFFEUX
f8d5a7873a
UX: makes smile the default emoji-picker icon (#30843)
discourse-emojis is used in chat only for message actions to show a
difference with the the other emojis so people don't think it's just the
smiley emoji.
2025-01-17 12:29:18 +01:00
Régis Hanol
359bbbe617
FIX: relative links in the insert hyperlink modal (#30842)
When trying to insert schemaless or relative links using the "insert
hyperlink modal" in the composer, the resulting link would be wrongly
prefixed with "https://"
2025-01-17 11:26:28 +01:00
Jarek Radosz
560c1875a5
DEV: Clean up ember configuration (#30833)
1. Add comments
2. Remove obsolete options: `historySupportMiddleware` (x2),
`exportApplicationGlobal` (x2), `_APPLICATION_TEMPLATE_WRAPPER`,
`_JQUERY_INTEGRATION`
3. Remove unused sections (dev, prod) from the test-only config
4. Add commented-out debug options to the "main" config
5. Copy options between configs for parity: `_DEFAULT_ASYNC_OBSERVERS`,
`LOG_ACTIVE_GENERATION`, `LOG_VIEW_LOOKUPS`
2025-01-17 10:39:21 +01:00
Ted Johansson
0718f940fa
DEV: Use RouteTemplate for admin API keys template (#30835)
This is a small clean-up PR that does the following:

- Convert api-keys.hbs to a RouteTemplate backed api-keys.gjs.
- Move the sub-page templates (index, show, new) into /api-keys sub-directory.
- Removes some styles that aren't used after the admin UI conversion.
2025-01-17 11:22:47 +08:00
Osama Sayegh
d964fbc550
DEV: Add home-logo-minimized transformer (#30832)
Similar to the `home-logo-href` and `home-logo-image-url` transformers,
this PR adds a new `home-logo-minimized` transformer to allow
plugins/themes to amend the default behavior of the header logo.

Internal topic: t/144688.
2025-01-17 03:38:42 +03:00
Krzysztof Kotlarek
ff815384b1
FIX: Expand the hidden post menu when one option is available. (#30831)
When only one option is available for the action menu, it should be
automatically expanded for the glimmer component.

This is the default behaviour for the old post menu:
https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/widgets/post-menu.js#L624
2025-01-17 11:30:16 +11:00
David Taylor
3389974563
DEV: Enable ember-template-imports sourcemaps (#30825)
This improves the developer experience, and also happens to workaround
https://github.com/embroider-build/content-tag/issues/92 in our
production builds.
2025-01-16 22:42:34 +00:00
Kris
f942599ce1
UX: improve the alignment of long status messages (#30830)
Before: 


![image](https://github.com/user-attachments/assets/77005641-2289-4296-8988-242c139a376d)

After: 


![image](https://github.com/user-attachments/assets/25889d78-7a5d-4097-9242-5cbd82e909ca)

Short message layout stays mostly unchanged: 


![image](https://github.com/user-attachments/assets/893a8f03-0e24-4e68-bc6b-2469eba0523c)
2025-01-16 17:22:37 -05:00
dependabot[bot]
1758d189ba
Build(deps): Bump ace-builds from 1.37.4 to 1.37.5 (#30829)
Bumps [ace-builds](https://github.com/ajaxorg/ace-builds) from 1.37.4 to
1.37.5.
- [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.37.4...v1.37.5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 23:18:15 +01:00
Krzysztof Kotlarek
029bd6feda
FEATURE: setting allowing tl0/anonymous flag illegal content (#30785)
The new site setting `allow_anonymous_and_tl0_to_flag_illegal` allows
tl0 users to flag illegal content. In addition, anonymous users are
instructed on how to flag illegal content by sending emails.

Also `email_address_to_report_illegal_content` setting is added. If not
provided, then the site contact email is used.
2025-01-17 08:57:44 +11:00
David Taylor
d3a7b99699
DEV: Relax 'unexpectedly found' matcher in deprecation-silencer (#30823)
We managed to find a slightly different way to trigger the same Ember
bug. This commit makes sure that's silenced as well.
2025-01-16 17:55:56 +00:00
Régis Hanol
5c6e96720b
New "user-preferences-tracking-topics" plugin outlet (#30821)
Adds the "user-preferences-tracking-topics" plugin outlet to allow the
`discourse-assign` plugin to add a new "notification level when
assigned" user preference.

There's also a new `customAttrNames` tracked property that allows
plugins to add new user option to be saved from this screen / plugin
outlet.

Also changed the text used for the "notification level when replying" to
match the one that is used for the "notification level when assigned" in
https://github.com/discourse/discourse-assign/pull/626.

## BEFORE

<img width="375" alt="image"
src="https://github.com/user-attachments/assets/178ba47e-f783-46d2-adae-28afec49b259"
/>

## AFTER

<img width="363" alt="Screenshot 2025-01-16 at 16 11 26"
src="https://github.com/user-attachments/assets/215e9f86-62f7-48ea-b665-72cbf28abd21"
/>

DEV: remove unused topic-tracking component
2025-01-16 17:58:43 +01:00
David Taylor
892d02fda1
DEV: Fix source-identifier for plugins when using .gz assets (#30820) 2025-01-16 15:33:28 +00:00
Penar Musaraj
1ae35ecce8
DEV: Remove isTablet capability (#30799)
Reverts 02113fc. 

This is an imperfect detection of tablets and more generally, we want to
move away from detecting specific devices. THere's a broader effort to
remove mobile/desktop detection and rely instead on viewport-width-based
patterns and feature detection (touch, hover, etc.). See
https://github.com/discourse/discourse/pull/30642

To reach the same results in CSS/jS, we can use the `touch` and `hover`
media queries.

In CSS, something like: 

```
@media (hover: none) {
  // hover non excludes touchscreen desktops
  .discourse-touch {
    // we detect touch capability on the JS side, a bit of a belts and suspenders approach
  }
}
```

And in JS: 

```
this.capabilities.touch` plus `window.matchMedia("(hover: none)").matches
```
2025-01-16 10:19:01 -05:00
Mark VanLandingham
e6272e0497
DEV: applyBehaviorTransformer for composer-position editTouchMove (#30811)
In a theme or plugin, if you have a scrollable mobile composer, you may
want to allow scrolling events on the composer editor.. this allows for
it!
2025-01-16 08:04:15 -06:00
David Taylor
72f4588d3b
DEV: Do not trigger floatkit 'hover' for touch events (#30793)
When tapping something on a touch-enabled device, `mouseMove` events are
still fired, so floatkit would still be triggered even if configured for
'hover' only. For links, this would be particularly strange, because the
tooltip would appear for a split-second, before the page navigation
occured.

To avoid this problem, we can use the more-modern 'pointerMove' event,
and check the `pointerType` to exclude 'touch'
2025-01-16 12:36:47 +00:00
David Taylor
41bf8ddfd0
DEV: Add topic-list-after-category outlet (#30797) 2025-01-16 11:24:01 +00:00
dependabot[bot]
6f314490a0
Build(deps): Bump @faker-js/faker from 9.3.0 to 9.4.0 (#30807)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.3.0 to
9.4.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.3.0...v9.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 11:07:43 +01:00
dependabot[bot]
c818f7e17e
Build(deps-dev): Bump jsuites from 5.8.3 to 5.8.5 (#30802)
Bumps [jsuites](https://github.com/jsuites/jsuites) from 5.8.3 to 5.8.5.
- [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)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 11:06:08 +01:00
Martin Brennan
f329acba71
UX: Wizard and theme install modal improvements (#30788)
* Fix tabbing inputs on first wizard step, the user would end up on
"Skip to content"
for the page "behind" the wizard. If the wizard is showing we can just
not render the skip to content element
* Only show the required wizard steps in the counter, so we do X/4
rather than X/6 at the top of the page. 
* Change to "Setting up your theme..." by default, but if the install
takes 10s or more add a note that things are still happening and to
be patient.
2025-01-16 13:53:09 +10:00
Ted Johansson
5c0b7c4d70
Admin webhooks UI guidelines (#30764)
This change converts the admin webhooks UI to the new UI guidelines and modernizes the JS.
2025-01-16 10:22:18 +08:00
Gary Pendergast
99f5670c30
UX: Tweak plugin and customize-based admin page margins (#30808)
Admin pages that are based off the customize or plugin templates were wrapped in the `admin-container` class, which has slightly different margins to the `admin-config-page` class, which is used on most admin pages.

This change ensures that all the admin pages have the same alignment.
2025-01-16 09:44:43 +11:00
Gary Pendergast
27f278253b
UX: Use DPageHeader on the Logs page (#30786)
Update the header of the admin Logs page to be more consistent with the rest of the admin UI.

The tabs to access the different sub-pages have also been updated.
2025-01-16 07:42:34 +11:00
Kris
adf098f21b
A11Y: move heading role to parent tag to fix voice control (#30796)
The heading role on topic lists is desirable for screenreader users
because they can easily navigate from heading to heading.

Having this role on the link tag directly becomes problematic for Voice
Control users on Apple devices because unfortunately Voice Control
assumes that when given the role of a heading, it is not a link. This
makes it difficult to click.

This PR moves the heading role to the link's wrapper. This change allows
for heading-to-heading navigation for screenreaders, and also makes it
easier to click using Voice Control. The end result is that topic lists
are both navigable for screenreaders and Voice Control users.
2025-01-15 12:53:05 -05:00
Sérgio Saquetim
34acc9fe54
DEV: Add outlets around the topic item and latest topic item poster (#30776) 2025-01-15 13:38:06 -03:00
David Taylor
da72ad4ecd
DEV: Introduce topic-link PluginOutlet (#30792) 2025-01-15 13:07:59 +00:00
David Taylor
ed304ba196
DEV: Add URL to fa6 deprecation (#30791)
This will be displayed in the warning banner
2025-01-15 10:30:25 +00:00
Martin Brennan
061899fee4
UX: Wizard homepage dropdown improvements (#30763)
* Do not offer "categories with latest" option anymore, it does
  not look good with our default Sidebar selection
* Display a sensible item in the dropdown if the admin has not
  chosen hot, latest, or category_boxes as the homepage style,
  before it was broken. Now we show Custom with a little blurb
  about whether topics or categories are shown, and what the landing
  page is


![image](https://github.com/user-attachments/assets/3e392583-d107-489e-9725-62d995a2d341)
2025-01-15 16:49:47 +10:00
Penar Musaraj
d16a8a5ea9
UX: Adjust styling of Back button in topic progress (#30769)
Before: 
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/66c07c49-9603-4eb4-84d5-db3821a7af1a"
/>

After: 
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/ba90d74a-4f63-41ae-9dd7-f5999a2d21ef"
/>
2025-01-15 17:41:00 +11:00
Gary Pendergast
d144826fa7
UX: Use DPageHeader on the Email Style page (#30784)
Update the header of the admin Email Style page to be more consistent with the rest of the admin UI.

The HTML/CSS tabs have also been updated, which required an extra check being added to the NavItem component.
2025-01-15 16:53:45 +11:00
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
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
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 0ed4b09527857d7751dba7fb2d765e08bf46a65e, 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
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
Jarek Radosz
473e37e7b3
Revert "Build(deps-dev): Bump glob from 10.4.5 to 11.0.1 (#30710)" (#30767)
This reverts commit f8c493f3c4ee5e38dff460288996c780a6458e29.
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
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