From 54ad8f7fbb370cb810d34d6604bf0a358b21d067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Wed, 13 Jul 2022 20:54:43 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Hide=20tabs=20on=20Followers,=20Following?= =?UTF-8?q?=E2=80=A6=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/features/followers/index.js | 2 +- app/soapbox/features/following/index.js | 2 +- app/soapbox/pages/profile_page.tsx | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/soapbox/features/followers/index.js b/app/soapbox/features/followers/index.js index 7a77e46a5..f09fa6ad0 100644 --- a/app/soapbox/features/followers/index.js +++ b/app/soapbox/features/followers/index.js @@ -118,7 +118,7 @@ class Followers extends ImmutablePureComponent { } return ( - + + = ({ params, children }) => { activeItem = 'profile'; } + const showTabs = !['following', 'followers', 'pins'].some(path => pathname.includes(path)); + return ( <> @@ -128,7 +130,7 @@ const ProfilePage: React.FC = ({ params, children }) => { {Component => } - {account && ( + {account && showTabs && ( )} From 3d057daa437d75c61229aca5698e7ed972445194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 16 Jul 2022 00:03:21 +0200 Subject: [PATCH 2/2] Apply suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/ui/card/card.tsx | 2 +- app/soapbox/components/ui/column/column.tsx | 30 ++++++++----------- app/soapbox/features/bookmarks/index.tsx | 2 +- .../features/community_timeline/index.tsx | 2 +- .../features/direct_timeline/index.tsx | 2 +- app/soapbox/features/followers/index.js | 2 +- app/soapbox/features/following/index.js | 2 +- .../features/hashtag_timeline/index.js | 2 +- app/soapbox/features/home_timeline/index.tsx | 2 +- app/soapbox/features/list_timeline/index.tsx | 2 +- app/soapbox/features/pinned_statuses/index.js | 2 +- .../features/public_timeline/index.tsx | 2 +- .../features/remote_timeline/index.tsx | 2 +- app/soapbox/features/status/index.tsx | 2 +- app/soapbox/features/test_timeline/index.tsx | 2 +- 15 files changed, 26 insertions(+), 32 deletions(-) diff --git a/app/soapbox/components/ui/card/card.tsx b/app/soapbox/components/ui/card/card.tsx index c876219f4..f60ec2ac8 100644 --- a/app/soapbox/components/ui/card/card.tsx +++ b/app/soapbox/components/ui/card/card.tsx @@ -35,7 +35,7 @@ const Card = React.forwardRef(({ children, variant, size className={classNames({ 'space-y-4': true, 'bg-white dark:bg-slate-800 text-black dark:text-white shadow-lg dark:shadow-inset overflow-hidden': variant === 'rounded', - [sizes[size]]: true, + [sizes[size]]: variant === 'rounded', }, className)} > {children} diff --git a/app/soapbox/components/ui/column/column.tsx b/app/soapbox/components/ui/column/column.tsx index 5ac4f350e..30c43f7f0 100644 --- a/app/soapbox/components/ui/column/column.tsx +++ b/app/soapbox/components/ui/column/column.tsx @@ -40,25 +40,19 @@ const Column: React.FC = React.forwardRef((props, ref: React.ForwardedR } }; - const renderChildren = () => { - if (transparent) { - return
{children}
; - } + const renderChildren = () => ( + + {withHeader ? ( + + + + ) : null} - return ( - - {withHeader ? ( - - - - ) : null} - - - {children} - - - ); - }; + + {children} + + + ); return (
diff --git a/app/soapbox/features/bookmarks/index.tsx b/app/soapbox/features/bookmarks/index.tsx index c9e3e5de3..8eb1c0bd3 100644 --- a/app/soapbox/features/bookmarks/index.tsx +++ b/app/soapbox/features/bookmarks/index.tsx @@ -35,7 +35,7 @@ const Bookmarks: React.FC = () => { const emptyMessage = ; return ( - +
diff --git a/app/soapbox/features/community_timeline/index.tsx b/app/soapbox/features/community_timeline/index.tsx index 4cc9ad65e..81730af40 100644 --- a/app/soapbox/features/community_timeline/index.tsx +++ b/app/soapbox/features/community_timeline/index.tsx @@ -42,7 +42,7 @@ const CommunityTimeline = () => { }, [onlyMedia]); return ( - + { }; return ( - + + + + { }, [isPartial]); return ( - + { ); return ( - + {/*