From c476399992bee7c6fc1c30687cabf8ec91855550 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 3 Sep 2026 14:08:40 +0000 Subject: [PATCH] Redesign: Add new column header to post/thread page (#40372) --- .../column_header/styles.module.scss | 3 +- .../components/column_settings_redesign.tsx | 5 +- .../mastodon/features/home_timeline/index.jsx | 3 +- .../mastodon/features/status/index.jsx | 49 +++++++++++++++---- app/javascript/mastodon/locales/en.json | 5 +- 5 files changed, 51 insertions(+), 14 deletions(-) diff --git a/app/javascript/mastodon/components/column_header/styles.module.scss b/app/javascript/mastodon/components/column_header/styles.module.scss index 12268b7901a..da7bcc9e086 100644 --- a/app/javascript/mastodon/components/column_header/styles.module.scss +++ b/app/javascript/mastodon/components/column_header/styles.module.scss @@ -44,11 +44,10 @@ grid-area: 1 / 2; white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; min-width: 0; > button { + text-overflow: ellipsis; overflow: hidden; width: 100%; padding: 0; diff --git a/app/javascript/mastodon/features/home_timeline/components/column_settings_redesign.tsx b/app/javascript/mastodon/features/home_timeline/components/column_settings_redesign.tsx index 067e051dbd1..ddc818a2ff9 100644 --- a/app/javascript/mastodon/features/home_timeline/components/column_settings_redesign.tsx +++ b/app/javascript/mastodon/features/home_timeline/components/column_settings_redesign.tsx @@ -37,7 +37,10 @@ export const HomeColumnSettings: React.FC<{ + } > {isRedesignEnabled() ? ( diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx index 06a5037036a..d693ba744d1 100644 --- a/app/javascript/mastodon/features/status/index.jsx +++ b/app/javascript/mastodon/features/status/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; -import { defineMessages } from 'react-intl'; +import { defineMessages, FormattedMessage } from 'react-intl'; import classNames from 'classnames'; import { Helmet } from '@unhead/react/helmet'; @@ -14,7 +14,9 @@ import { connect } from 'react-redux'; import VisibilityIcon from '@/material-icons/400-24px/visibility.svg?react'; import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react'; import { Column } from '@/mastodon/components/column'; -import { ColumnHeader } from '@/mastodon/components/column/header'; +import { ColumnHeader as LegacyColumnHeader } from '@/mastodon/components/column/header'; +import { ColumnHeader, ColumnSettingsMenu } from '@/mastodon/components/column_header'; +import { DisplayNameSimple } from '@/mastodon/components/display_name/simple'; import { Hotkeys } from 'mastodon/components/hotkeys'; import { Icon } from 'mastodon/components/icon'; import { injectIntl } from '@/mastodon/components/intl'; @@ -73,6 +75,7 @@ import { DetailedStatus } from './components/detailed_status'; import { RefreshController } from './components/refresh_controller'; import { quoteComposeById } from '@/mastodon/actions/compose_typed'; import { FOCUS_TARGET, NavigationFocusTarget } from '@/mastodon/components/navigation_focus_target'; +import { isRedesignEnabled } from '@/mastodon/utils/environment'; const messages = defineMessages({ revealAll: { id: 'status.show_more_all', defaultMessage: 'Show more for all' }, @@ -555,6 +558,7 @@ class Status extends ImmutablePureComponent { descendants = <>{this.renderChildren(descendantsIds)}; } + const account = status.get('account'); const isLocal = status.getIn(['account', 'acct'], '').indexOf('@') === -1; const isIndexable = !status.getIn(['account', 'noindex']); @@ -573,13 +577,40 @@ class Status extends ImmutablePureComponent { return ( - - )} - /> + {isRedesignEnabled() ? ( + + }} + /> + } + extraButtons={ + + } + > + WIP: This menu will contain post actions from the new Status component + + } + /> + ) : ( + + )} + /> + )}
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index a68882a4fe6..fcad2150575 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -463,6 +463,8 @@ "column.firehose_local": "Live feed for this server", "column.firehose_singular": "Live feed", "column.follow_requests": "Follow requests", + "column.following": "Following", + "column.following_settings": "Following Feed Settings", "column.has_unread_content": "(has unread content)", "column.home": "Home", "column.list_members": "Manage list members", @@ -862,7 +864,6 @@ "home.pending_critical_update.body": "Please update your Mastodon server as soon as possible!", "home.pending_critical_update.link": "See updates", "home.pending_critical_update.title": "Critical security update available!", - "home.settings": "Home Settings", "home.show_announcements": "Show announcements", "ignore_notifications_modal.bots_title": "Ignore notifications from bots?", "ignore_notifications_modal.disclaimer": "Mastodon cannot inform users that you've ignored their notifications. Ignoring notifications will not stop the messages themselves from being sent.", @@ -1358,6 +1359,7 @@ "status.mute_conversation": "Mute conversation", "status.not_quoted": "You are not quoted in this post", "status.open": "Expand this post", + "status.options": "Post options", "status.pin": "Pin on profile", "status.public_only": "This post is private", "status.quote": "Quote", @@ -1405,6 +1407,7 @@ "status.show_less_all": "Show less for all", "status.show_more_all": "Show more for all", "status.show_original": "Show original", + "status.title": "Post by {name}", "status.title.with_attachments": "{user} posted {attachmentCount, plural, one {an attachment} other {{attachmentCount} attachments}}", "status.translate": "Translate", "status.translated_from_with": "Translated from {lang} using {provider}",