From 37bbd3c1064380a756b4e821655d7697105f99f5 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 3 Oct 2023 13:12:39 +0200 Subject: [PATCH] Fix double scroll bars in some columns in advanced interface (#27187) --- app/javascript/mastodon/components/column.jsx | 6 -- .../mastodon/features/explore/index.jsx | 78 +++++++++---------- .../mastodon/features/explore/links.jsx | 2 +- .../mastodon/features/explore/results.jsx | 2 +- .../mastodon/features/explore/suggestions.jsx | 2 +- .../mastodon/features/explore/tags.jsx | 2 +- .../mastodon/features/firehose/index.jsx | 46 ++++++----- .../styles/mastodon/components.scss | 3 + 8 files changed, 67 insertions(+), 74 deletions(-) diff --git a/app/javascript/mastodon/components/column.jsx b/app/javascript/mastodon/components/column.jsx index d737bd347c69d7f60884203fd3fe7abb5e907767..cf9df3ba273584f0f6804113eb49e2cf19d39bc9 100644 --- a/app/javascript/mastodon/components/column.jsx +++ b/app/javascript/mastodon/components/column.jsx @@ -22,12 +22,6 @@ export default class Column extends PureComponent { scrollable = document.scrollingElement; } else { scrollable = this.node.querySelector('.scrollable'); - - // Some columns have nested `.scrollable` containers, with the outer one - // being a wrapper while the actual scrollable content is deeper. - if (scrollable.classList.contains('scrollable--flex')) { - scrollable = scrollable?.querySelector('.scrollable') || scrollable; - } } if (!scrollable) { diff --git a/app/javascript/mastodon/features/explore/index.jsx b/app/javascript/mastodon/features/explore/index.jsx index 1a66adc87cc1923d8644cdf988dc2bd41bb40c5b..fefdc23fab1ebe8673be5ac427aaad251f6fdcb7 100644 --- a/app/javascript/mastodon/features/explore/index.jsx +++ b/app/javascript/mastodon/features/explore/index.jsx @@ -67,47 +67,45 @@ class Explore extends PureComponent { -
- {isSearching ? ( - - ) : ( - <> -
- - + {isSearching ? ( + + ) : ( + <> +
+ + + + + + + + + {signedIn && ( + + - - - - - - {signedIn && ( - - - - )} - - - - -
- - - - - - - - - - - - {intl.formatMessage(messages.title)} - - - - )} -
+ )} + + + + +
+ + + + + + + + + + + + {intl.formatMessage(messages.title)} + + + + )} ); } diff --git a/app/javascript/mastodon/features/explore/links.jsx b/app/javascript/mastodon/features/explore/links.jsx index 663aa6d80f5fd96002ab0bc167274cbbbeb6001a..e610c84d419cc834351a860cf01ab417551e0d6d 100644 --- a/app/javascript/mastodon/features/explore/links.jsx +++ b/app/javascript/mastodon/features/explore/links.jsx @@ -52,7 +52,7 @@ class Links extends PureComponent { } return ( -
+
{banner} {isLoading ? () : links.map((link, i) => ( diff --git a/app/javascript/mastodon/features/explore/results.jsx b/app/javascript/mastodon/features/explore/results.jsx index c6fe9b78e0f07a750e9e4d90415a92c03d8e54d9..4c23d6422d967e5e0b2decdb7417c0f26c9edb86 100644 --- a/app/javascript/mastodon/features/explore/results.jsx +++ b/app/javascript/mastodon/features/explore/results.jsx @@ -204,7 +204,7 @@ class Results extends PureComponent {
-
+
+
{isLoading ? : suggestions.map(suggestion => ( ))} diff --git a/app/javascript/mastodon/features/explore/tags.jsx b/app/javascript/mastodon/features/explore/tags.jsx index 1a4d25969066a32a02bbb023e7c9e9d343f9a92c..11e014721495c84f65af6bedc70d1e8f2cb6fc2e 100644 --- a/app/javascript/mastodon/features/explore/tags.jsx +++ b/app/javascript/mastodon/features/explore/tags.jsx @@ -51,7 +51,7 @@ class Tags extends PureComponent { } return ( -
+
{banner} {isLoading ? () : hashtags.map(hashtag => ( diff --git a/app/javascript/mastodon/features/firehose/index.jsx b/app/javascript/mastodon/features/firehose/index.jsx index e5b47d3fe03ce883b2a237d5b801246a126cfc7e..efde58a5c0a9bbf936311c12d9494651503623e7 100644 --- a/app/javascript/mastodon/features/firehose/index.jsx +++ b/app/javascript/mastodon/features/firehose/index.jsx @@ -169,32 +169,30 @@ const Firehose = ({ feedType, multiColumn }) => { -
-
- - - - - - - - - - - -
- - +
+ + + + + + + + + + +
+ + {intl.formatMessage(messages.title)} diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 2e305ed7592a18555549c8db595dc425a616c324..f0380de5bf8db7b35a62ae5ce3d3698baec55b67 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -8279,6 +8279,9 @@ noscript { flex: 1 1 auto; display: flex; flex-direction: column; + background: $ui-base-color; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; } .story {