Commit Graph

57912 Commits

Author SHA1 Message Date
f25b72b98f DEV: Bump cross-spawn 6.0.5 to 6.0.6 (#30955) 2025-01-23 15:43:44 +00:00
26134b897a DEV: Ensure sequential replaceText calls work correctly (#30951)
`replaceText` will replace some text, then call `selectText()` to
restore the cursor position. However, selectText was asynchronous, so
calling `replaceText()` multiple times in the same runloop iteration
would cause the cursor to jump to an unexpected place. This likely
explains some of the weird behavior we've seen with upload-markdown
replacement
2025-01-23 13:08:43 +00:00
10f34ddf86 DEV: Backend support for light/dark mode in color palettes (#30893)
We're embarking on a project for overhauling the color palette and theme
systems in Discourse. As part of this project, we're making each color
palette include light and dark modes instead of the status quo of
requiring 2 separate color palettes to implement light and dark modes.

This commit is a first step towards that goal; it adds a code path for
generating and serving `color_definitions` stylesheets using the
built-in dark variant of a color palette. All of this code path is
behind a default-off site setting `use_overhauled_theme_color_palette`,
so there's no change in behavior unless the setting is enabled.

Internal topic: t/141467.
2025-01-23 15:54:49 +03:00
13f86c99ea FIX: Automatic auth flow with full page login/signup (#30928)
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2025-01-23 08:43:07 -03:00
f23004c626 DEV: Run pnpm dedupe to bump subdependencies (#30947) 2025-01-23 10:28:19 +00:00
Sam
de7e213052 DEV: update discourse-fonts (#30943)
This applies some fixes to Inter which remove some features we set (like
sso4)
from the core CSS.

It brings us closer to default.
2025-01-23 15:55:09 +11:00
474bfb5757 DEV: Add a context arg to after-topic-status outlet (#30940)
…so that plugins/themes can conditionally conditionally display their
topic-status icon (e.g. just on the topic list, or everywhere but the
header)
2025-01-23 04:21:31 +01:00
daab816a37 DEV: Unhide the set_locale_from_cookie setting to allow site translations (#30924)
Related: https://github.com/discourse/discourse-translator/pull/198

The new experimental feature on discourse-translator requires this
`SiteSetting.set_locale_from_cookie` to be set. This comment unhides the
existing site setting.
2025-01-23 11:05:29 +08:00
2c8f07fe85 FIX: Adjust search menu buttons alignment (#30939)
### Before
<img width="485" alt="image"
src="https://github.com/user-attachments/assets/869a676a-604f-461e-b008-975f9e352787"
/>


### After
<img width="485" alt="image"
src="https://github.com/user-attachments/assets/3b91022c-9a7d-4237-8382-19b2174f6006"
/>
2025-01-22 19:46:37 -07:00
94b309b05e FIX: Display either the topic-status outlet or the fallback (#30938) 2025-01-23 03:25:34 +01:00
248501f4c7 FIX: Incorrect i18n titles for fallback topic-status (#30937) 2025-01-23 03:25:02 +01:00
1820dd34fc UX: Revert #30547 UX: use em units for code font-size (#30936)
The solution in (https://github.com/discourse/discourse/pull/30547)
using `em` units was causing readability problems for code blocks in
mobile. This reverts to the previous solution
(https://github.com/discourse/discourse/pull/30536) of using `font-size:
inherit` for code within heading elements.

The downside is that the code in heading won't be slightly smaller than
the other text like it is for inline code in paragraphs, but it seems
worth it to avoid causing other size issues.
2025-01-22 20:09:23 -05:00
99b0ae2fc1 UX: inherit font-settings on form controls (#30935) 2025-01-22 19:54:36 -03:00
Sam
be5b12c906 DEV: update mini_racer (#30656)
Mini_racer was redesigned to keep all V8 vm integration on a dedicated
thread.

Previous attempts at upgrades had lots of stack poisoning across V8
owned
and Ruby owned threads that were leading to segfaults.

We will monitor the new design in production to see how robust the new
solution is.
2025-01-23 09:08:00 +11:00
db9174a527 Build(deps): Bump irb from 1.15.0 to 1.15.1 (#30934)
Bumps [irb](https://github.com/ruby/irb) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/ruby/irb/releases)
- [Commits](https://github.com/ruby/irb/compare/v1.15.0...v1.15.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 22:54:47 +01:00
d9102fdba1 Build(deps-dev): Bump rubocop from 1.70.0 to 1.71.0 (#30933)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.70.0 to
1.71.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
-
[Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/rubocop/rubocop/compare/v1.70.0...v1.71.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 22:54:05 +01:00
df8ceb3b2e Build(deps): Bump digest from 3.1.1 to 3.2.0 (#30932)
Bumps [digest](https://github.com/ruby/digest) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/ruby/digest/releases)
- [Commits](https://github.com/ruby/digest/compare/v3.1.1...v3.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 22:54:00 +01:00
6053dc8aa6 FIX: Prevent frozen string error in import scripts (#30325)
Co-authored-by: Selase Krakani <849886+s3lase@users.noreply.github.com>
2025-01-22 22:44:49 +01:00
eb041085bc UX: Fix minimized composer position on iOS PWA and app (#30926)
See
https://meta.discourse.org/t/minimized-composer-reply-control-issues/348337
2025-01-22 13:38:34 -05:00
c85708b438 UX: rename "hamburger menu" to "navigation menu" in keyboard help (#30927)
Reported here:
https://meta.discourse.org/t/open-hamburger-menu-wording/348216

After adding the sidebar, we started calling related settings the
"navigation menu" because it can either be the sidebar or the hamburger
menu (dropdown) — this reflects that change in the keyboard shortcuts
modal as well


Before:


![image](https://github.com/user-attachments/assets/ae888771-8df0-4b01-9df3-5fbcfdfb5f51)


After: 


![image](https://github.com/user-attachments/assets/c0119494-4360-40d1-a7e8-358fb8dcbd32)
2025-01-22 12:30:36 -05:00
3be699fe2e FIX: ensures more icon is visible on hover (#30925) 2025-01-22 14:19:01 +01:00
2cff8c82e3 UX: adds chat send shortcut user preference (#30473)
Users can now decide if they want to send a message on:
- <kbd>enter</kbd>
- <kbd>meta + enter</kbd>

If you choose <kbd>meta + enter</kbd>, <kbd>enter</kbd> will add a
linebreak.

<img width="192" alt="Screenshot 2025-01-21 at 12 57 48"
src="https://github.com/user-attachments/assets/abfd6f8b-83b3-4e6f-be67-8f63d536ca8a"
/>
2025-01-22 13:17:45 +01:00
a66e5ff728 FIX: ensures chat navbar is on top of content (#30923)
Since this change
6c3a7f2a67 (diff-48126857aeb1748fb1eb2500ca69b832212061db59d93ed61dde9fd5dcddf0c7)
we had various behaviours in different browsers as what should be at the
top was ambiguous. This commit ensures the navbar is one layer above the
content.
2025-01-22 11:48:02 +01:00
a793f4843b DEV: Introduce theme-owned color palettes (#30915)
Related to https://github.com/discourse/discourse/pull/30893

As part of the theme overhauling project, we're making each theme fully
own/control its color palette which can be edited directly on the theme
page. To make this possible, we need to introduce a special type of
color palettes that are marked as "owned by a theme" in the database
which aren't displayed in the admin color palettes page and can't be
edited from it. This commit is the first step of this change; it adds a new
join table to associate a color palette with a theme. For now, we're
keeping the relationship one-to-one (hence the `UNIQUE` indexes), but we
may later change it to one-to-many.

Internal topic: t/141648.
2025-01-22 12:03:37 +03:00
f7904d82b7 DEV: Bump discourse-fonts (#30917)
Brings in more Inter font changes
c.f.
12124ea144
2025-01-22 12:45:48 +10:00
83cc97994f FEATURE: Handle special font properties from discourse-fonts (#30891)
In https://github.com/discourse/discourse-fonts/pull/15 we are
introducing special font properties for certain fonts,
specifically the `font-variation-settings` and `font-feature-settings`.
For now this will only apply to Inter, but we may do it for other
fonts in future.

This commit makes it so the color_definitions.css file includes
these special properties for each font, either defined on the
root `html` element for the body font or on the `h1-h6` elements
for the heading font. This is done in this way because defining
them on `@font-face` is ignored by the browser.

This also ensures special CSS classes for the wizard container
e.g. wizard-container-font-FONTID are defined, this is so we can
use these special properties scoped to the font selected in the
wizard, which will affect the way the canvas preview is rendered.

Here is an example of before/after with special properties applied to
Inter,
in this case:

```css
font-variation-settings: 'opsz' 28;
font-feature-settings: 'calt' 0, 'ccmp' 0, 'ss02' 1;
```
2025-01-22 10:56:09 +10:00
32c6d3be06 FIX: Admin sidebar problem check missing -1 check (#30916)
When we initially turned on admin sidebar for new sites,
existing sites had the value set to -1. We need to show
the problem check to these sites too, but currently it only
checks if `admin_sidebar_enabled_groups` is empty.
2025-01-22 10:21:30 +10:00
83737aab5f FIX: Restore footer-nav backdrop-filter for iOS < 18 (#30914)
This was inadvertantly removed in
d88ee33eb622e52cec5f442dd6416e68c8f758e4

See https://meta.discourse.org/t/348262/4
2025-01-21 23:48:14 +00:00
c266e4acb8 FIX: Enforce 'prefix' notation for media-query ranges (#30913)
"context" notation is not supported in iOS < 16.4, and we don't have any
post-processing on our CSS files which can automatically make that
conversion.

For now, changing the stylelint config to enforce the more-compatible
syntax, and updating all occurences.
2025-01-21 23:42:17 +00:00
9b100db91c DEV: Update irb to 1.15.0 (#30912)
Dependabot PR: https://github.com/discourse/discourse/pull/30909
2025-01-22 00:33:36 +01:00
e98644fbc6 DEV: Replace remaining uses of query helper (#30019) 2025-01-22 00:25:03 +01:00
fbb90aac1b FIX: lint issue follow-up to a3359ac (#30911)
Expected empty line before rule `rule-empty-line-before`
2025-01-21 17:58:27 -05:00
2d9f9613bb Build(deps-dev): Bump @swc/core from 1.10.8 to 1.10.9 (#30906)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.10.8 to
1.10.9.
- [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.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 23:51:56 +01:00
d7c71b48d7 Build(deps-dev): Bump lefthook from 1.10.9 to 1.10.10 (#30905)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.10.9
to 1.10.10.
- [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.9...v1.10.10)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 23:51:36 +01:00
8e31991613 DEV: Fix a warning in a chat spec (#30904)
```
Checking for expected text of nil is confusing and/or pointless
since it will always match. Please specify a string or regexp instead.
plugins/chat/spec/system/chat_message_interaction_spec.rb:51
```
2025-01-21 23:44:28 +01:00
a3359ac7ad UX: set mobile read state indicator to static size to avoid overflow (#30910)
This fixes an issue where topics could scroll horizontally on mobile:
https://meta.discourse.org/t/topic-page-layout-issue/348262?u=pmusaraj

It seems some recent core change impacted the read state size/position 

This sets the size and position to more static values (not based on
global font changes) to avoid the issue, and removes the horizontal
scroll.
2025-01-21 17:24:58 -05:00
d7f008d482 UX: Only lock viewport scale during focusin events for iOS PWA/Hub (#30908)
c171e3dc works well in Safari, because the browser ignores the
`user-scalable=no` directive. However, PWA/Hub do respect the directive,
which means that it stopped pinch-zooming from working.

This commit updates the strategy for those environments so that the
viewport is only locked briefly during a focusin event. The simpler
strategy is maintained for the real safari browser.
2025-01-21 22:19:59 +00:00
8c31f1aa5f UX: Improve git/code oneboxes (#30822) 2025-01-21 14:20:36 -06:00
f0d6e9758d Update translations (#30898) 2025-01-21 15:55:30 +01:00
6f11c82801 FIX: removes mousewheel edge case on messages (#30900) 2025-01-21 15:38:07 +01:00
df205c9290 UX: Remove loading="lazy" from avatars for improved UX (#30897)
Lazy loading images naturally causes a slight delay, because the browser
only starts to load them after laying out the DOM and checking whether
they're in the viewport. Plus, in Safari, re-rendering the DOM of a
lazy-loaded image always causes a brief flicker, even if the image is
already cached in the browser.

Lazy-loading is most beneficial on large one-off images which are often
rendered outside the viewport. That's frequently the case for images
which users share in topics. Avatars, on the other hand, are very small
images, they're very often above-the-fold, and the same avatar often
occurs many times on the same page.

Therefore, this commit removes `loading="lazy"` from avatars, which
should improve avatar load times in all browsers, and stop the flicker
in Safari.

---

Tapping logo to reload topic-list in Safari. Before: https://github.com/user-attachments/assets/242299f8-aa13-4991-b321-2f143603ed26

After: https://github.com/user-attachments/assets/5e5bfd28-3a78-40fd-af21-3d92e7b3ba8a
2025-01-21 14:06:45 +00:00
6fd577d97d FEATURE: Improve use_email_for_username_and_name_suggestions (#30845)
Previously this setting would only control values received in an 'email'
field from an identity provider. This commit extends it, so that it also
applies to email-like content in other fields. This provides improved
protections against partial email addresses being leaked
2025-01-21 13:04:48 +00:00
e8d5059156 FIX: emoji picker position when clicking more (#30896)
When clicking more in the emoji autocomplete menu, the picker would
sometimes be hidden at the bottom of the page. It was easily
reproducible in long topic pages when scrolled to the bottom.

This commit just marks the textarea as the trigger which is not a
perfect position but is still a good fallback.
2025-01-21 13:58:07 +01:00
076c0c4bca UX: Workaround iOS bottom overscroll bug in header-offset calcs (#30895) 2025-01-21 12:23:09 +00:00
5ac308fe85 UX: Extend Safari scrolling fix to work in iPad PWA (#30894)
Followup to 4933cfd46cf2b30600da9a72bb82d02c19ead8a3
2025-01-21 11:50:38 +00:00
184ec95d01 DEV: Don't nest deferring calls (#30449)
Each case simplified:

`next(() => later(() => ...))` -> "wait 0 ms then wait X ms"
`next(() => debounce(() => ...))` -> "wait 0 ms then wait X ms
(debounced)"
`next(() => scheduleAfter("render", ...))` -> "in the next (empty) run
loop, do the thing (after a no-op render step)"
2025-01-21 11:24:33 +01:00
db998ee1ab DEV: Make interactive-widget viewport config chrome-only (#30889)
This stops it printing an error to the console in Safari
2025-01-21 09:46:18 +00:00
4933cfd46c UX: Improve sidebar positioning in Safari (#30888)
- Calculate the overscroll amount and subtract it from viewport-based
measurements

- Only round at the end of calculations, to avoid sub-pixel rounding
discrepancies

- Compensate for < 1px fluctuations which happen during scroll

Before: https://github.com/user-attachments/assets/a1044405-9f4a-46b1-a3b1-bc5fff29bf45

After: https://github.com/user-attachments/assets/212e4a32-aa97-4054-aba0-b7f1d993f007
2025-01-21 09:43:30 +00:00
4a7b98ef6d Build(deps-dev): Bump @ember/test-helpers from 4.0.4 to 5.0.0 (#30859)
Bumps
[@ember/test-helpers](https://github.com/emberjs/ember-test-helpers)
from 4.0.4 to 5.0.0.
- [Release
notes](https://github.com/emberjs/ember-test-helpers/releases)
-
[Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emberjs/ember-test-helpers/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 02:42:11 +01:00
fccf1c6636 Build(deps-dev): Bump stylelint-config-standard-scss from 13.1.0 to 14.0.0 (#30887)
Bumps
[stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss)
from 13.1.0 to 14.0.0.
- [Release
notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
-
[Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v13.1.0...v14.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 02:42:00 +01:00