From 29d320a658e9472719dec3596a524870e14d3aff Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 19:56:03 -0500 Subject: [PATCH] Fix spacing around column headings, remove unused column settings --- app/soapbox/components/sub_navigation.tsx | 46 +----------------- .../components/column_settings.js | Bin 1935 -> 0 bytes .../containers/column_settings_container.js | Bin 502 -> 0 bytes .../features/community_timeline/index.tsx | 7 +-- .../features/hashtag-timeline/index.tsx | 10 ++-- .../components/column_settings.js | Bin 2227 -> 0 bytes .../containers/column_settings_container.js | Bin 496 -> 0 bytes .../features/public_timeline/index.tsx | 8 +-- 8 files changed, 17 insertions(+), 54 deletions(-) delete mode 100644 app/soapbox/features/community_timeline/components/column_settings.js delete mode 100644 app/soapbox/features/community_timeline/containers/column_settings_container.js delete mode 100644 app/soapbox/features/public_timeline/components/column_settings.js delete mode 100644 app/soapbox/features/public_timeline/containers/column_settings_container.js diff --git a/app/soapbox/components/sub_navigation.tsx b/app/soapbox/components/sub_navigation.tsx index b8e2b310d8..1e6afb85a7 100644 --- a/app/soapbox/components/sub_navigation.tsx +++ b/app/soapbox/components/sub_navigation.tsx @@ -4,34 +4,22 @@ import { defineMessages, useIntl } from 'react-intl'; // import { connect } from 'react-redux'; import { useHistory } from 'react-router-dom'; -// import { openModal } from 'soapbox/actions/modals'; -// import { useAppDispatch } from 'soapbox/hooks'; - import { CardHeader, CardTitle } from './ui'; const messages = defineMessages({ back: { id: 'column_back_button.label', defaultMessage: 'Back' }, - settings: { id: 'column_header.show_settings', defaultMessage: 'Show settings' }, }); interface ISubNavigation { - message: String, + message: React.ReactNode, + /** @deprecated Unused. */ settings?: React.ComponentType, } const SubNavigation: React.FC = ({ message }) => { const intl = useIntl(); - // const dispatch = useAppDispatch(); const history = useHistory(); - // const ref = useRef(null); - - // const [scrolled, setScrolled] = useState(false); - - // const onOpenSettings = () => { - // dispatch(openModal('COMPONENT', { component: Settings })); - // }; - const handleBackClick = () => { if (window.history && window.history.length === 1) { history.push('/'); @@ -40,36 +28,6 @@ const SubNavigation: React.FC = ({ message }) => { } }; - // const handleBackKeyUp = (e) => { - // if (e.key === 'Enter') { - // handleClick(); - // } - // } - - // const handleOpenSettings = () => { - // onOpenSettings(); - // } - - // useEffect(() => { - // const handleScroll = throttle(() => { - // if (this.node) { - // const { offsetTop } = this.node; - - // if (offsetTop > 0) { - // setScrolled(true); - // } else { - // setScrolled(false); - // } - // } - // }, 150, { trailing: true }); - - // window.addEventListener('scroll', handleScroll); - - // return () => { - // window.removeEventListener('scroll', handleScroll); - // }; - // }, []); - return ( $CNTW(qhvdAk~SF@ znixUkSw@xV3D}?G(OfQ!+%J_gm18E0_sNqB4dO?=!7F z*N9s6QC72RsW)+^sRzXs+E`Fby7WP#%x8`$)cQrQ*OK?iQ54f(X%s7wF%(+aF_7(2 zQuH|vi;yis*%uGVQ8$w&0LY}ad=AugK8H|>b%9i1R-GhhwJ4Zc69+r9M5|h5?*(>TosDaW z6aYg_ax=N=Ywv_`&T^g_N}R%QxBqhBWTynM5H@lISdZn-NzCnPST)dKQ#O^m% z@+8bW#j^o6yzS#IMy6@O8Pz$;pq%3R40xKNK*DCcA>MDFUMIa30+QCDF)R2X#_ z&W#uz`sHr_<`bsbU=sVYVGJ89epiP|35PX+I*xrzPq-!&sM z(G1~%1Q#rkrbfRVBoG772Tx38=%w3?L?fX)9m1UuNi!%&Omx|g42z`s5!yn(S$Z!* z!z;NBe|i@DTzMM&R|}FYxlEe(?NaEHpE$+grVdlk(|=-^XF8?n=uhL@_nF>NOHE($ z%0-?A2F`Gyv7nhEF0_){2c8S|UwnK#KBdD<9r`IH{yzBb&psl=J*V#1Tkm8+4?92` H1a0sa;GT)V diff --git a/app/soapbox/features/community_timeline/containers/column_settings_container.js b/app/soapbox/features/community_timeline/containers/column_settings_container.js deleted file mode 100644 index d208380894105f50ddc27d0057de0860bc11c7bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcmZ8e!EVDK488Lez6GR=-dA;(?gJ`yw`rOXaZ}U=B5 { return ( - +
+ +
+ = ({ params }) => { const tags = params?.tags || { any: [], all: [], none: [] }; const dispatch = useAppDispatch(); - const hasUnread = useAppSelector(state => (state.timelines.getIn([`hashtag:${id}`, 'unread']) as number) > 0); const disconnects = useRef<(() => void)[]>([]); // Mastodon supports displaying results from multiple hashtags. @@ -100,7 +99,10 @@ export const HashtagTimeline: React.FC = ({ params }) => { return ( - +
+ +
+ f&U488kT@TL?_#L-4&AFYzjW%V9$XERmw1*YU1SL@!Ly5PU zR$ppFt@qRuVFu2}x7i2QE78Y98rRv+Uz&FU%%7Pa!ysr&k3{*f9P(2o@vkaUtodIH6 z2l_c`=X+y>dg)XOg?-?^Yhn0m>ce^#>>S1>2+On@C1|xMQk4@2JF|rAT4k>Vc3ho} zYl##9Lrrosx#(-}gmBJso*GJ=!f>{Ka^PgA7_bmFbOczB<KK9hyxTQmo#-dq8LQ`p6IlwxIB74&qtDUWL82o3Lwt$rwMwHrj;tIcF3^vQp!};>JCYs_kk0RPer;2lpSiP0}d3BtpsjI k&M6&c;?T#G`19bK-+PM?_sMa;emX}l^zj2|gP;xm0O&343jhEB diff --git a/app/soapbox/features/public_timeline/containers/column_settings_container.js b/app/soapbox/features/public_timeline/containers/column_settings_container.js deleted file mode 100644 index 63a629007df0fe29ea7925be61f99b8fe691cec8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 496 zcmZ9J&u+sY494#~g>L~VqxV(arF(!%-EEpCM%*-N0ueY;rz-D0lR^I>OJMN#!+dnZ z=mWt8talDA!3>As2dDxXOD_SN>0GUa=t^CSv`3=OwXp_!G_J**U!_{F{(}jfcX1W7 zfI*qF_5C!s0?Jpi$a=oVp`*ylRPueN72IPa7|ggQL-^r$!H*F(5K{`9H;@+rP!z9l z*Q;D=l;$m2jnhxx*-F)7R{XXr_PvXvA$z=$Ws|p5!Y6t_nu1%F0N!mE2jmHVlN)GH z*r { return ( - +
+ +
+ + {showExplanationBox &&
}