Skip to content

Commit

Permalink
Fix overflowing text on web and iOS in PostMeta (#3982)
Browse files Browse the repository at this point in the history
* `flexShrink` on iOS and web

`flexShrink` on iOS and web

`flexShrink` on iOS and web

actually, `flexShrink`

use `flex`

* adjust web

* `expect-error` `onMouseUp`

* ignore ref type check
  • Loading branch information
haileyok authored May 13, 2024
1 parent d49b93d commit e02cae2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/components/ProfileHoverCard/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
}

return (
<div
<View
// @ts-ignore View is being used as div
ref={refs.setReference}
onPointerMove={onPointerMoveTarget}
onPointerLeave={onPointerLeaveTarget}
// @ts-ignore web only prop
onMouseUp={onPress}
style={{
display: props.inline ? 'inline' : 'block',
}}>
style={{flexShrink: 1}}>
{props.children}
{isVisible && (
<Portal>
Expand All @@ -307,7 +307,7 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
</div>
</Portal>
)}
</div>
</View>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/view/com/util/PostMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ const styles = StyleSheet.create({
},
maxWidth: {
flex: isAndroid ? 1 : undefined,
maxWidth: !isAndroid ? '80%' : undefined,
flexShrink: isAndroid ? undefined : 1,
},
})

0 comments on commit e02cae2

Please sign in to comment.