Bluesky app fork with some witchin' additions 💫

Fix collapsed button by simplifying, keep container width (#9712)

authored by samuel.fm and committed by

GitHub 9c563f2a 1d426307

+5 -4
+5 -4
src/screens/PostThread/components/GrowthHack.tsx
··· 33 a.relative, 34 a.justify_center, 35 align === 'right' ? a.align_end : a.align_start, 36 - width === undefined ? {opacity: 0} : {minWidth: width}, 37 ]}> 38 <PrivacySensitive 39 style={[ ··· 46 // when finding the size of the button, we need the containing 47 // element to have a concrete size otherwise the text will 48 // collapse to 0 width. so set it to a really big number 49 - // and hide the entire thing (see above) 50 - width === undefined && {width: 10000}, 51 ]}> 52 <View 53 onLayout={evt => setWidth(evt.nativeEvent.layout.width)} 54 style={[ 55 t.atoms.bg, 56 - // make sure it covers the icon! the won't always be a button 57 {minWidth: iconSizes[ICON_SIZE], minHeight: iconSizes[ICON_SIZE]}, 58 ]}> 59 {children}
··· 33 a.relative, 34 a.justify_center, 35 align === 'right' ? a.align_end : a.align_start, 36 + {minWidth: width ?? iconSizes[ICON_SIZE]}, 37 ]}> 38 <PrivacySensitive 39 style={[ ··· 46 // when finding the size of the button, we need the containing 47 // element to have a concrete size otherwise the text will 48 // collapse to 0 width. so set it to a really big number 49 + // and just use `pointer-events: box-none` so it doesn't interfere with the UI 50 + {width: 1000}, 51 + a.pointer_events_box_none, 52 ]}> 53 <View 54 onLayout={evt => setWidth(evt.nativeEvent.layout.width)} 55 style={[ 56 t.atoms.bg, 57 + // make sure it covers the icon! children might be undefined 58 {minWidth: iconSizes[ICON_SIZE], minHeight: iconSizes[ICON_SIZE]}, 59 ]}> 60 {children}