summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-10-03 13:12:39 +0200
committerGitHub <noreply@github.com>2023-10-03 13:12:39 +0200
commit37bbd3c1064380a756b4e821655d7697105f99f5 (patch)
tree0a620475ce3ab506647592764554dedd06cd0703
parentceb365c41950283f601058e38e779565eca43b31 (diff)
Fix double scroll bars in some columns in advanced interface (#27187)
-rw-r--r--app/javascript/mastodon/components/column.jsx6
-rw-r--r--app/javascript/mastodon/features/explore/index.jsx78
-rw-r--r--app/javascript/mastodon/features/explore/links.jsx2
-rw-r--r--app/javascript/mastodon/features/explore/results.jsx2
-rw-r--r--app/javascript/mastodon/features/explore/suggestions.jsx2
-rw-r--r--app/javascript/mastodon/features/explore/tags.jsx2
-rw-r--r--app/javascript/mastodon/features/firehose/index.jsx46
-rw-r--r--app/javascript/styles/mastodon/components.scss3
8 files changed, 67 insertions, 74 deletions
diff --git a/app/javascript/mastodon/components/column.jsx b/app/javascript/mastodon/components/column.jsx
index d737bd347c6..cf9df3ba273 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 1a66adc87cc..fefdc23fab1 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 {
<Search />
</div>
- <div className='scrollable scrollable--flex' data-nosnippet>
- {isSearching ? (
- <SearchResults />
- ) : (
- <>
- <div className='account__section-headline'>
- <NavLink exact to='/explore'>
- <FormattedMessage tagName='div' id='explore.trending_statuses' defaultMessage='Posts' />
+ {isSearching ? (
+ <SearchResults />
+ ) : (
+ <>
+ <div className='account__section-headline'>
+ <NavLink exact to='/explore'>
+ <FormattedMessage tagName='div' id='explore.trending_statuses' defaultMessage='Posts' />
+ </NavLink>
+
+ <NavLink exact to='/explore/tags'>
+ <FormattedMessage tagName='div' id='explore.trending_tags' defaultMessage='Hashtags' />
+ </NavLink>
+
+ {signedIn && (
+ <NavLink exact to='/explore/suggestions'>
+ <FormattedMessage tagName='div' id='explore.suggested_follows' defaultMessage='People' />
</NavLink>
-
- <NavLink exact to='/explore/tags'>
- <FormattedMessage tagName='div' id='explore.trending_tags' defaultMessage='Hashtags' />
- </NavLink>
-
- {signedIn && (
- <NavLink exact to='/explore/suggestions'>
- <FormattedMessage tagName='div' id='explore.suggested_follows' defaultMessage='People' />
- </NavLink>
- )}
-
- <NavLink exact to='/explore/links'>
- <FormattedMessage tagName='div' id='explore.trending_links' defaultMessage='News' />
- </NavLink>
- </div>
-
- <Switch>
- <Route path='/explore/tags' component={Tags} />
- <Route path='/explore/links' component={Links} />
- <Route path='/explore/suggestions' component={Suggestions} />
- <Route exact path={['/explore', '/explore/posts', '/search']}>
- <Statuses multiColumn={multiColumn} />
- </Route>
- </Switch>
-
- <Helmet>
- <title>{intl.formatMessage(messages.title)}</title>
- <meta name='robots' content={isSearching ? 'noindex' : 'all'} />
- </Helmet>
- </>
- )}
- </div>
+ )}
+
+ <NavLink exact to='/explore/links'>
+ <FormattedMessage tagName='div' id='explore.trending_links' defaultMessage='News' />
+ </NavLink>
+ </div>
+
+ <Switch>
+ <Route path='/explore/tags' component={Tags} />
+ <Route path='/explore/links' component={Links} />
+ <Route path='/explore/suggestions' component={Suggestions} />
+ <Route exact path={['/explore', '/explore/posts', '/search']}>
+ <Statuses multiColumn={multiColumn} />
+ </Route>
+ </Switch>
+
+ <Helmet>
+ <title>{intl.formatMessage(messages.title)}</title>
+ <meta name='robots' content={isSearching ? 'noindex' : 'all'} />
+ </Helmet>
+ </>
+ )}
</Column>
);
}
diff --git a/app/javascript/mastodon/features/explore/links.jsx b/app/javascript/mastodon/features/explore/links.jsx
index 663aa6d80f5..e610c84d419 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 (
- <div className='explore__links'>
+ <div className='explore__links scrollable' data-nosnippet>
{banner}
{isLoading ? (<LoadingIndicator />) : links.map((link, i) => (
diff --git a/app/javascript/mastodon/features/explore/results.jsx b/app/javascript/mastodon/features/explore/results.jsx
index c6fe9b78e0f..4c23d6422d9 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 {
<button onClick={this.handleSelectStatuses} className={type === 'statuses' ? 'active' : undefined}><FormattedMessage id='search_results.statuses' defaultMessage='Posts' /></button>
</div>
- <div className='explore__search-results'>
+ <div className='explore__search-results' data-nosnippet>
<ScrollableList
scrollKey='search-results'
isLoading={isLoading}
diff --git a/app/javascript/mastodon/features/explore/suggestions.jsx b/app/javascript/mastodon/features/explore/suggestions.jsx
index f2907cdb222..c60aa7e11c9 100644
--- a/app/javascript/mastodon/features/explore/suggestions.jsx
+++ b/app/javascript/mastodon/features/explore/suggestions.jsx
@@ -42,7 +42,7 @@ class Suggestions extends PureComponent {
}
return (
- <div className='explore__suggestions'>
+ <div className='explore__suggestions scrollable' data-nosnippet>
{isLoading ? <LoadingIndicator /> : suggestions.map(suggestion => (
<AccountCard key={suggestion.get('account')} id={suggestion.get('account')} />
))}
diff --git a/app/javascript/mastodon/features/explore/tags.jsx b/app/javascript/mastodon/features/explore/tags.jsx
index 1a4d2596906..11e01472149 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 (
- <div className='explore__links'>
+ <div className='scrollable explore__links' data-nosnippet>
{banner}
{isLoading ? (<LoadingIndicator />) : hashtags.map(hashtag => (
diff --git a/app/javascript/mastodon/features/firehose/index.jsx b/app/javascript/mastodon/features/firehose/index.jsx
index e5b47d3fe03..efde58a5c0a 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 }) => {
<ColumnSettings />
</ColumnHeader>
- <div className='scrollable scrollable--flex'>
- <div className='account__section-headline'>
- <NavLink exact to='/public/local'>
- <FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
- </NavLink>
-
- <NavLink exact to='/public/remote'>
- <FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
- </NavLink>
-
- <NavLink exact to='/public'>
- <FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
- </NavLink>
- </div>
-
- <StatusListContainer
- prepend={prependBanner}
- timelineId={`${feedType}${onlyMedia ? ':media' : ''}`}
- onLoadMore={handleLoadMore}
- trackScroll
- scrollKey='firehose'
- emptyMessage={emptyMessage}
- bindToDocument={!multiColumn}
- />
+ <div className='account__section-headline'>
+ <NavLink exact to='/public/local'>
+ <FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
+ </NavLink>
+
+ <NavLink exact to='/public/remote'>
+ <FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
+ </NavLink>
+
+ <NavLink exact to='/public'>
+ <FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
+ </NavLink>
</div>
+ <StatusListContainer
+ prepend={prependBanner}
+ timelineId={`${feedType}${onlyMedia ? ':media' : ''}`}
+ onLoadMore={handleLoadMore}
+ trackScroll
+ scrollKey='firehose'
+ emptyMessage={emptyMessage}
+ bindToDocument={!multiColumn}
+ />
+
<Helmet>
<title>{intl.formatMessage(messages.title)}</title>
<meta name='robots' content='noindex' />
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index 2e305ed7592..f0380de5bf8 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 {