Skip to content

Fix ellipsis issues for Text numberOfLines={1}#5

Merged
roryabraham merged 3 commits intoExpensify:masterfrom
parasharrajat:master
Jan 14, 2022
Merged

Fix ellipsis issues for Text numberOfLines={1}#5
roryabraham merged 3 commits intoExpensify:masterfrom
parasharrajat:master

Conversation

@parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented Jan 13, 2022

  1. Revert commit 562db69 to fix ellipsis for .
  2. Fix ellipsis for Safari via adding word-wrap: normal to text-oneline styles. Based on stackoverflow.com/a/56961220/7462668

PR for Expensify/App#7206
Original PR necolas#2193

cc: @roryabraham

Copy link

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem ok, but can you remind me why we don't just remove whitespace: no-wrap from here?

@parasharrajat
Copy link
Member Author

parasharrajat commented Jan 13, 2022

Because we want the text to be clipped with an ellipsis. Ellipsis won't show on the web until text wraps. And removing this line will not fix the issues that we are facing.

After this change, we won't need that style. It would be automatically applied. And we can remove that line https://github.com/Expensify/App/blob/f8e48cdf877c9dc9576a429ccb2885969b82e93c/src/styles/styles.js#L1103.

@luacmartins
Copy link

I'm not too sure if this is the best way to solve this issue. @roryabraham could you please take a look?

@parasharrajat
Copy link
Member Author

You will get more details on the linked orginal PR and details behind reverting and the fix.

@roryabraham
Copy link

Taking a look at this now

Copy link

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I'm not completely sure about this either – I'm sure necolas will have a more informed opinion if/when they eventually review the upstream PR. But looking at the SO @parasharrajat linked this seems like a viable solution to both the original issue solved by the commit you're reverting and the new issues we're seeing now.

@roryabraham roryabraham merged commit 3cd81b5 into Expensify:master Jan 14, 2022
@luacmartins
Copy link

Thanks for the input @roryabraham!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants