Commit Graph

57781 Commits

Author SHA1 Message Date
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
120f1afc91 UX: Fix scrolling of form template composer on mobile (#30883)
This was a regression in recent composer refactors, this change ensures the `with-form-template` container is scrollable.
2025-01-20 17:32:32 -08:00
50f31813ec Build(deps): Bump nokogiri from 1.18.1 to 1.18.2 (#30853)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.18.1
to 1.18.2.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
-
[Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.18.2/CHANGELOG.md)
-
[Commits](https://github.com/sparklemotion/nokogiri/compare/v1.18.1...v1.18.2)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 02:12:16 +01:00
8f0354deb6 Build(deps-dev): Bump selenium-webdriver from 4.27.0 to 4.28.0 (#30882)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from
4.27.0 to 4.28.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
-
[Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
-
[Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.27.0...selenium-4.28.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:02:00 +01:00
98b6d420b8 Build(deps-dev): Bump selenium-devtools from 0.131.0 to 0.132.0 (#30880)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from
0.131.0 to 0.132.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
-
[Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/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:01:48 +01:00
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
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
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
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
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
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
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
2d05a82f52 DEV: Add Upload to IntermediateDB (#29780) 2025-01-20 23:16:30 +01:00
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
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
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
a99bb0caff DEV: Add wrapper outlet around the topic cell top and bottom lines (#30848) 2025-01-20 15:10:14 -03:00
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
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
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
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
23edfe7cc2 FIX: Invalidate stylesheet cache when discourse-fonts is bumped (#30869) 2025-01-20 12:25:28 +00:00
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
2c81e24bca FIX: Update nginx types config (#30868)
Add fonts to existing block, and remove unneeded 'include' directive.

Followup to 8dbbe53dcc09766f9ce90963326caa96a5f20a03
2025-01-20 10:34:18 +00:00
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
8dbbe53dcc PERF: Enable gzip for ttf/otf fonts (#30867) 2025-01-20 09:57:42 +00:00
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
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
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
b6f62bcc05 DEV: Bump discourse-fonts to 0.0.13 (#30866)
Pulls in this change
d09fff8867
2025-01-20 16:50:11 +10:00
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
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