mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-11 14:30:35 +00:00
Merge commit 'd887790e86124493df850e9bc52e1e059207b523' into glitch-soc/merge-upstream
This commit is contained in:
1
.github/workflows/chromatic.yml
vendored
1
.github/workflows/chromatic.yml
vendored
@@ -20,6 +20,7 @@ jobs:
|
||||
chromatic:
|
||||
name: Run Chromatic
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'mastodon/mastodon'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useCallback, useState, useRef } from 'react';
|
||||
import { useCallback, useState, useRef, useEffect } from 'react';
|
||||
|
||||
import {
|
||||
defineMessages,
|
||||
@@ -72,6 +72,10 @@ export const Search: React.FC<{
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const [selectedOption, setSelectedOption] = useState(-1);
|
||||
const [quickActions, setQuickActions] = useState<SearchOption[]>([]);
|
||||
useEffect(() => {
|
||||
setValue(initialValue ?? '');
|
||||
setQuickActions([]);
|
||||
}, [initialValue]);
|
||||
const searchOptions: SearchOption[] = [];
|
||||
|
||||
if (searchEnabled) {
|
||||
|
||||
@@ -1882,16 +1882,18 @@ body > [data-popper-placement] {
|
||||
}
|
||||
|
||||
.status__quote {
|
||||
--quote-margin: 36px;
|
||||
|
||||
position: relative;
|
||||
margin-block-start: 16px;
|
||||
margin-inline-start: 36px;
|
||||
margin-inline-start: calc(var(--quote-margin) + var(--thread-margin, 0px));
|
||||
border-radius: 8px;
|
||||
color: var(--nested-card-text);
|
||||
background: var(--nested-card-background);
|
||||
border: var(--nested-card-border);
|
||||
|
||||
@media screen and (min-width: $mobile-breakpoint) {
|
||||
margin-inline-start: 56px;
|
||||
@container (width > 460px) {
|
||||
--quote-margin: 56px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1951,7 +1953,7 @@ body > [data-popper-placement] {
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
@media screen and (min-width: $mobile-breakpoint) {
|
||||
@container (width > 460px) {
|
||||
inset-inline-start: -50px;
|
||||
}
|
||||
}
|
||||
@@ -2878,6 +2880,7 @@ a.account__display-name {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
contain: inline-size layout paint style;
|
||||
container: column / inline-size;
|
||||
|
||||
@media screen and (min-width: $no-gap-breakpoint) {
|
||||
max-width: 600px;
|
||||
|
||||
@@ -8,6 +8,7 @@ class Admin::SystemCheck::SidekiqProcessCheck < Admin::SystemCheck::BaseCheck
|
||||
pull
|
||||
scheduler
|
||||
ingress
|
||||
fasp
|
||||
).freeze
|
||||
|
||||
def skip?
|
||||
|
||||
@@ -16,7 +16,7 @@ module Status::SafeReblogInsert
|
||||
# The code is kept similar to ActiveRecord::Persistence code and calls it
|
||||
# directly when we are not handling a reblog.
|
||||
#
|
||||
# https://github.com/rails/rails/blob/v7.2.1.1/activerecord/lib/active_record/persistence.rb#L238-L263
|
||||
# https://github.com/rails/rails/blob/v8.0.2/activerecord/lib/active_record/persistence.rb#L238-L261
|
||||
def _insert_record(connection, values, returning)
|
||||
return super unless values.is_a?(Hash) && values['reblog_of_id']&.value.present?
|
||||
|
||||
@@ -36,15 +36,13 @@ module Status::SafeReblogInsert
|
||||
# Instead, we use a custom builder when a reblog is happening:
|
||||
im = _compile_reblog_insert(values)
|
||||
|
||||
with_connection do |_c|
|
||||
connection.insert(
|
||||
im, "#{self} Create", primary_key || false, primary_key_value,
|
||||
returning: returning
|
||||
).tap do |result|
|
||||
# Since we are using SELECT instead of VALUES, a non-error `nil` return is possible.
|
||||
# For our purposes, it's equivalent to a foreign key constraint violation
|
||||
raise ActiveRecord::InvalidForeignKey, "(reblog_of_id)=(#{values['reblog_of_id'].value}) is not present in table \"statuses\"" if result.nil?
|
||||
end
|
||||
connection.insert(
|
||||
im, "#{self} Create", primary_key || false, primary_key_value,
|
||||
returning: returning
|
||||
).tap do |result|
|
||||
# Since we are using SELECT instead of VALUES, a non-error `nil` return is possible.
|
||||
# For our purposes, it's equivalent to a foreign key constraint violation
|
||||
raise ActiveRecord::InvalidForeignKey, "(reblog_of_id)=(#{values['reblog_of_id'].value}) is not present in table \"statuses\"" if result.nil?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@ RSpec.describe Admin::SystemCheck::SidekiqProcessCheck do
|
||||
|
||||
describe 'message' do
|
||||
it 'sends values to message instance' do
|
||||
allow(Admin::SystemCheck::Message).to receive(:new).with(:sidekiq_process_check, 'default, push, mailers, pull, scheduler, ingress')
|
||||
allow(Admin::SystemCheck::Message).to receive(:new).with(:sidekiq_process_check, 'default, push, mailers, pull, scheduler, ingress, fasp')
|
||||
|
||||
check.message
|
||||
|
||||
expect(Admin::SystemCheck::Message).to have_received(:new).with(:sidekiq_process_check, 'default, push, mailers, pull, scheduler, ingress')
|
||||
expect(Admin::SystemCheck::Message).to have_received(:new).with(:sidekiq_process_check, 'default, push, mailers, pull, scheduler, ingress, fasp')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user