Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix to post overflow on web (close #395) (#407)

authored by

Paul Frazee and committed by
GitHub
7c99df33 1fa94024

+21 -3
+4
src/view/com/util/Link.tsx
··· 90 90 text, 91 91 numberOfLines, 92 92 lineHeight, 93 + dataSet, 93 94 }: { 94 95 testID?: string 95 96 type?: TypographyVariant ··· 98 99 text: string | JSX.Element | React.ReactNode 99 100 numberOfLines?: number 100 101 lineHeight?: number 102 + dataSet?: any 101 103 }) { 102 104 const {...props} = useLinkProps({to: href}) 103 105 const store = useStores() ··· 117 119 style={style} 118 120 numberOfLines={numberOfLines} 119 121 lineHeight={lineHeight} 122 + // @ts-ignore web only -prf 123 + dataSet={dataSet} 120 124 {...props}> 121 125 {text} 122 126 </Text>
+12 -3
src/view/com/util/text/RichText.tsx
··· 8 8 import {useTheme, TypographyVariant} from 'lib/ThemeContext' 9 9 import {usePalette} from 'lib/hooks/usePalette' 10 10 11 + const WORD_WRAP = {wordWrap: 1} 12 + 11 13 export function RichText({ 12 14 testID, 13 15 type = 'md', ··· 39 41 lineHeight: 30, 40 42 } 41 43 return ( 42 - <Text testID={testID} style={[style, pal.text]}> 44 + // @ts-ignore web only -prf 45 + <Text testID={testID} style={[style, pal.text]} dataSet={WORD_WRAP}> 43 46 {text} 44 47 </Text> 45 48 ) ··· 48 51 <Text 49 52 testID={testID} 50 53 type={type} 51 - style={[style, pal.text, lineHeightStyle]}> 54 + style={[style, pal.text, lineHeightStyle]} 55 + // @ts-ignore web only -prf 56 + dataSet={WORD_WRAP}> 52 57 {text} 53 58 </Text> 54 59 ) ··· 72 77 text={segment.text} 73 78 href={`/profile/${mention.did}`} 74 79 style={[style, lineHeightStyle, pal.link]} 80 + dataSet={WORD_WRAP} 75 81 />, 76 82 ) 77 83 } else if (link && AppBskyRichtextFacet.validateLink(link).success) { ··· 82 88 text={toShortUrl(segment.text)} 83 89 href={link.uri} 84 90 style={[style, lineHeightStyle, pal.link]} 91 + dataSet={WORD_WRAP} 85 92 />, 86 93 ) 87 94 } else { ··· 94 101 testID={testID} 95 102 type={type} 96 103 style={[style, pal.text, lineHeightStyle]} 97 - numberOfLines={numberOfLines}> 104 + numberOfLines={numberOfLines} 105 + // @ts-ignore web only -prf 106 + dataSet={WORD_WRAP}> 98 107 {els} 99 108 </Text> 100 109 )
+5
web/index.html
··· 72 72 text-decoration: underline; 73 73 } 74 74 75 + /* Styling hacks */ 76 + *[data-word-wrap] { 77 + word-break: break-word; 78 + } 79 + 75 80 /* ProseMirror */ 76 81 .ProseMirror { 77 82 font: 18px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;