Skip to content

Commit eb6231f

Browse files
committed
Merge branch 'main' into temp3_for-taruntarun
# Conflicts: # config/locales/simple_form.uk.yml
2 parents c0d8182 + 687f3a2 commit eb6231f

188 files changed

Lines changed: 21158 additions & 634 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ docker-compose.override.yml
6868

6969
# Ignore vendored CSS reset
7070
app/javascript/styles/mastodon/reset.scss
71+
app/javascript/styles_new/mastodon/reset.scss
7172

7273
# Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631
7374
*.js

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,30 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.5.2] - 2025-11-20
6+
7+
### Changed
8+
9+
- Change private quote education modal to not show up on self-quotes (#36926 by @ClearlyClaire)
10+
11+
### Fixed
12+
13+
- Fix missing fallback link in CW-only quote posts (#36963 by @ClearlyClaire)
14+
- Fix statuses without text being hidden while loading (#36962 by @ClearlyClaire)
15+
- Fix `g` + `h` keyboard shortcut not working when a post is focused (#36935 by @diondiondion)
16+
- Fix quoting overwriting current content warning (#36934 by @ClearlyClaire)
17+
- Fix scroll-to-status in threaded view being unreliable (#36927 by @ClearlyClaire)
18+
- Fix path resolution for emoji worker (#36897 by @ChaosExAnima)
19+
- Fix `tootctl upgrade storage-schema` failing with `ArgumentError` (#36914 by @shugo)
20+
- Fix cross-origin handling of CSS modules (#36890 by @ClearlyClaire)
21+
- Fix error with remote tags including percent signs (#36886 and #36925 by @ChaosExAnima and @ClearlyClaire)
22+
- Fix bogus quote approval policy not always being replaced correctly (#36885 by @ClearlyClaire)
23+
- Fix hashtag completion not being inserted correctly (#36884 by @ClearlyClaire)
24+
- Fix Cmd/Ctrl + Enter in the composer triggering confirmation dialog action (#36870 by @diondiondion)
25+
526
## [4.5.1] - 2025-11-13
627

7-
### Fixes
28+
### Fixed
829

930
- Fix Cmd/Ctrl + Enter not submitting Alt text modal on some browsers (#36866 by @diondiondion)
1031
- Fix posts coming from public/hashtag streaming being marked as unquotable (#36860 and #36869 by @ClearlyClaire)

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ gem 'ruby-vips', '~> 2.2', require: false
2424

2525
gem 'active_model_serializers', '~> 0.10'
2626
gem 'addressable', '~> 2.8'
27-
gem 'bootsnap', '~> 1.18.0', require: false
27+
gem 'bootsnap', '~> 1.19.0', require: false
2828
gem 'browser'
2929
gem 'charlock_holmes', '~> 0.7.7'
3030
gem 'chewy', '~> 7.3'

Gemfile.lock

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ GEM
129129
binding_of_caller (1.0.1)
130130
debug_inspector (>= 1.2.0)
131131
blurhash (0.1.8)
132-
bootsnap (1.18.6)
132+
bootsnap (1.19.0)
133133
msgpack (~> 1.2)
134134
brakeman (7.1.1)
135135
racc
@@ -182,7 +182,7 @@ GEM
182182
activerecord (>= 5.a)
183183
database_cleaner-core (~> 2.0)
184184
database_cleaner-core (2.0.1)
185-
date (3.4.1)
185+
date (3.5.0)
186186
debug (1.11.0)
187187
irb (~> 1.10)
188188
reline (>= 0.3.8)
@@ -324,13 +324,14 @@ GEM
324324
rainbow (>= 2.0.0)
325325
i18n (1.14.7)
326326
concurrent-ruby (~> 1.0)
327-
i18n-tasks (1.0.15)
327+
i18n-tasks (1.1.0)
328328
activesupport (>= 4.0.2)
329329
ast (>= 2.1.0)
330330
erubi
331-
highline (>= 2.0.0)
331+
highline (>= 3.0.0)
332332
i18n
333333
parser (>= 3.2.2.1)
334+
prism
334335
rails-i18n
335336
rainbow (>= 2.2.2, < 4.0)
336337
ruby-progressbar (~> 1.8, >= 1.8.1)
@@ -349,7 +350,7 @@ GEM
349350
azure-blob (~> 0.5.2)
350351
hashie (~> 5.0)
351352
jmespath (1.6.2)
352-
json (2.15.2)
353+
json (2.16.0)
353354
json-canonicalization (1.0.0)
354355
json-jwt (1.17.0)
355356
activesupport (>= 4.2)
@@ -446,7 +447,7 @@ GEM
446447
mime-types-data (3.2025.0924)
447448
mini_mime (1.1.5)
448449
mini_portile2 (2.8.9)
449-
minitest (5.26.0)
450+
minitest (5.26.2)
450451
msgpack (1.8.0)
451452
multi_json (1.17.0)
452453
mutex_m (0.3.0)
@@ -684,7 +685,7 @@ GEM
684685
tsort (>= 0.2)
685686
zeitwerk (~> 2.6)
686687
rainbow (3.1.1)
687-
rake (13.3.0)
688+
rake (13.3.1)
688689
rdf (3.3.4)
689690
bcp47_spec (~> 0.2)
690691
bigdecimal (~> 3.1, >= 3.1.5)
@@ -705,7 +706,7 @@ GEM
705706
redis-client (0.26.1)
706707
connection_pool
707708
regexp_parser (2.11.3)
708-
reline (0.6.2)
709+
reline (0.6.3)
709710
io-console (~> 0.5)
710711
request_store (1.7.0)
711712
rack (>= 1.4)
@@ -761,7 +762,7 @@ GEM
761762
rubocop-ast (>= 1.47.1, < 2.0)
762763
ruby-progressbar (~> 1.7)
763764
unicode-display_width (>= 2.4.0, < 4.0)
764-
rubocop-ast (1.47.1)
765+
rubocop-ast (1.48.0)
765766
parser (>= 3.3.7.2)
766767
prism (~> 1.4)
767768
rubocop-capybara (2.22.1)
@@ -780,10 +781,10 @@ GEM
780781
rack (>= 1.1)
781782
rubocop (>= 1.75.0, < 2.0)
782783
rubocop-ast (>= 1.44.0, < 2.0)
783-
rubocop-rspec (3.7.0)
784+
rubocop-rspec (3.8.0)
784785
lint_roller (~> 1.1)
785-
rubocop (~> 1.72, >= 1.72.1)
786-
rubocop-rspec_rails (2.31.0)
786+
rubocop (~> 1.81)
787+
rubocop-rspec_rails (2.32.0)
787788
lint_roller (~> 1.1)
788789
rubocop (~> 1.72, >= 1.72.1)
789790
rubocop-rspec (~> 3.5)
@@ -842,7 +843,7 @@ GEM
842843
base64
843844
stoplight (5.6.0)
844845
zeitwerk
845-
stringio (3.1.7)
846+
stringio (3.1.8)
846847
strong_migrations (2.5.1)
847848
activerecord (>= 7.1)
848849
swd (2.0.3)
@@ -943,7 +944,7 @@ DEPENDENCIES
943944
better_errors (~> 2.9)
944945
binding_of_caller (~> 1.0)
945946
blurhash (~> 0.1)
946-
bootsnap (~> 1.18.0)
947+
bootsnap (~> 1.19.0)
947948
brakeman (~> 7.0)
948949
browser
949950
bundler-audit (~> 0.9)

app/controllers/admin/site_uploads_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def destroy
99

1010
@site_upload.destroy!
1111

12-
redirect_back fallback_location: admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
12+
redirect_back_or_to admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
1313
end
1414

1515
private

app/helpers/theme_helper.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ module ThemeHelper
44
def theme_style_tags(theme)
55
if theme == 'system'
66
''.html_safe.tap do |tags|
7-
tags << vite_stylesheet_tag('themes/mastodon-light', type: :virtual, media: 'not all and (prefers-color-scheme: dark)', crossorigin: 'anonymous')
8-
tags << vite_stylesheet_tag('themes/default', type: :virtual, media: '(prefers-color-scheme: dark)', crossorigin: 'anonymous')
7+
tags << vite_stylesheet_tag(theme_path_for('mastodon-light'), type: :virtual, media: 'not all and (prefers-color-scheme: dark)', crossorigin: 'anonymous')
8+
tags << vite_stylesheet_tag(theme_path_for('default'), type: :virtual, media: '(prefers-color-scheme: dark)', crossorigin: 'anonymous')
99
end
1010
else
11-
vite_stylesheet_tag "themes/#{theme}", type: :virtual, media: 'all', crossorigin: 'anonymous'
11+
vite_stylesheet_tag theme_path_for(theme), type: :virtual, media: 'all', crossorigin: 'anonymous'
1212
end
1313
end
1414

@@ -53,4 +53,8 @@ def cached_custom_css_digest
5353
def theme_color_for(theme)
5454
theme == 'mastodon-light' ? Themes::THEME_COLORS[:light] : Themes::THEME_COLORS[:dark]
5555
end
56+
57+
def theme_path_for(theme)
58+
Mastodon::Feature.theme_tokens_enabled? ? "themes/#{theme}_theme_tokens" : "themes/#{theme}"
59+
end
5660
end

app/javascript/mastodon/components/hotkeys/index.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,24 @@ export function useHotkeys<T extends HTMLElement>(handlers: HandlerMap) {
180180

181181
if (shouldHandleEvent) {
182182
const matchCandidates: {
183-
handler: (event: KeyboardEvent) => void;
183+
// A candidate will be have an undefined handler if it's matched,
184+
// but handled in a parent component rather than this one.
185+
handler: ((event: KeyboardEvent) => void) | undefined;
184186
priority: number;
185187
}[] = [];
186188

187189
(Object.keys(hotkeyMatcherMap) as HotkeyName[]).forEach(
188190
(handlerName) => {
189191
const handler = handlersRef.current[handlerName];
192+
const hotkeyMatcher = hotkeyMatcherMap[handlerName];
190193

191-
if (handler) {
192-
const hotkeyMatcher = hotkeyMatcherMap[handlerName];
194+
const { isMatch, priority } = hotkeyMatcher(
195+
event,
196+
bufferedKeys.current,
197+
);
193198

194-
const { isMatch, priority } = hotkeyMatcher(
195-
event,
196-
bufferedKeys.current,
197-
);
198-
199-
if (isMatch) {
200-
matchCandidates.push({ handler, priority });
201-
}
199+
if (isMatch) {
200+
matchCandidates.push({ handler, priority });
202201
}
203202
},
204203
);

app/javascript/mastodon/components/status.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ class Status extends ImmutablePureComponent {
535535
}
536536

537537
const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);
538-
539538
return (
540539
<Hotkeys handlers={handlers} focusable={!unfocusable}>
541540
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id'), unread, focusable: !this.props.muted })} tabIndex={this.props.muted || unfocusable ? null : 0} data-featured={featured ? 'true' : null} aria-label={textForScreenReader({intl, status, rebloggedByText, isQuote: isQuotedPost})} ref={this.handleRef} data-nosnippet={status.getIn(['account', 'noindex'], true) || undefined}>

app/javascript/mastodon/components/status/boost_button.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const StandaloneBoostButton: FC<ReblogButtonProps> = ({ status, counters }) => {
6464
title={intl.formatMessage(meta ?? title)}
6565
icon='retweet'
6666
iconComponent={iconComponent}
67+
className='status__action-bar__button'
6768
onClick={!disabled ? handleClick : undefined}
6869
counter={
6970
counters
@@ -195,6 +196,7 @@ const BoostOrQuoteMenu: FC<ReblogButtonProps> = ({ status, counters }) => {
195196
isMenuDisabled ? messages.all_disabled : messages.reblog_or_quote,
196197
)}
197198
icon='retweet'
199+
className='status__action-bar__button'
198200
iconComponent={boostIcon}
199201
counter={
200202
counters

app/javascript/mastodon/components/status/handled_link.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
3838
return (
3939
<Link
4040
className={classNames('mention hashtag', className)}
41-
to={`/tags/${hashtag}`}
41+
to={`/tags/${encodeURIComponent(hashtag)}`}
4242
rel='tag'
4343
data-menu-hashtag={hashtagAccountId}
4444
>
@@ -71,7 +71,7 @@ export const HandledLink: FC<HandledLinkProps & ComponentProps<'a'>> = ({
7171
return (
7272
<a
7373
{...props}
74-
href={encodeURI(href)}
74+
href={href}
7575
title={href}
7676
className={classNames('unhandled-link', className)}
7777
target='_blank'

0 commit comments

Comments
 (0)