diff --git a/.prettierignore b/.prettierignore index 098dac67177..bd382506695 100644 --- a/.prettierignore +++ b/.prettierignore @@ -68,6 +68,7 @@ docker-compose.override.yml # Ignore vendored CSS reset app/javascript/styles/mastodon/reset.scss +app/javascript/styles_new/mastodon/reset.scss # Ignore Javascript pending https://github.com/mastodon/mastodon/pull/23631 *.js diff --git a/app/helpers/theme_helper.rb b/app/helpers/theme_helper.rb index 00b4a6d2b3f..32734b93af9 100644 --- a/app/helpers/theme_helper.rb +++ b/app/helpers/theme_helper.rb @@ -4,11 +4,11 @@ module ThemeHelper def theme_style_tags(theme) if theme == 'system' ''.html_safe.tap do |tags| - tags << vite_stylesheet_tag('themes/mastodon-light', type: :virtual, media: 'not all and (prefers-color-scheme: dark)', crossorigin: 'anonymous') - tags << vite_stylesheet_tag('themes/default', type: :virtual, media: '(prefers-color-scheme: dark)', crossorigin: 'anonymous') + tags << vite_stylesheet_tag(theme_path_for('mastodon-light'), type: :virtual, media: 'not all and (prefers-color-scheme: dark)', crossorigin: 'anonymous') + tags << vite_stylesheet_tag(theme_path_for('default'), type: :virtual, media: '(prefers-color-scheme: dark)', crossorigin: 'anonymous') end else - vite_stylesheet_tag "themes/#{theme}", type: :virtual, media: 'all', crossorigin: 'anonymous' + vite_stylesheet_tag theme_path_for(theme), type: :virtual, media: 'all', crossorigin: 'anonymous' end end @@ -53,4 +53,8 @@ module ThemeHelper def theme_color_for(theme) theme == 'mastodon-light' ? Themes::THEME_COLORS[:light] : Themes::THEME_COLORS[:dark] end + + def theme_path_for(theme) + Mastodon::Feature.theme_tokens_enabled? ? "themes/#{theme}_theme_tokens" : "themes/#{theme}" + end end diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 2a8c9bfb2d8..1e746e5f710 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -553,7 +553,6 @@ class Status extends ImmutablePureComponent { } const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); - return (
diff --git a/app/javascript/mastodon/components/status/boost_button.tsx b/app/javascript/mastodon/components/status/boost_button.tsx index 7d5939de6d3..023ba8ff195 100644 --- a/app/javascript/mastodon/components/status/boost_button.tsx +++ b/app/javascript/mastodon/components/status/boost_button.tsx @@ -64,6 +64,7 @@ const StandaloneBoostButton: FC = ({ status, counters }) => { title={intl.formatMessage(meta ?? title)} icon='retweet' iconComponent={iconComponent} + className='status__action-bar__button' onClick={!disabled ? handleClick : undefined} counter={ counters @@ -195,6 +196,7 @@ const BoostOrQuoteMenu: FC = ({ status, counters }) => { isMenuDisabled ? messages.all_disabled : messages.reblog_or_quote, )} icon='retweet' + className='status__action-bar__button' iconComponent={boostIcon} counter={ counters diff --git a/app/javascript/mastodon/components/status_action_bar/index.jsx b/app/javascript/mastodon/components/status_action_bar/index.jsx index ba184f57544..5c79970e23f 100644 --- a/app/javascript/mastodon/components/status_action_bar/index.jsx +++ b/app/javascript/mastodon/components/status_action_bar/index.jsx @@ -406,15 +406,19 @@ class StatusActionBar extends ImmutablePureComponent { status={status} needsStatusRefresh={quickBoosting && status.get('quote_approval') === null} items={menu} - icon='ellipsis-h' - iconComponent={MoreHorizIcon} direction='right' - title={intl.formatMessage(messages.more)} onOpen={() => { dismissQuoteHint(); return true; }} - /> + > + + )}
diff --git a/app/javascript/mastodon/features/about/components/rules.tsx b/app/javascript/mastodon/features/about/components/rules.tsx index 07ca1039602..1b1e28a7ff2 100644 --- a/app/javascript/mastodon/features/about/components/rules.tsx +++ b/app/javascript/mastodon/features/about/components/rules.tsx @@ -104,17 +104,19 @@ export const RulesSection: FC = ({ isLoading = false }) => { defaultMessage='Language' /> - +
+ +
)} diff --git a/app/javascript/mastodon/features/account/components/follow_request_note.jsx b/app/javascript/mastodon/features/account/components/follow_request_note.jsx index 9c20f1e0626..27ebb8fd64b 100644 --- a/app/javascript/mastodon/features/account/components/follow_request_note.jsx +++ b/app/javascript/mastodon/features/account/components/follow_request_note.jsx @@ -24,12 +24,12 @@ export default class FollowRequestNote extends ImmutablePureComponent {
- - diff --git a/app/javascript/mastodon/features/compose/components/text_icon_button.jsx b/app/javascript/mastodon/features/compose/components/text_icon_button.jsx deleted file mode 100644 index 166d022b88a..00000000000 --- a/app/javascript/mastodon/features/compose/components/text_icon_button.jsx +++ /dev/null @@ -1,38 +0,0 @@ -import PropTypes from 'prop-types'; -import { PureComponent } from 'react'; - -const iconStyle = { - height: null, - lineHeight: '27px', - minWidth: `${18 * 1.28571429}px`, -}; - -export default class TextIconButton extends PureComponent { - - static propTypes = { - label: PropTypes.string.isRequired, - title: PropTypes.string, - active: PropTypes.bool, - onClick: PropTypes.func.isRequired, - ariaControls: PropTypes.string, - }; - - render () { - const { label, title, active, ariaControls } = this.props; - - return ( - - ); - } - -} diff --git a/app/javascript/mastodon/features/compose/index.tsx b/app/javascript/mastodon/features/compose/index.tsx index 892cbb97617..527e541e84d 100644 --- a/app/javascript/mastodon/features/compose/index.tsx +++ b/app/javascript/mastodon/features/compose/index.tsx @@ -166,7 +166,7 @@ const Compose: React.FC<{ multiColumn: boolean }> = ({ multiColumn }) => {
-
+
diff --git a/app/javascript/mastodon/features/navigation_panel/components/disabled_account_banner.tsx b/app/javascript/mastodon/features/navigation_panel/components/disabled_account_banner.tsx index 9103170fa75..6cb450d1d61 100644 --- a/app/javascript/mastodon/features/navigation_panel/components/disabled_account_banner.tsx +++ b/app/javascript/mastodon/features/navigation_panel/components/disabled_account_banner.tsx @@ -75,7 +75,7 @@ export const DisabledAccountBanner: React.FC = () => {
diff --git a/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx b/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx index beaf1856382..2461028d8be 100644 --- a/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx +++ b/app/javascript/mastodon/features/ui/components/bundle_column_error.jsx @@ -98,7 +98,7 @@ class BundleColumnError extends PureComponent {
{errorType === 'network' && } {errorType === 'error' && } - +
diff --git a/app/javascript/mastodon/features/ui/components/modal_placeholder.tsx b/app/javascript/mastodon/features/ui/components/modal_placeholder.tsx index 13ec6ca2c82..9901ab6492b 100644 --- a/app/javascript/mastodon/features/ui/components/modal_placeholder.tsx +++ b/app/javascript/mastodon/features/ui/components/modal_placeholder.tsx @@ -46,7 +46,7 @@ export const ModalPlaceholder: React.FC<{ defaultMessage='Try again' /> -