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

[$2000] Android - Title is not rendered fully in the available space. #21219

Open
1 of 6 tasks
kbecciv opened this issue Jun 21, 2023 · 194 comments
Open
1 of 6 tasks

[$2000] Android - Title is not rendered fully in the available space. #21219

kbecciv opened this issue Jun 21, 2023 · 194 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jun 21, 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. Open the app on Android.
  2. See the chats in the LHN.
  3. Notice a few reports will longer title.

Expected Result:

Title is clipped when reached the right edge of the screen.

Actual Result:

Title is clipped with ellipsis in the middle of screen and there is more available room.

Workaround:

Unknown

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: 1.3.27-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

Screenshot 2023-06-14 at 6 54 44 PM (1)

Screenshot_20230620_203809_New Expensify

Expensify/Expensify Issue URL:

Issue reported by: @parasharrajat

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686749244980549

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ef0ae782c96792ac
  • Upwork Job ID: 1671576465794899968
  • Last Price Increase: 2023-11-06
  • Automatic offers:
    • aimane-chnaif | Reviewer | 27596163
    • fabriziobertoglio1987 | Contributor | 27981486
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Jun 21, 2023

Proposal

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

Android - Title is not rendered fully in the available space.

What is the root cause of that problem?

The root cause is android use different way to break words, see here and textbreakstrategy explanation here
I don't think any textbreakstrategy value will make the text stretch to end of the line, because there is no flex 1 style for text which make Text break instead of stretch in the parent view.

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

remove style optionDisplayNameCompact and add styles.flex1

const displayNameStyle = StyleUtils.combineStyles([styles.optionDisplayName, styles.pre, styles.flex1, ...textUnreadStyle], props.style);
old proposal

we need change flexGrow: 0, here to be flexGrow: 1, or remove it and use flex: 1

App/src/styles/styles.js

Lines 1401 to 1406 in 797298e

optionDisplayNameCompact: {
minWidth: 'auto',
flexBasis: 'auto',
flexGrow: 0,
flexShrink: 1,
},

before and after.

Screenshot 2023-07-12 at 5 07 24 PM

What alternative solutions did you explore? (Optional)

@adelekennedy
Copy link

adelekennedy commented Jun 21, 2023

yeah - longer chat names are being cut off in the center of the screen with ellipses rather than reaching the border of the screen like we see in IOS

@adelekennedy adelekennedy added the External Added to denote the issue can be worked on by a contributor label Jun 21, 2023
@melvin-bot melvin-bot bot changed the title Android - Title is not rendered fully in the available space. [$1000] Android - Title is not rendered fully in the available space. Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

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

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 21, 2023

Proposal

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

Android - Title is not rendered fully in the available space.

What is the root cause of that problem?

Default Text render startegy for android is highQuality which is causing the issue where it breaks unwantedly the string but we are only showing a single line.

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

We need to provide the prop textBreakStrategy here with textBreakStrategy="simple" which solves the issue.
Same we are providing for ResendValidationForm here.

<Text
accessibilityLabel={props.accessibilityLabel}
style={props.textStyles}
numberOfLines={props.numberOfLines}
>

@manjesh-yadav
Copy link
Contributor

manjesh-yadav commented Jun 22, 2023

Proposal

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

Android - Title is not rendered fully in the available space.

What is the root cause of that problem?

It is Android style word breaking IOS work differently that is why we found two diffrent design in the screenshot.

textBreakStrategy="simple" is not the right solution for the following reasons.

  1. textBreakStrategy="simple" use for, not break words when break line
  2. textBreakStrategy="simple" lose the layout quality in Android Read here
  3. it's not working on all devices Read here
  4. In other devices textBreakStrategy="simple" is just removing - at the end and works the same as before

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

I suggest use text.replace(/\s/g, '\xa0') for replacing whitespace by non-breaking unicode space in the variable and it will work fine and it does not lose any layout quality.

We are using different files for web and native so it will not affect our web

function DisplayNames(props) {
return (
<Text
accessibilityLabel={props.accessibilityLabel}
style={props.textStyles}
numberOfLines={props.numberOfLines}
>
{props.fullTitle}
</Text>
);

function DisplayNames(props) {
    return (
        <Text
            accessibilityLabel={props.accessibilityLabel}
            style={props.textStyles}
            numberOfLines={props.numberOfLines}
        >
-           {props.fullTitle}
+            {props.fullTitle.replace(/\s/g, '\xa0')}
        </Text>
    );
}
Result

Screenshot_1687443917

IMG_D674EEB790B1-1

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jun 23, 2023
@adelekennedy
Copy link

@aimane-chnaif thoughts on the proposal above?

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

@adelekennedy, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!

@adelekennedy
Copy link

I don't think we need to adjust the bounty just yet - we have proposals above to review

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jun 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

@adelekennedy, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!

@adelekennedy
Copy link

pending proposal review @aimane-chnaif

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

@adelekennedy @aimane-chnaif 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!

@adelekennedy adelekennedy changed the title [HOLD][$2000] Android - Title is not rendered fully in the available space. [$2000] Android - Title is not rendered fully in the available space. Apr 2, 2024
@adelekennedy
Copy link

I've moved this off hold as as the reviewer is now back from ooo - I've also moved this to VIP VSB

@rlinoz
Copy link
Contributor

rlinoz commented Apr 20, 2024

I think this comment is pending an answer facebook/react-native#39722 (comment)

@fabOnReact

@fabOnReact
Copy link
Contributor

fabOnReact commented May 15, 2024

Update 15th May 2024

Replied to Timothy comment facebook/react-native#39722 (comment)

@adelekennedy
Copy link

Still waiting for a response

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Jun 17, 2024

Still waiting.

@rlinoz
Copy link
Contributor

rlinoz commented Jul 18, 2024

Still waiting, @fabOnReact is a bump on the comment worth it?

@melvin-bot melvin-bot bot removed the Overdue label Jul 18, 2024
@fabOnReact
Copy link
Contributor

fabOnReact commented Jul 23, 2024

@rlinoz I will reach out to Meta tomorrow and try to move forward with the PR and/or the conversation. Thanks

@rlinoz
Copy link
Contributor

rlinoz commented Aug 26, 2024

Discussion is ongoing.

@melvin-bot melvin-bot bot removed the Overdue label Aug 26, 2024
@melvin-bot melvin-bot bot added the Overdue label Sep 26, 2024
@aimane-chnaif
Copy link
Contributor

@fabOnReact what is status?

@melvin-bot melvin-bot bot removed the Overdue label Sep 30, 2024
@adelekennedy
Copy link

Adding to the above - do we have a general plan here for how to move forward? This has been open for over a year 😲

@fabOnReact
Copy link
Contributor

I'm reaching out to Meta to ask to move this forward. Thanks a lot

@adelekennedy
Copy link

@fabOnReact anything from Meta?

@melvin-bot melvin-bot bot removed the Overdue label Nov 1, 2024
@s77rt
Copy link
Contributor

s77rt commented Nov 21, 2024

👋 Hey, I have been working on this as well facebook/react-native#47435. I can raise a PR for the patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2
Projects
None yet
Development

No branches or pull requests