Bluesky app fork with some witchin' additions 💫

make the sidebar smaller when offset, reduce total offset (#8052)

authored by samuel.fm and committed by

GitHub a48e64e7 412b1074

+9 -5
+2 -2
src/alf/breakpoints.ts
··· 31 * Fine-tuned breakpoints for the shell layout 32 */ 33 export function useLayoutBreakpoints() { 34 - const rightNavVisible = useMediaQuery({minWidth: 1075}) 35 - const centerColumnOffset = useMediaQuery({minWidth: 1075, maxWidth: 1300}) 36 const leftNavMinimal = useMediaQuery({maxWidth: 1300}) 37 38 return {
··· 31 * Fine-tuned breakpoints for the shell layout 32 */ 33 export function useLayoutBreakpoints() { 34 + const rightNavVisible = useMediaQuery({minWidth: 1100}) 35 + const centerColumnOffset = useMediaQuery({minWidth: 1100, maxWidth: 1300}) 36 const leftNavMinimal = useMediaQuery({maxWidth: 1300}) 37 38 return {
+1 -1
src/components/Layout/const.ts
··· 18 /** 19 * How far to shift the center column when in the tablet breakpoint 20 */ 21 - export const CENTER_COLUMN_OFFSET = -130
··· 18 /** 19 * How far to shift the center column when in the tablet breakpoint 20 */ 21 + export const CENTER_COLUMN_OFFSET = -105
+6 -2
src/view/shell/desktop/RightNav.tsx
··· 58 return null 59 } 60 61 return ( 62 <View 63 style={[ ··· 67 position: 'fixed', 68 left: '50%', 69 transform: [ 70 - {translateX: 300 + (centerColumnOffset ? CENTER_COLUMN_OFFSET : 0)}, 71 ...a.scrollbar_offset.transform, 72 ], 73 - width: 300 + gutters.paddingLeft, 74 maxHeight: '100%', 75 overflowY: 'auto', 76 }),
··· 58 return null 59 } 60 61 + const width = centerColumnOffset ? 250 : 300 62 + 63 return ( 64 <View 65 style={[ ··· 69 position: 'fixed', 70 left: '50%', 71 transform: [ 72 + { 73 + translateX: 300 + (centerColumnOffset ? CENTER_COLUMN_OFFSET : 0), 74 + }, 75 ...a.scrollbar_offset.transform, 76 ], 77 + width: width + gutters.paddingLeft, 78 maxHeight: '100%', 79 overflowY: 'auto', 80 }),