Commit Graph

57578 Commits

Author SHA1 Message Date
Jarek Radosz
f4857d3b1c
DEV: Remove more ember options (#30852) 2025-01-18 15:58:19 +01:00
Jarek Radosz
2cd5e4d54d
DEV: Add more args to topic-list-item outlet (#30851) 2025-01-18 15:57:53 +01:00
Jarek Radosz
33296d5913
DEV: Remove deprecated openTopicDraft (#30850) 2025-01-18 13:13:35 +01:00
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
Régis Hanol
5d76f2e343
FIX: only attach images in digests (#30844)
When secure uploads are enabled, we have to attach the images in the
digest so they can show up in the email.

However, we send attaching all the attachments, including "files" and
"media".

This ensures we only attach images when sending a digest.

Internal t/144542
2025-01-17 15:36:47 +01:00
Joffrey JAFFEUX
36d380e349
FIX: re-adds favorite reactions on mobile (#30746)
This feature has been mistakenly removed in
6740a340ca

<img width="382" alt="Screenshot 2025-01-13 at 20 49 03"
src="https://github.com/user-attachments/assets/9710255d-3a1b-4e52-9acc-4e9c410db1b9"
/>
2025-01-17 13:24:52 +01:00
Joffrey JAFFEUX
b43140e021
DEV: sidebarActive is not used anymore (#30268)
This was used in the past to show a chat sidebar when the core sidebar
was not existing.
2025-01-17 12:30:43 +01: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
Alan Guo Xiang Tan
e63a804ec9
DEV: Remove unused step in tests workflow (#30838) 2025-01-17 13:39:54 +08: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
dependabot[bot]
c6dd40a697
Build(deps): Bump concurrent-ruby from 1.3.4 to 1.3.5 (#30827)
Bumps
[concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby)
from 1.3.4 to 1.3.5.
- [Release
notes](https://github.com/ruby-concurrency/concurrent-ruby/releases)
-
[Changelog](https://github.com/ruby-concurrency/concurrent-ruby/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ruby-concurrency/concurrent-ruby/compare/v1.3.4...v1.3.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:08:35 +01:00
dependabot[bot]
11f780e0e0
Build(deps): Bump rdoc from 6.10.0 to 6.11.0 (#30828)
Bumps [rdoc](https://github.com/ruby/rdoc) from 6.10.0 to 6.11.0.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/compare/v6.10.0...v6.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 23:08:22 +01:00
dependabot[bot]
0c3929fc8a
Build(deps-dev): Bump parser from 3.3.6.0 to 3.3.7.0 (#30826)
Bumps [parser](https://github.com/whitequark/parser) from 3.3.6.0 to
3.3.7.0.
-
[Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/whitequark/parser/compare/v3.3.6.0...v3.3.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 23:08:00 +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
Joffrey JAFFEUX
6c3a7f2a67
FIX: do not store 0 has min width for thead panel (#30818)
When we had no width stored for the side panel in the local storage,
essentially the computation would end up being:

```javascript
Math.min(null, 1000);
```

Which would output: 0. This commit ensures we have a default for store
width: MIN_PANEL_WIDTH. And also uses the same value in CSS and JS.

I had to change z-layers of chat-side-panel resizer as it was
interfering with system specs changing the notification level of a
thread, when trying to click the option in the dropdown, it would
instead click the resizer as it would appear on top of the dropdown.

Tried to write a test but couldn't get something reliable.
2025-01-16 16:03:35 +01: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
Joffrey JAFFEUX
f28eb5b0dc
FIX: ensures scrolls work in chat when touch is on text (#30817)
The stacking context fix we use in chat to avoid:
https://bugs.webkit.org/show_bug.cgi?id=262287 was causing this weird
behavior in chat where the scroll event wouldn't fire when the finger is
on text and not an empty area of the scrollable div.

This simplified implementation seems to work reliably and avoids the
issue.
2025-01-16 13:02:23 +01:00
David Taylor
41bf8ddfd0
DEV: Add topic-list-after-category outlet (#30797) 2025-01-16 11:24:01 +00:00
Tomas Vavrda
bb920326c9
UX: Removed a redundant git pull statement from the docs (#30801)
`git pull` statement is now redundant and not needed
2025-01-16 11:13:51 +00:00
Tobias Eigen
60a1eedb5f
DEV: Fix typo priviledges -> privileges (#30809)
@discourse-translator-bot keep_translations
2025-01-16 11:09:17 +01: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]
686a531d0d
Build(deps-dev): Bump puppeteer-core from 24.0.0 to 24.1.0 (#30805)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from
24.0.0 to 24.1.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
-
[Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v24.0.0...puppeteer-core-v24.1.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:06:58 +01:00
dependabot[bot]
04708faeab
Build(deps-dev): Bump lefthook from 1.10.5 to 1.10.7 (#30804)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.5
to 1.10.7.
- [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.5...v1.10.7)

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:28 +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
Ted Johansson
0630bc28e7
DEV: Convert a bunch of admin UI translations to follow convention (#30816)
In the new admin UI conventions, button labels and section headings should be sentence case, rather than title case.

This PR performs a sweep of all the fragments visible when using the sidebar layout.
2025-01-16 15:14:40 +08:00
Ted Johansson
4682919744
DEV: Add base admin page page object (#30814)
This PR introduces a base page object for admin pages. Since we're standardizing using components, this makes writing tests easier by abstracting away details about selectors.
2025-01-16 12:52:41 +08:00
Gary Pendergast
a46d1547ab
FIX: Add a DB migration to update font site settings types (#30813)
This PR is  a follow-up to #30636.

The previous change altered the `data_type` of the `base_font` and
`heading_font` site settings, but didn't update the corresponding
entries in the `site_settings` table to match.
2025-01-16 13:53:58 +10: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
59a2a70806
DEV: Move admin page objects to /pages directory (#30812)
A handful of the page objects for admin pages were placed directly under /page_objects rather than under /page_objects/pages with the others. This PR simply moves them.
2025-01-16 11:18:36 +08: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
Martin Brennan
35507d4090
FIX: Process tag synonyms when approving reviewable queued post (#30810)
Followup 72c4709a5a

Previously we made a fix to allow skip validations when tagging
a topic via TopicCreator. However, this flow also skips a lot of
the more in-depth work on tags we do when creating a topic, like
processing tag synonyms. When approving reviewable queued posts,
we skip validations, so this would cause an issue where a topic
was approved and the tag synonyms weren't applied.

This commit changes the logic so we attempt the more complete
`DiscourseTagging.tag_topic_by_names` call first and if this fails
and skip validations is on, then we do
`DiscourseTagging.add_or_create_tags_by_name`.
This at least gives a chance for the full workflow to work first.
2025-01-16 11:01:45 +10: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
Penar Musaraj
35214201b8
DEV: Target tablets differently for composer position tweaks (#30798) 2025-01-15 14:09:51 -05: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
Mark VanLandingham
a647031171
DEV: Add topic_hot_score association to topic.rb (#30795)
We have the other side of this association wired up -- 

da72ad4ecd/app/models/topic_hot_score.rb (L4)

This commit simply adds the association to `Topic` model so we can
reference the hot score.
2025-01-15 10:14:33 -06:00