Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2023-08-03] [$1000] NEW FEATURE: Don't truncate long room names in room details page #22613

Closed
2 of 6 tasks
kavimuru opened this issue Jul 11, 2023 · 61 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@kavimuru
Copy link

kavimuru commented Jul 11, 2023

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. Click Global create > new room, and enter a long room name (more than 50 characters).
  2. Notice that the full room name is listed in the welcome message, and truncated in the room header.
  3. Click into room details and notice that the room name in room details is also truncated.

Expected result:

We'd show the full room name in room details, as this should be the source of truth for what the room actually is. If the room name is long, we should just break it into multiple lines in the room details.

Actual result:

We truncate the room name in room details. Meaning you cannot see the full room name there.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number:
Reproducible in staging?:
Reproducible in production?:
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
image
image - 2023-07-10T170007 031 (1)

Expensify/Expensify Issue URL:
Issue reported by: @joekaufmanexpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689026712373409

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f72d5afba7910b13
  • Upwork Job ID: 1678728351340113920
  • Last Price Increase: 2023-07-11
@kavimuru kavimuru added Weekly KSv2 NewFeature Something to build that is a new item. labels Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature)

@jliexpensify
Copy link
Contributor

@shawnborton let me know if you'd like this as External!

@dhairyasenjaliya
Copy link
Contributor

dhairyasenjaliya commented Jul 11, 2023

Proposal

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

  • Don't truncate long room names in room details page

What is the root cause of that problem?

  • New Feature request 


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

  • We need to define max number of line to display on room detail page for consistency as we have set max room length of 79 We can ensure to add max number of line to 4 which we can decide but I prefer 4 as it display full room name

  • Also if we need only for room then we need to add conditional check and set numberOfLines set to custom only if chat type is room

  • We need to add custom numberOfLine to ReportDetailsPage.js inside that we have used <DisplayNames>

Note: Currently on this GH it mentioned only for native iOS and Android so that is the reason I have not added changes for the web if needed we need to adjust pre style only

Result

cc @shawnborton

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 11, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Jul 11, 2023

Proposal

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

Don't truncate the room name in the details page which help user to see full room name

What is the root cause of that problem?

Currently, we are passing numberOfLines to 1 for showing the title which truncates the text and only shows a single line.

numberOfLines={1}

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

  1. We only need to set the numberOfLines to 1 when it is not a chat room. Setting to 0 will result in unsetting this value, which means that no lines restriction will be applied.
    numberOfLines={isChatRoom ? 0 : 1}

    numberOfLines={1}

  2. To allow it to break in multiple lines we also need to take out the style styles.pre from here.

    textStyles={[styles.textHeadline, styles.textAlignCenter, styles.pre]}

    isChatRoom ? undefined : styles.pre

Note: It is applied to all platforms, if requires only for small devices then we need to add withWindowDimensions and with isChatRoom condition in above 2 points we also need to add && props.isSmallScreenWidth.

Result

Simulator Screen Shot - iPhone 14 - 2023-07-11 at 15 30 22

@shawnborton
Copy link
Contributor

Yup we can do this external, thanks!

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 11, 2023
@melvin-bot melvin-bot bot changed the title NEW FEATURE: Don't truncate long room names in room details page [$1000] NEW FEATURE: Don't truncate long room names in room details page Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 11, 2023

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

@mananjadhav
Copy link
Collaborator

Thanks for the proposals folks. For consistency, I think we should focus on solving for all the platforms and not just native apps.

Both the proposals don't fully solve for all the platforms. @dhairyasenjaliya @Pujan92 Can you update your proposals after testing once? Looking forward to it. Also I would recommend sending out a fresh comment, so that we don't end up in a conflict of which proposal came first. Thank you for your patience on this.

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 11, 2023

@mananjadhav my proposal is actually a generic one that behaves the same for all platforms.

@mananjadhav
Copy link
Collaborator

@Pujan92 still truncated on web using your proposal.

image
--- a/src/pages/ReportDetailsPage.js
+++ b/src/pages/ReportDetailsPage.js
@@ -150,8 +150,8 @@ function ReportDetailsPage(props) {
                                     fullTitle={ReportUtils.getReportName(props.report)}
                                     displayNamesWithTooltips={displayNamesWithTooltips}
                                     tooltipEnabled
-                                    numberOfLines={1}
-                                    textStyles={[styles.textHeadline, styles.textAlignCenter, styles.pre]}
+                                    numberOfLines={isChatRoom ? 0 : 1}
+                                    textStyles={[styles.textHeadline, styles.textAlignCenter, isChatRoom ? undefined : styles.pre]}
                                     shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread}
                                 />
                             </View>

@dhairyasenjaliya
Copy link
Contributor

Proposal

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

  • Don't truncate long room names in room details page

What is the root cause of that problem?

  • New Feature request 


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

  • We need to define max number of line to display on room detail page for consistency as we have set max room length of 79 We can ensure to add max number of line to 4 which we can decide but I prefer 4 as it display full room name

  • IMO we do not need to add 0 as numberOfLine as we already aware we have limit of 79 and I did test run on smaller devices as well max line was 4 so for that reason we should add max to 4 rather than 0

  • Also if we need only for room then we need to add conditional check and set numberOfLines set to custom only if chat type is room

  • We need to add a custom numberOfLine to ReportDetailsPage.js inside that we have used <DisplayNames>

  • The above changes do resolve on native iOS and Android but for web and mWeb we have added styles.pre that wraps text to line 1 so if we have a chat type of room then we just remove styles.pre

  • I have not added web changes just because this GH was mentioned only for Native iOS and Android otherwise for web there are only style changes to it

Result

Screenshot 2023-07-11 at 10 52 14 PM

cc @mananjadhav

@mananjadhav
Copy link
Collaborator

Both of you mention about removing the styles.pre, but that shouldn't break #15646

@dhairyasenjaliya
Copy link
Contributor

@mananjadhav shouldn't be a problem for room name as we don't allow space inside it and add - instead of space so i think we are good

@mananjadhav
Copy link
Collaborator

But the display name component is component for room as well as chats, won't that cause an issue?

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 11, 2023

Proposal

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

Don't truncate the room name in the details page which help user to see full room name

What is the root cause of that problem?

Currently, we are passing numberOfLines to 1 for showing the title which truncates the text and only shows a single line.

numberOfLines={1}

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

  1. We only need to set the numberOfLines to 1 when it is not a chat room. Setting to 0 will result in unsetting this value, which means that no lines restriction will be applied.
    numberOfLines={isChatRoom ? 0 : 1}

    numberOfLines={1}

  2. To allow it to break in multiple lines we also need to take out the style styles.pre from here.

    textStyles={[styles.textHeadline, styles.textAlignCenter, styles.pre]}

    isChatRoom ? undefined : styles.pre

  3. Update numberOfLines=1 with numberOfLines=this.props.numberOfLines in the DisplayNames to take the dynamic value from parent.

    numberOfLines={1}

Result

Simulator Screen Shot - iPhone 14 - 2023-07-11 at 15 30 22

Screenshot 2023-07-11 at 10 59 33 PM

@dhairyasenjaliya
Copy link
Contributor

Yeah thats what suggestions is to remove pre only if we have chat type is room other than that we should apply pre since we allow space on other display name

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 11, 2023

But the display name component is component for room as well as chats, won't that cause an issue?

Only for Room we are taking out the whiteSpace: pre style so I think it won't create any issue.

@mananjadhav
Copy link
Collaborator

Thanks for the comments folks. Yeah I saw that on @Pujan92's proposal but I missed reading that in yours @dhairyasenjaliya.

Considering both the proposals, I think @Pujan92's proposal is better to unset the numberOfLines, instead of hard-coding it.

I am a bit concerned about the comment, // Tokenization of string only support 1 numberOfLines on Web, so we'll have to test that we don't break something and trace it back to the original PR when this comment was added.

🎀 👀 🎀 C+ Reviewed.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 21, 2023
@b4s36t4
Copy link
Contributor

b4s36t4 commented Jul 21, 2023

I'm just wondering passing 0 as numberOfLines does make any sense? isn't it weird to understand we're saying 0 lines and it will show all the lines of text? why not just pass undefined or null this makes somewhat sense in my view (came here after seeing PR)?

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 27, 2023
@melvin-bot melvin-bot bot changed the title [$1000] NEW FEATURE: Don't truncate long room names in room details page [HOLD for payment 2023-08-03] [$1000] NEW FEATURE: Don't truncate long room names in room details page Jul 27, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.46-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-08-03. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@mananjadhav
Copy link
Collaborator

This is more like a feature request. Hence we don't have any tagged PR. Because we shouldn't end up working on adding the limit again, I think we should add a regression test.

Regression Test:

  1. Open FAB, and click on New Room
  2. Create a room with a very long name (> 100 characters)
  3. Open the room chat
  4. Click on room name in the header to open report details
  5. Verify that room name won't truncate and shows entire room name text

@Julesssss @jliexpensify wdyt?

Also this is eligible for the timeline bonus, because the change was done well within the timeline, but we got blocked by another PR conflict.

@jliexpensify
Copy link
Contributor

Will let @Julesssss weigh in with the final say on timeline bonus - I'll summarise payments once he weighs in!

@Julesssss
Copy link
Contributor

Regular payment here @jliexpensify

@jliexpensify
Copy link
Contributor

jliexpensify commented Jul 31, 2023

Payments:

Upworks job here

@mananjadhav
Copy link
Collaborator

mananjadhav commented Jul 31, 2023

@jliexpensify It should be $1500, but let's wait for @Julesssss to ack.

@Julesssss
Copy link
Contributor

@jliexpensify It should be $1500, but let's wait for @Julesssss to ack.

Why is that?

@mananjadhav
Copy link
Collaborator

mananjadhav commented Jul 31, 2023

@Julesssss I raised this comment here too during the PR. We had the PR ready but had conflicts. The conflict was primarily a regression, which got this issue delayed. I saw your 👍 in the comment as well as I highlighted the same [here too].(#22613 (comment))

@Julesssss
Copy link
Contributor

Ah yeah, I remember now. 👍

@mananjadhav
Copy link
Collaborator

Thanks. Can you comment and confirm it to @jliexpensify so that he can put up a summary on the issue?

@Julesssss
Copy link
Contributor

@jliexpensify I hereby declare this is worthy of the bonus 😄

@jliexpensify
Copy link
Contributor

Edited

@mananjadhav
Copy link
Collaborator

Raised my request on the NewDot.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 3, 2023
@jliexpensify
Copy link
Contributor

Pujan paiud, job closed. Working on Regression GH now.

@JmillsExpensify
Copy link

Reviewed details for @mananjadhav. These details are accurate based on summary from Business Reviewer and are now approved for payment in NewDot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

10 participants