Skip to content

Commit

Permalink
Fix story item text overflow
Browse files Browse the repository at this point in the history
- adjust story panel width
  • Loading branch information
Lawrence Owen committed Feb 13, 2025
1 parent 04a75fd commit e23109e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
26 changes: 23 additions & 3 deletions lib/ReactViews/Story/Story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,13 @@ const Story = (props: Props) => {
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
`}
>
<div>
<div
css={`
width: 100%;
overflow-x: hidden;
display: flex;
`}
>
<TextSpan
css={`
color: #baebf8;
Expand All @@ -289,7 +295,14 @@ const Story = (props: Props) => {
>
{props.index + 1}
</TextSpan>
<TextSpan textLight medium>
<TextSpan
overflowEllipsis
textLight
medium
css={`
overflow-x: hidden;
`}
>
{story.title && story.title.length > 0
? story.title
: t("story.untitledScene")}
Expand Down Expand Up @@ -320,7 +333,14 @@ const Story = (props: Props) => {
</Box>
{bodyText.length > 0 && (
<Box paddedRatio={2} paddedHorizontally={3}>
<Text textLight medium>
<Text
overflowEllipsis
textLight
medium
css={`
overflow-x: hidden;
`}
>
{bodyText}
</Text>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion lib/ReactViews/Story/StoryPanel/StoryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class StoryPanel extends React.Component<Props, State> {
ref={this.slideRef as React.RefObject<HTMLDivElement>}
css={`
@media (min-width: 992px) {
max-width: 60vw;
max-width: 36vw;
}
border-radius: 6px;
overflow: hidden;
Expand Down

0 comments on commit e23109e

Please sign in to comment.