From 7b2aad14b905454553792b0503b5854fd9e58003 Mon Sep 17 00:00:00 2001 From: Dusty Reagan Date: Fri, 13 Dec 2024 15:39:07 -0600 Subject: [PATCH] Reader: Remove the sidebar from recent and discover pages and increase width on all single column feeds (#97373) * Remove the sidebar from Reader recent and discover pages * Set larger width * Widen all single column feeds to 768px --- client/reader/conversations/stream.scss | 2 +- client/reader/discover/discover-stream.js | 34 ----------------------- client/reader/following/main.tsx | 7 +---- client/reader/liked-stream/style.scss | 2 +- client/reader/stream/style.scss | 2 +- 5 files changed, 4 insertions(+), 43 deletions(-) diff --git a/client/reader/conversations/stream.scss b/client/reader/conversations/stream.scss index 91ab110f2959c..59b941ebb08fe 100644 --- a/client/reader/conversations/stream.scss +++ b/client/reader/conversations/stream.scss @@ -1,6 +1,6 @@ .is-section-reader .conversations__header.navigation-header { margin: 0 auto; - max-width: 600px; + @media only screen and (max-width: 660px) { padding: 0 24px; } diff --git a/client/reader/discover/discover-stream.js b/client/reader/discover/discover-stream.js index 6e4ee9a8ce670..3c3e5d3aa03c1 100644 --- a/client/reader/discover/discover-stream.js +++ b/client/reader/discover/discover-stream.js @@ -6,13 +6,9 @@ import NavigationHeader from 'calypso/components/navigation-header'; import isBloganuary from 'calypso/data/blogging-prompt/is-bloganuary'; import withDimensions from 'calypso/lib/with-dimensions'; import wpcom from 'calypso/lib/wp'; -import { READER_DISCOVER_POPULAR_SITES } from 'calypso/reader/follow-sources'; import Stream, { WIDE_DISPLAY_CUTOFF } from 'calypso/reader/stream'; -import ReaderPopularSitesSidebar from 'calypso/reader/stream/reader-popular-sites-sidebar'; -import ReaderTagSidebar from 'calypso/reader/stream/reader-tag-sidebar'; import { useSelector } from 'calypso/state'; import { isUserLoggedIn } from 'calypso/state/current-user/selectors'; -import { getReaderRecommendedSites } from 'calypso/state/reader/recommended-sites/selectors'; import { getReaderFollowedTags } from 'calypso/state/reader/tags/selectors'; import DiscoverNavigation from './discover-navigation'; import { @@ -58,11 +54,6 @@ const DiscoverStream = ( props ) => { const followedTags = useSelector( getReaderFollowedTags ); const isLoggedIn = useSelector( isUserLoggedIn ); const selectedTab = props.selectedTab; - const recommendedSitesSeed = - selectedTab === FIRST_POSTS_TAB ? 'discover-new-sites' : 'discover-recommendations'; - const recommendedSites = useSelector( - ( state ) => getReaderRecommendedSites( state, recommendedSitesSeed ) || [] - ); const { data: interestTags = [] } = useQuery( { queryKey: [ 'read/interests', locale ], queryFn: () => @@ -97,35 +88,10 @@ const DiscoverStream = ( props ) => { ); const streamKey = buildDiscoverStreamKey( selectedTab, recommendedStreamTags ); - const streamSidebar = () => { - if ( selectedTab === FIRST_POSTS_TAB && recommendedSites?.length ) { - return ( - - ); - } - - if ( ( isDefaultTab || selectedTab === 'latest' ) && recommendedSites?.length ) { - return ( - - ); - } else if ( ! ( isDefaultTab || selectedTab === 'latest' ) ) { - return ; - } - }; - const streamProps = { ...props, streamKey, useCompactCards: true, - streamSidebar, sidebarTabTitle: isDefaultTab ? translate( 'Sites' ) : translate( 'Related' ), selectedStreamName: selectedTab, }; diff --git a/client/reader/following/main.tsx b/client/reader/following/main.tsx index f6600f88fddd3..1c55ee09b7ab9 100644 --- a/client/reader/following/main.tsx +++ b/client/reader/following/main.tsx @@ -9,7 +9,6 @@ import ReaderOnboarding from 'calypso/reader/onboarding'; import SuggestionProvider from 'calypso/reader/search-stream/suggestion-provider'; import ReaderStream, { WIDE_DISPLAY_CUTOFF } from 'calypso/reader/stream'; import Recent from '../recent'; -import ReaderStreamSidebar from './reader-stream-sidebar'; import { useSiteSubscriptions } from './use-site-subscriptions'; import { useFollowingView } from './view-preference'; import ViewToggle from './view-toggle'; @@ -44,11 +43,7 @@ function FollowingStream( { ...props } ) { { currentView === 'recent' && config.isEnabled( 'reader/recent-feed-overhaul' ) ? ( ) : ( - } - > +