From 8123e86623e6f94b41131e94b17e84518c98ea47 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 3 Oct 2023 13:12:39 +0200 Subject: [PATCH] [Glitch] Fix double scroll bars in some columns in advanced interface Port 37bbd3c1064380a756b4e821655d7697105f99f5 to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/components/column.jsx | 6 -- .../glitch/features/explore/index.jsx | 72 +++++++++---------- .../glitch/features/explore/links.jsx | 2 +- .../glitch/features/explore/results.jsx | 2 +- .../glitch/features/explore/suggestions.jsx | 2 +- .../flavours/glitch/features/explore/tags.jsx | 2 +- .../glitch/features/firehose/index.jsx | 44 ++++++------ .../glitch/styles/components/explore.scss | 3 + 8 files changed, 63 insertions(+), 70 deletions(-) diff --git a/app/javascript/flavours/glitch/components/column.jsx b/app/javascript/flavours/glitch/components/column.jsx index 116d852168..e42a539052 100644 --- a/app/javascript/flavours/glitch/components/column.jsx +++ b/app/javascript/flavours/glitch/components/column.jsx @@ -24,12 +24,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/flavours/glitch/features/explore/index.jsx b/app/javascript/flavours/glitch/features/explore/index.jsx index 6eeba46ce7..f5baeb4b49 100644 --- a/app/javascript/flavours/glitch/features/explore/index.jsx +++ b/app/javascript/flavours/glitch/features/explore/index.jsx @@ -68,47 +68,45 @@ class Explore extends PureComponent { -
- {isSearching ? ( - - ) : ( - <> -
- - + {isSearching ? ( + + ) : ( + <> +
+ + + + + + + + + {signedIn && ( + + + )} - - - + + + +
- {signedIn && ( - - - - )} + + + + + + + + - - - -
- - - - - - - - - - - - {intl.formatMessage(messages.title)} - - - - )} -
+ + {intl.formatMessage(messages.title)} + + + + )} ); } diff --git a/app/javascript/flavours/glitch/features/explore/links.jsx b/app/javascript/flavours/glitch/features/explore/links.jsx index 5f1ca9360c..5dee66d183 100644 --- a/app/javascript/flavours/glitch/features/explore/links.jsx +++ b/app/javascript/flavours/glitch/features/explore/links.jsx @@ -62,7 +62,7 @@ class Links extends PureComponent { } return ( -
+
{banner} {isLoading ? () : links.map((link, i) => ( diff --git a/app/javascript/flavours/glitch/features/explore/results.jsx b/app/javascript/flavours/glitch/features/explore/results.jsx index b7e9d22ee7..ccdd50c1e9 100644 --- a/app/javascript/flavours/glitch/features/explore/results.jsx +++ b/app/javascript/flavours/glitch/features/explore/results.jsx @@ -204,7 +204,7 @@ class Results extends PureComponent {
-
+
+
{isLoading ? : suggestions.map(suggestion => ( ))} diff --git a/app/javascript/flavours/glitch/features/explore/tags.jsx b/app/javascript/flavours/glitch/features/explore/tags.jsx index 38fa5f7fbb..bebc9bbb53 100644 --- a/app/javascript/flavours/glitch/features/explore/tags.jsx +++ b/app/javascript/flavours/glitch/features/explore/tags.jsx @@ -63,7 +63,7 @@ class Tags extends PureComponent { } return ( -
+
{banner} {isLoading ? () : hashtags.map(hashtag => ( diff --git a/app/javascript/flavours/glitch/features/firehose/index.jsx b/app/javascript/flavours/glitch/features/firehose/index.jsx index 3cdeda97c1..c01c767b86 100644 --- a/app/javascript/flavours/glitch/features/firehose/index.jsx +++ b/app/javascript/flavours/glitch/features/firehose/index.jsx @@ -188,33 +188,31 @@ const Firehose = ({ feedType, multiColumn }) => { -
-
- - - +
+ + + - - - + + + - - - -
- - + + +
+ + {intl.formatMessage(messages.title)} diff --git a/app/javascript/flavours/glitch/styles/components/explore.scss b/app/javascript/flavours/glitch/styles/components/explore.scss index 78826e6331..79da9f2166 100644 --- a/app/javascript/flavours/glitch/styles/components/explore.scss +++ b/app/javascript/flavours/glitch/styles/components/explore.scss @@ -37,6 +37,9 @@ flex: 1 1 auto; display: flex; flex-direction: column; + background: $ui-base-color; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; } .story {