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 | 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 d737bd347..cf9df3ba2 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 1a66adc87..fefdc23fa 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 663aa6d80..e610c84d4 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 c6fe9b78e..4c23d6422 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 1a4d25969..11e014721 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 e5b47d3fe..efde58a5c 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 2e305ed75..f0380de5b 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 {