Commit Graph

57608 Commits

Author SHA1 Message Date
dependabot[bot] 2230e68854
Build(deps-dev): Bump lefthook from 1.10.8 to 1.10.9 (#30884)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.8
to 1.10.9.
- [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.8...v1.10.9)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:59:46 +01:00
dependabot[bot] ebc07bc05f
Build(deps-dev): Bump stylelint-config-standard from 36.0.1 to 37.0.0 (#30885)
Bumps
[stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard)
from 36.0.1 to 37.0.0.
- [Release
notes](https://github.com/stylelint/stylelint-config-standard/releases)
-
[Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.1...37.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:59:29 +01:00
dependabot[bot] 62a3745764
Build(deps-dev): Bump qunit from 2.23.1 to 2.24.0 (#30886)
Bumps [qunit](https://github.com/qunitjs/qunit) from 2.23.1 to 2.24.0.
- [Release notes](https://github.com/qunitjs/qunit/releases)
- [Changelog](https://github.com/qunitjs/qunit/blob/2.24.0/History.md)
- [Commits](https://github.com/qunitjs/qunit/compare/2.23.1...2.24.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:58:58 +01:00
dependabot[bot] af61844eaa
Build(deps): Bump i18n from 1.14.6 to 1.14.7 (#30870)
Bumps [i18n](https://github.com/ruby-i18n/i18n) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/ruby-i18n/i18n/releases)
-
[Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby-i18n/i18n/compare/v1.14.6...v1.14.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:56:36 +01:00
dependabot[bot] 43cb85e2ff
Build(deps-dev): Bump rubocop-rails from 2.28.0 to 2.29.0 (#30856)
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from
2.28.0 to 2.29.0.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
-
[Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-rails/compare/v2.28.0...v2.29.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:53:56 +01:00
dependabot[bot] 0fd27e1228
Build(deps): Bump psych from 5.2.2 to 5.2.3 (#30854)
Bumps [psych](https://github.com/ruby/psych) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/ruby/psych/releases)
- [Commits](https://github.com/ruby/psych/compare/v5.2.2...v5.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 01:53:36 +01:00
dependabot[bot] 5837663d81
Build(deps-dev): Bump rubocop-rspec from 3.3.0 to 3.4.0 (#30881)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from
3.3.0 to 3.4.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
-
[Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop-rspec/compare/v3.3.0...v3.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 07:36:50 +08:00
Gerhard Schlager 2d05a82f52
DEV: Add `Upload` to IntermediateDB (#29780) 2025-01-20 23:16:30 +01:00
Penar Musaraj ba5cd20ef2
UX: Remove table editor transition effect (#30878)
This fixes a bit of jitteriness on mobile, noticeable mostly when going
from the topic list to a post that has a table.
2025-01-20 17:08:53 -05:00
Régis Hanol 8207086d5f
FIX: supports quoting mathjax (#30876)
This will properly extract the text used to generate mathjax expression
(both inline and block display modes) as well as remove all the cruft
that mathjax is adding in the DOM.

Internal ref - t/135307
2025-01-20 20:26:43 +01:00
David Taylor c171e3dccd
UX: Replace `font-size-ios-input` workaround (#30877)
By default, iOS safari will automatically zoom into focused inputs with
font-sizes less than 16px. To avoid this, we had a CSS rule to ensure
inputs always had a large font-size on iOS. This worked, but did lead to
design inconsistencies.

Instead, we can set `user-scalable=no` on the viewport meta tag. Since
iOS 10, this property doesn't actually stop users zooming. But it *does*
still prevent the automatic zooming of inputs. So it solves our zoom
problem, and allows us to remove the CSS font-size workaround.
2025-01-20 19:17:30 +00:00
Sérgio Saquetim a99bb0caff
DEV: Add wrapper outlet around the topic cell top and bottom lines (#30848) 2025-01-20 15:10:14 -03:00
Régis Hanol e2c3dff669
UX: convert "view all notification" to a link (#30874)
so it respects the user's input of opening it in another tab when
CTRL/META/MIDDLE clicking it.

<img width="471" alt="Screenshot 2025-01-20 at 16 20 14"
src="https://github.com/user-attachments/assets/2ba1a78a-0c12-452e-b054-ef7e7c1338c1"
/>
2025-01-20 18:24:08 +01:00
David Taylor d88ee33eb6
DEV: Introduce stylelint (#29852)
Stylelint is a css linter: https://stylelint.io/

As part of this change we have added two javascript scripts:

```
pnpm lint:css
pnpm lint:css:fix
```

Look at `.vscode/settings.json.sample` and `.vscode/extensions.json` for
configuration in VSCode.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2025-01-20 15:27:42 +00:00
David Taylor 89df65e843
FIX: Avoid possible rendering infinite-loop in post-menu (#30873)
ff815384 introduced a modifier which changes tracked state. If the
conditions are correct, this can cause an infinite re-rendering loop.
One example is [here](https://meta.discourse.org/t/346215/4), although
there are other non-dev-tools things which could trigger this kind of
loop. As a general rule, modifiers should not change tracked state.

This commit changes the approach to match the rest of the new-post-menu
assumptions: instead of trying to modify `collapsed` at runtime, the
rendering of individual buttons has the `>1` logic. That matches the
existing logic
[here](https://github.com/discourse/discourse/blob/89ff7d51e6/app/assets/javascripts/discourse/app/components/post/menu.gjs#L392C18-L394C6).
2025-01-20 15:16:53 +00:00
dependabot[bot] 98943a5a1f
Build(deps): Bump discourse-fonts from 0.0.13 to 0.0.14 (#30871)
Bumps [discourse-fonts](https://github.com/discourse/discourse-fonts)
from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/discourse/discourse-fonts/releases)
-
[Commits](https://github.com/discourse/discourse-fonts/compare/v0.0.13...v0.0.14)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 13:11:51 +00:00
David Taylor 23edfe7cc2
FIX: Invalidate stylesheet cache when discourse-fonts is bumped (#30869) 2025-01-20 12:25:28 +00:00
Joffrey JAFFEUX 89ff7d51e6
UX: replaces custom more menu by d-menu (#29090)
One of the big advantages is a nicer menu on mobile.

This commit also fixes a bug where the close modal action was called for any destroyed d-menu trigger, even if this specific menu was not expanding, which means it was closing a different modal than its own modal, given we can only have one modal at a time.
2025-01-20 12:00:11 +01:00
David Taylor 2c81e24bca
FIX: Update nginx `types` config (#30868)
Add fonts to existing block, and remove unneeded 'include' directive.

Followup to 8dbbe53dcc
2025-01-20 10:34:18 +00:00
dependabot[bot] d0d819e2a3
Build(deps-dev): Bump @swc/core from 1.10.7 to 1.10.8 (#30858)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.7 to
1.10.8.
- [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.7...v1.10.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 11:06:05 +01:00
David Taylor 8dbbe53dcc
PERF: Enable gzip for ttf/otf fonts (#30867) 2025-01-20 09:57:42 +00:00
dependabot[bot] 2042b67c3d
Build(deps): Bump tzinfo-data from 1.2024.2 to 1.2025.1 (#30855)
Bumps [tzinfo-data](https://github.com/tzinfo/tzinfo-data) from 1.2024.2
to 1.2025.1.
- [Release notes](https://github.com/tzinfo/tzinfo-data/releases)
-
[Commits](https://github.com/tzinfo/tzinfo-data/compare/v1.2024.2...v1.2025.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 10:44:47 +01:00
dependabot[bot] 7b036c104a
Build(deps-dev): Bump lefthook from 1.10.7 to 1.10.8 (#30860)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.7
to 1.10.8.
- [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.7...v1.10.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 10:44:13 +01:00
dependabot[bot] 9ed1c4bba0
Build(deps): Bump colored2 from 4.0.0 to 4.0.3 (#30857)
Bumps [colored2](https://github.com/kigster/colored2) from 4.0.0 to
4.0.3.
- [Release notes](https://github.com/kigster/colored2/releases)
-
[Changelog](https://github.com/kigster/colored2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kigster/colored2/compare/v4.0.0...v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 10:43:44 +01:00
Martin Brennan b6f62bcc05
DEV: Bump discourse-fonts to 0.0.13 (#30866)
Pulls in this change
d09fff8867
2025-01-20 16:50:11 +10:00
Ella E. 1702212982
FIX: Adjust grid-template-columns to prevent text overflow (#30864)
### What's changed?
Added `minmax(0, 1fr)` to `grid-template-columns` to ensure the second
column can shrink to fit within the container, avoiding overflow in
smaller viewports or when the container width is limited.

### Before
<img width="489" alt="image"
src="https://github.com/user-attachments/assets/047acba2-6ce7-444e-9ef1-867d3643ee45"
/>

### After
<img width="489" alt="image"
src="https://github.com/user-attachments/assets/b5485746-8dac-422d-ba35-ab819ef78c5d"
/>
2025-01-19 22:06:09 -07:00
jbrw a39b6daa65
DEV: Ignore timezone cache when getting current timezone (#30861)
When the user selects “Use Current Timezone” on Profile -> Preferences
-> Profile, a call is made to `moment.tz.guess()`.


https://momentjs.com/timezone/docs/#/using-timezones/guessing-user-timezone/
states that, by default, previously cached responses from this function
will be returned upon subsequent calls. If your physical location has
changed, this may result in a cached value being returned, and thus the
timezone seemingly not being updating.

By passing the `true` value to the function, the cache is bypassed,
forcing an explicit recheck of the current timezone.
2025-01-20 15:42:08 +11:00
Ella E. 7ae5d03a2c
FIX: Prevent wrapping of select box container by applying nowrap (#30863)
Applied `white-space: nowrap` to ensure text remains on a single line.

### Before

![image](https://github.com/user-attachments/assets/f148e216-fce3-46c6-9934-fb43da7f8f47)


### After
<img width="728" alt="image"
src="https://github.com/user-attachments/assets/fce31f33-9a29-4a6d-85c0-d1566c9acd26"
/>
2025-01-19 19:37:10 -07:00
Ted Johansson 96b725a11c
FIX: Don't allow editing own posts user can no longer see (#30839)
In a PM, if a user has made a post, and is later removed from the PM, they can still edit their own post. This can be done either if they happen to have a composer open in an active tab, or by just manually sending an HTTP request.

The post guardian is missing a basic check, can_see_post_topic? when we determine whether a user can edit a post or not. This basic check is already in place when we determine whether a user can see the post in the first place.

This PR adds in the missing check, so that if the user tries to edit their post after being removed, they'll receive a 403.

It also adds a MessageBus message scoped to the affected user and topic when they are removed from the PM, which will redirect them to their inbox. This helps avoid a stale tab where they are still in the PM which they by right can now no longer see.
2025-01-20 10:09:58 +08:00
Martin Brennan dcb1e2a341
FEATURE: Chat thread inline oneboxes (#30834)
Previously if you linked to a chat thread inline, our oneboxer
did not have special handling for this, so the link would end
up with the text "Chat #channel-name" which is not ideal for a
thread.

This commit makes it so the thread onebox is in the format
"Thread title - #channel-name" if the thread title exists,
otherwise we show "Thread in #channel-name"
2025-01-20 10:08:38 +10:00
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