From 98a2bb8be2e47d26b6306dcbe82c82a1f17f0813 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 20 Mar 2024 18:02:09 +0100 Subject: [PATCH 1/8] Fix issue with severed relationships notifications (#29668) --- app/models/account_relationship_severance_event.rb | 2 +- app/models/notification.rb | 2 +- app/serializers/rest/notification_serializer.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/account_relationship_severance_event.rb b/app/models/account_relationship_severance_event.rb index 32b185e3af..e621b54758 100644 --- a/app/models/account_relationship_severance_event.rb +++ b/app/models/account_relationship_severance_event.rb @@ -16,7 +16,7 @@ class AccountRelationshipSeveranceEvent < ApplicationRecord belongs_to :account belongs_to :relationship_severance_event - delegate :severed_relationships, :type, :target_name, :purged, to: :relationship_severance_event, prefix: false + delegate :severed_relationships, :type, :target_name, :purged?, to: :relationship_severance_event, prefix: false before_create :set_relationships_count! diff --git a/app/models/notification.rb b/app/models/notification.rb index 8ee7e77258..b2376c78a3 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -89,7 +89,7 @@ class Notification < ApplicationRecord belongs_to :favourite, inverse_of: :notification belongs_to :poll, inverse_of: false belongs_to :report, inverse_of: false - belongs_to :relationship_severance_event, inverse_of: false + belongs_to :account_relationship_severance_event, inverse_of: false end validates :type, inclusion: { in: TYPES } diff --git a/app/serializers/rest/notification_serializer.rb b/app/serializers/rest/notification_serializer.rb index d7b88b7c37..36a0adfec4 100644 --- a/app/serializers/rest/notification_serializer.rb +++ b/app/serializers/rest/notification_serializer.rb @@ -6,7 +6,7 @@ class REST::NotificationSerializer < ActiveModel::Serializer belongs_to :from_account, key: :account, serializer: REST::AccountSerializer belongs_to :target_status, key: :status, if: :status_type?, serializer: REST::StatusSerializer belongs_to :report, if: :report_type?, serializer: REST::ReportSerializer - belongs_to :relationship_severance_event, key: :event, if: :relationship_severance_event?, serializer: REST::AccountRelationshipSeveranceEventSerializer + belongs_to :account_relationship_severance_event, key: :event, if: :relationship_severance_event?, serializer: REST::AccountRelationshipSeveranceEventSerializer def id object.id.to_s From f4d753aedfd0916cba554e5cce42b854072de642 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 20 Mar 2024 18:14:53 +0100 Subject: [PATCH 2/8] Fix error in severed relationship event serializer (#29670) --- app/models/account_relationship_severance_event.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/account_relationship_severance_event.rb b/app/models/account_relationship_severance_event.rb index e621b54758..84b8b1c65a 100644 --- a/app/models/account_relationship_severance_event.rb +++ b/app/models/account_relationship_severance_event.rb @@ -16,7 +16,13 @@ class AccountRelationshipSeveranceEvent < ApplicationRecord belongs_to :account belongs_to :relationship_severance_event - delegate :severed_relationships, :type, :target_name, :purged?, to: :relationship_severance_event, prefix: false + delegate :severed_relationships, + :type, + :target_name, + :purged, + :purged?, + to: :relationship_severance_event, + prefix: false before_create :set_relationships_count! From be52633ee4ce4a14b48f82156cf64c0a3eb9835b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 20 Mar 2024 18:21:03 +0100 Subject: [PATCH 3/8] Change back button to always appear in advanced web UI (#29669) --- .../mastodon/components/column_header.jsx | 23 ++++++++----------- .../features/follow_requests/index.jsx | 2 +- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 7fd646690d..a7d07ffdb0 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -13,7 +13,7 @@ import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react' import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import SettingsIcon from '@/material-icons/400-24px/settings.svg?react'; import { Icon } from 'mastodon/components/icon'; -import { ButtonInTabsBar, useColumnsContext } from 'mastodon/features/ui/util/columns_context'; +import { ButtonInTabsBar } from 'mastodon/features/ui/util/columns_context'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; import { useAppHistory } from './router'; @@ -26,10 +26,9 @@ const messages = defineMessages({ back: { id: 'column_back_button.label', defaultMessage: 'Back' }, }); -const BackButton = ({ pinned, show, onlyIcon }) => { +const BackButton = ({ onlyIcon }) => { const history = useAppHistory(); const intl = useIntl(); - const { multiColumn } = useColumnsContext(); const handleBackClick = useCallback(() => { if (history.location?.state?.fromMastodon) { @@ -39,10 +38,6 @@ const BackButton = ({ pinned, show, onlyIcon }) => { } }, [history]); - const showButton = history && !pinned && ((multiColumn && history.location?.state?.fromMastodon) || show); - - if (!showButton) return null; - return ( ; } - backButton = ; + if (history && !pinned && ((multiColumn && history.location?.state?.fromMastodon) || showBackButton)) { + backButton = ; + } const collapsedContent = [ extraContent, @@ -199,16 +194,16 @@ class ColumnHeader extends PureComponent {

{hasTitle && ( <> - {showBackButton && backButton} + {backButton} )} - {!hasTitle && showBackButton && backButton} + {!hasTitle && backButton}
{extraButton} diff --git a/app/javascript/mastodon/features/follow_requests/index.jsx b/app/javascript/mastodon/features/follow_requests/index.jsx index 7d651f2ca6..a8f40a31d0 100644 --- a/app/javascript/mastodon/features/follow_requests/index.jsx +++ b/app/javascript/mastodon/features/follow_requests/index.jsx @@ -68,7 +68,7 @@ class FollowRequests extends ImmutablePureComponent { ); return ( - + Date: Wed, 20 Mar 2024 18:10:50 -0400 Subject: [PATCH 4/8] Lock `i18n` gem to version `1.14.1` (#29674) --- Gemfile | 1 + Gemfile.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 3a1ff81d43..c19a011538 100644 --- a/Gemfile +++ b/Gemfile @@ -58,6 +58,7 @@ gem 'htmlentities', '~> 4.3' gem 'http', '~> 5.1' gem 'http_accept_language', '~> 2.1' gem 'httplog', '~> 1.6.2' +gem 'i18n', '1.14.1' # TODO: Remove version when resolved: https://github.com/glebm/i18n-tasks/issues/552 / https://github.com/ruby-i18n/i18n/pull/688 gem 'idn-ruby', require: 'idn' gem 'inline_svg' gem 'kaminari', '~> 1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 9c5bb940bc..46e8eb1e66 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -866,6 +866,7 @@ DEPENDENCIES http (~> 5.1) http_accept_language (~> 2.1) httplog (~> 1.6.2) + i18n (= 1.14.1) i18n-tasks (~> 1.0) idn-ruby inline_svg From 39bac24cb73b249e1260c5ee29cd9ffcf482dee0 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 20 Mar 2024 18:12:11 -0400 Subject: [PATCH 5/8] Remove reference to deleted haml lint todo file (#29675) --- .haml-lint.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.haml-lint.yml b/.haml-lint.yml index b94eb8b0df..2b553ca56c 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -1,5 +1,3 @@ -inherits_from: .haml-lint_todo.yml - exclude: - 'vendor/**/*' - lib/templates/haml/scaffold/_form.html.haml From 7434c9c2768a2c9776d69794f6200aa4c1e81607 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 21 Mar 2024 09:28:37 +0100 Subject: [PATCH 6/8] Fix the relationships controller spec, since it requires an extra model now (#29671) --- spec/requests/severed_relationships_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/requests/severed_relationships_spec.rb b/spec/requests/severed_relationships_spec.rb index 4063026d79..05a48ca349 100644 --- a/spec/requests/severed_relationships_spec.rb +++ b/spec/requests/severed_relationships_spec.rb @@ -7,11 +7,12 @@ describe 'Severed relationships page' do describe 'GET severed_relationships#index' do let(:user) { Fabricate(:user) } + let(:event) { Fabricate(:account_relationship_severance_event, account: user.account) } before do sign_in user - Fabricate(:severed_relationship, local_account: user.account) + Fabricate.times(3, :severed_relationship, local_account: user.account, relationship_severance_event: event.relationship_severance_event) end it 'returns http success' do From 3f363c61bc5ccd55636c0d0bda67b47f956499fb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 09:32:25 +0100 Subject: [PATCH 7/8] Update dependency postcss to v8.4.38 (#29684) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4336dcb977..cef691dd01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13858,13 +13858,13 @@ __metadata: linkType: hard "postcss@npm:^8.2.15, postcss@npm:^8.4.24, postcss@npm:^8.4.33": - version: 8.4.37 - resolution: "postcss@npm:8.4.37" + version: 8.4.38 + resolution: "postcss@npm:8.4.38" dependencies: nanoid: "npm:^3.3.7" picocolors: "npm:^1.0.0" source-map-js: "npm:^1.2.0" - checksum: 10c0/0b5730ad0ccbceaf0faaa4a283a144adefd23254f17dbdd63be5e0b37193c7df58003f88742c04c3ae6fd60d1a5158b331a4ce926797fb21e94833ae83c6bf69 + checksum: 10c0/955407b8f70cf0c14acf35dab3615899a2a60a26718a63c848cf3c29f2467b0533991b985a2b994430d890bd7ec2b1963e36352b0774a19143b5f591540f7c06 languageName: node linkType: hard From 01464074c91f9b7a720928fc4ee912be3d8002d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 09:32:31 +0100 Subject: [PATCH 8/8] Update dependency autoprefixer to v10.4.19 (#29682) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index cef691dd01..e8bb3c2eb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5039,11 +5039,11 @@ __metadata: linkType: hard "autoprefixer@npm:^10.4.14, autoprefixer@npm:^10.4.18": - version: 10.4.18 - resolution: "autoprefixer@npm:10.4.18" + version: 10.4.19 + resolution: "autoprefixer@npm:10.4.19" dependencies: browserslist: "npm:^4.23.0" - caniuse-lite: "npm:^1.0.30001591" + caniuse-lite: "npm:^1.0.30001599" fraction.js: "npm:^4.3.7" normalize-range: "npm:^0.1.2" picocolors: "npm:^1.0.0" @@ -5052,7 +5052,7 @@ __metadata: postcss: ^8.1.0 bin: autoprefixer: bin/autoprefixer - checksum: 10c0/b6e1c1ba2fc6c09360cdcd75b00ce809c5dbe1ad4c30f0186764609a982aa5563d45965cb9e6a9d195c639a9fb1dcac2594484fc41624050195f626e9add666e + checksum: 10c0/fe0178eb8b1da4f15c6535cd329926609b22d1811e047371dccce50563623f8075dd06fb167daff059e4228da651b0bdff6d9b44281541eaf0ce0b79125bfd19 languageName: node linkType: hard @@ -5795,10 +5795,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001591": - version: 1.0.30001591 - resolution: "caniuse-lite@npm:1.0.30001591" - checksum: 10c0/21937d341c3d75994504db21340f65573a1e847a8ab33ee4964ed493994d6552864c494ba144485459abd9c711c75c0708bc9fa19f2bff525bff75ffb0a42c3b +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001599": + version: 1.0.30001599 + resolution: "caniuse-lite@npm:1.0.30001599" + checksum: 10c0/8b3b9610b5be88533a3c8d0770d6896f7b1a9fee3dbeb7339e4ee119a514c81e5e07a628a5a289a6541ca291ac78a9402f5a99cf6012139e91f379083488a8eb languageName: node linkType: hard