From 3e21780cf16944e9903d6234e58f711df69a4e1d 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 | 72 +++++++++---------- .../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 | 42 ++++++----- .../styles/mastodon/components.scss | 3 + 8 files changed, 62 insertions(+), 69 deletions(-) diff --git a/app/javascript/mastodon/components/column.jsx b/app/javascript/mastodon/components/column.jsx index d737bd347c..cf9df3ba27 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 1a66adc87c..fefdc23fab 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 663aa6d80f..e610c84d41 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 c6fe9b78e0..4c23d6422d 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 1a4d259690..11e0147214 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 e5b47d3fe0..efde58a5c0 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 41436a92f9..567397a07b 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -8278,6 +8278,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 {