Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

[HOLD for payment 2024-08-29] [HOLD react-native-web 2584][$500] mWeb - Selecting and copying large name in share code displays remaining name with odd 3 dot position #27174

Closed kbecciv closed 2 months ago

kbecciv commented 1 year ago

If you havenโ€™t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the app
  2. Open settings->profile->display name and set long first or last name (do not set both first and last name as long)
  3. Open settings->share code
  4. Double click on name and select the text of display name
  5. Using end points, try to extend the name beyond 3 dots
  6. Observe that now app displays the remaining name but still displays the 3 dots in previous position

Expected Result:

App should either not allow to extend name to select the full name on drag or should remove the 3 dots if name is extended and rest name is displayed

Actual Result:

App allows to extend name to display remaining name in share code and also keeps the 3 dots in same location on mWeb chrome

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.3.67.2 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/93399543/be5f01d8-9298-4bc1-9040-dfd98086d3e0

https://github.com/Expensify/App/assets/93399543/102ef0b7-3def-4a9b-8a73-c4a1c7635ed3

Expensify/Expensify Issue URL: Issue reported by: @dhanashree-sawant Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694106668042179

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @johncschuster
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~01fbd69c08b1d03d62

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

ishpaul777 commented 1 year ago

Proposal

Problem

mWeb - Selecting and copying large name in share code displays remaining name with odd 3 dot position

Root cause

We are limiting the no. of line on Text for Display name. The behaviour of text component is to Scrolling while selecting on chrome and it truncates accordingly.

Changes

We can make the Display Name not selectable, by applying styles - userSelectNone or passing a prop userSelect="none" to text component as we already have a "copy to Clipboard link button" already

s77rt commented 1 year ago

@ishpaul777 Thanks for the proposal. I don't think your RCA is complete. Why the 3 dots do not change position (or get removed) and instead they stay in the same position they initially appeared at.

s77rt commented 1 year ago

I didn't check but initial thought is that the bug is not on Exp/App but in RNW or Chromium.

tienifr commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

mWeb - Although text is clipped and hidden user can still drag the selection cursor down to select the full text and the ellipsis is in the middle of the text.

What is the root cause of that problem?

ATM, we use numberOfLines to truncate the text there. When numberOfLines is 1, it uses automatic ellipsis with text-overflow: ellipsis When numberOfLines is larger than 1, it uses fragmenting overflow with -webkit-line-clamp. In the QR share page, we uses numberOfLines=2.

The problem with -webkit-line-clamp is that it does not actually "truncate" the text but inserts an ellipsis in the last position of the specified line (reference). That explains why the ellipsis always stays at the same position. And when we select the text, it would scroll down to select the whole text. We could easily see this (the text was not truncated) by using DevTools to inspect the div.

Another problem is with overflow: hidden. Although it prevents scrolling interface, the wrapper box is still a scroll container and it still allows programmatic scrolling. I think that the dragging cursor to select text in Chrome is somehow related to these two cases.

What changes do you think we should make in order to solve the problem?

Add overflow: clip instead of overflow: hidden to "forbid scrolling entirely, through any mechanism" as mentioned in the document here.

s77rt commented 1 year ago

@tienifr Thanks for the proposal. Your RCA makes sense. Regarding the overflow: hidden, this is added from RNW right? (and not explicitly from the Exp/App). If that's is the case, can you please prepare a RNW PR to update the overflow prop value?

mallenexpensify commented 1 year ago

Unassigning myself as BZ since I was the second one assigned. Let me know if you need help here @johncschuster

tienifr commented 1 year ago

@s77rt Sorry for the delay, I missed the notification on this issue. The style for multiline text is here. And draft PR's here.

s77rt commented 1 year ago

@tienifr Thanks! Can you please update the PR with tests to follow RNW contributing guide

tienifr commented 1 year ago

Once I got assigned, I would submit a complete PR. That's just a draft PR for testing purpose. Correct me if I misunderstood something ๐Ÿ™‡

s77rt commented 1 year ago

๐ŸŽ€ ๐Ÿ‘€ ๐ŸŽ€ C+ reviewed Link to proposal

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @neil-marcellini, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

s77rt commented 1 year ago

Not overdue. Needs an engineer review here

johncschuster commented 1 year ago

Thanks for the update, @s77rt!

tienifr commented 1 year ago

Not overdue. Needs an engineer review here

Bump here to resolve ^

neil-marcellini commented 1 year ago

๐ŸŽ€ ๐Ÿ‘€ ๐ŸŽ€ C+ reviewed Link to proposal

Sorry for the delay. The proposal looks good to me too.

tienifr commented 1 year ago

We're under a migration from @expensify/react-native-web fork to the original react-native-web. Further steps should be:

  1. Create an issue & PR upstream
  2. Create E/App PR to apply code patch
  3. In the meantime, HOLD for https://github.com/Expensify/App/issues/16660 to avoid conflicts

Reference: https://github.com/Expensify/react-native-web/pull/21#issuecomment-1674088350.

I think we should put this on HOLD as in step 3.

cc @s77rt @neil-marcellini

s77rt commented 1 year ago

@tienifr I don't see a reason to hold, the PR would target the upstream repo. Let's get the upstream PR merged then we can hold this

neil-marcellini commented 1 year ago

Not overdue, waiting for the PR

melvin-bot[bot] commented 1 year ago

@johncschuster @s77rt @neil-marcellini @tienifr this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

s77rt commented 1 year ago

Working on it Melvin

tienifr commented 1 year ago

Update:

The upstream PR is up: https://github.com/necolas/react-native-web/pull/2584 2 days ago. I've carefully followed the RNW contributing guidelines. So step 1 is done. However, considering the update frequency of this package, which seems like once a month, and the WIP https://github.com/Expensify/App/pull/24482, I think we've got a long way ahead to get this done.

In case https://github.com/Expensify/App/pull/24482 got merged first, I would raise E/App PR to apply code patch.

s77rt commented 1 year ago

@tienifr Thanks for the update. Let's wait for the upstream PR for now.

melvin-bot[bot] commented 1 year ago

@johncschuster @s77rt @neil-marcellini @tienifr this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

s77rt commented 1 year ago

We are still waiting for RNW PR maintainers review

neil-marcellini commented 1 year ago

Still holding, moving to weekly

neil-marcellini commented 1 year ago

Still holding

johncschuster commented 1 year ago

Still holding

s77rt commented 1 year ago

Still on hold

s77rt commented 1 year ago

Same ^

s77rt commented 12 months ago

Still on hold

s77rt commented 11 months ago

Still hold on https://github.com/necolas/react-native-web/pull/2584

s77rt commented 11 months ago

Same ^

melvin-bot[bot] commented 11 months ago

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

johncschuster commented 11 months ago

I will be OOO starting Monday, December 18, and will return Tuesday, January 2.

Current status: This is on hold for an upstream PR https://github.com/necolas/react-native-web/pull/2584

If this issue is open when I'm back from OOO, I'll take it back over. Thank you!

s77rt commented 11 months ago

Still on hold

dylanexpensify commented 11 months ago

hold

s77rt commented 10 months ago

Same ^

s77rt commented 10 months ago

Still hold on https://github.com/necolas/react-native-web/pull/2584

s77rt commented 10 months ago

Same ^

s77rt commented 10 months ago

Same ^

johncschuster commented 10 months ago

Same^

johncschuster commented 10 months ago

Same^

melvin-bot[bot] commented 10 months ago

@johncschuster, @s77rt, @neil-marcellini, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

s77rt commented 10 months ago

Still holding

s77rt commented 10 months ago

Same ^