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

[$500] Android - LHN - Magic glass icon overlaps text #41349

Open
lanitochka17 opened this issue Apr 30, 2024 · 55 comments
Open

[$500] Android - LHN - Magic glass icon overlaps text #41349

lanitochka17 opened this issue Apr 30, 2024 · 55 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Design External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Apr 30, 2024

Version Number: 1.4.68-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: expensify.testrail.io/index.php?/cases/view/2990351
Issue reported by: Applause - Internal Team

Action Performed:
Precondition: User is logged in Android mobile application. Preferences - #focus

Unpin all chats in LHN
Mark all chats in LHN as read
Expected Result:
"All caught up.." UI is displayed. No visual issues with text

Actual Result:
"All caught up.." UI is displayed. Magic glass icon is overlaps the text annotation
image

Workaround:
Unknown

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence

Bug6466750_1714490725789!1714490435348

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @Santhosh-Sellavel
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@alexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@ShridharGoel
Copy link
Contributor

ShridharGoel commented May 1, 2024

Proposal

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

Android - LHN - Magic glass icon overlaps text.

What is the root cause of that problem?

Text rendering can vary between platforms.

https://www.codeclouds.com/blog/why-web-fonts-matter-a-short-history-and-future-of-font-rendering/

facebook/react-native#32384

On Android, having text with center alignment doesn't center align the inline icons.

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

Add this in styles/index.ts:

emptyLHNDetailsContainer: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'center',
    flexWrap: 'wrap',
    textAlign: 'center',
}

Update emptyLHNSubtitle to use the below:

const emptyLHNSubtitle = useMemo(
    () => (
        <View style={[styles.emptyLHNDetailsContainer]}>
            <Text
                style={[
                    styles.textAlignCenter,
                    { color: theme.placeholderText },
                ]}
            >
                {translate('common.emptyLHN.subtitleText1')}
            </Text>
            <Icon
                src={Expensicons.MagnifyingGlass}
                width={variables.emptyLHNIconWidth}
                height={variables.emptyLHNIconHeight}
                fill={theme.icon}
                small
                inline
                additionalStyles={styles.mh1}
            />
            <Text
                style={[
                    styles.textAlignCenter,
                    { color: theme.placeholderText },
                ]}
            >
                {translate('common.emptyLHN.subtitleText2')}
            </Text>
            <Icon
                src={Expensicons.Plus}
                width={variables.emptyLHNIconWidth}
                height={variables.emptyLHNIconHeight}
                fill={theme.icon}
                small
                inline
                additionalStyles={styles.mh1}
            />
            <Text
                style={[
                    styles.textAlignCenter,
                    { color: theme.placeholderText },
                ]}
            >
                {translate('common.emptyLHN.subtitleText3')}
            </Text>
        </View>
    ),
    [theme, translate],
);
Screenshot 2024-05-24 at 5 33 24 PM

What alternate options did you explore?

Option 1:

Update the below to use only text and no inline icons. We'll update the text based on this comment and icons would no longer be there.

const emptyLHNSubtitle = useMemo(
() => (
<View>
<Text
color={theme.placeholderText}
style={[styles.textAlignCenter]}
>
{translate('common.emptyLHN.subtitleText1')}
<Icon
src={Expensicons.MagnifyingGlass}
width={variables.emptyLHNIconWidth}
height={variables.emptyLHNIconHeight}
small
inline
fill={theme.icon}
additionalStyles={styles.alignItemsCenter}
/>
{translate('common.emptyLHN.subtitleText2')}
<Icon
src={Expensicons.Plus}
width={variables.emptyLHNIconWidth}
height={variables.emptyLHNIconHeight}
small
inline
fill={theme.icon}
additionalStyles={styles.alignItemsCenter}
/>
{translate('common.emptyLHN.subtitleText3')}
</Text>
</View>
),
[theme, styles.alignItemsCenter, styles.textAlignCenter, translate],
);

Option 2:

We can remove textAlignCenter style for Android, and let the text be at the left side.

We'll create a new style called textAlignCenterWithInlineIcons which will have a Android specific implementation in index.android.ts and common implementation will be in index.ts. We can have it inside a new package in styles/utils.

In index.ts:

textAlignCenterWithInlineIcons: {
    textAlign: 'center',
}

In index.android.ts:

textAlignCenterWithInlineIcons: {
}

@melvin-bot melvin-bot bot added the Overdue label May 2, 2024
@alexpensify
Copy link
Contributor

I can replicate the experience, but I'm not sure if this issue is device-specific because my + icon is overlapping with the copy.
image

@melvin-bot melvin-bot bot removed the Overdue label May 2, 2024
@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

@melvin-bot melvin-bot bot changed the title Android - LHN - Magic glass icon overlaps text [$250] Android - LHN - Magic glass icon overlaps text May 2, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

@alexpensify
Copy link
Contributor

@Santhosh-Sellavel - when you get a chance, can you please review if this proposal will fix the issue? Thanks!

@Santhosh-Sellavel
Copy link
Collaborator

AFAIK We can use Icon inline in other places as well. So waiting for other proposals.

@ShridharGoel
Copy link
Contributor

@Santhosh-Sellavel My proposal doesn't change the functionality of inline icons at other places.

@alexpensify
Copy link
Contributor

Heads up, I will be offline until Tuesday, May 7, 2024, and will not actively watch over this GitHub during that period.

If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!

@Santhosh-Sellavel
Copy link
Collaborator

@Santhosh-Sellavel My proposal doesn't change the functionality of inline icons at other places.

Yes, I am aware of that. Let's wait for other proposals.

Copy link

melvin-bot bot commented May 7, 2024

@alexpensify, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label May 7, 2024
@Santhosh-Sellavel
Copy link
Collaborator

Still waiting for other proposals.

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
Copy link

melvin-bot bot commented May 10, 2024

@alexpensify, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label May 10, 2024
@ShridharGoel
Copy link
Contributor

When we use center-alignment in Android, the text gets aligned but inline icons don't. So, I still think the way to solve this is to align text at left only in this case for Android.

@alexpensify Can we get thoughts from internal engineer and design team?

@ShridharGoel
Copy link
Contributor

Proposal

Updated

Copy link

melvin-bot bot commented May 24, 2024

@alexpensify, @mallenexpensify, @Santhosh-Sellavel, @dubielzyk-expensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@mallenexpensify
Copy link
Contributor

@Santhosh-Sellavel 👀 plz on the updated proposal above from @ShridharGoel . Thx

@Santhosh-Sellavel
Copy link
Collaborator

Can you reassign this @mallenexpensify, while I'm away.

cc: @Expensify/contributor-plus Any volunteers please take, thanks!

@melvin-bot melvin-bot bot removed the Overdue label May 26, 2024
@allroundexperts
Copy link
Contributor

I can take over!

@parasharrajat
Copy link
Member

I can help.

@parasharrajat
Copy link
Member

parasharrajat commented May 26, 2024

@ShridharGoel Could you please explain the code Suggestion you posted and tell us about your changes?

Also, how does it look on iPhone 14 pro and iPhone 8?

we can not for sure use the android specific code so that is out of the picture.

@ShridharGoel
Copy link
Contributor

ShridharGoel commented May 27, 2024

iPhone 8

Simulator Screenshot - iPhone 8 - 2024-05-27 at 00 12 31

iPhone 14

Simulator Screenshot - iPhone 14 Pro - 2024-05-27 at 00 51 57

@ShridharGoel
Copy link
Contributor

Could you please explain the code Suggestion you posted and tell us about your changes?

The updated solution uses flexbox to ensure proper alignment and spacing.

@parasharrajat
Copy link
Member

parasharrajat commented May 27, 2024

Ok, I think we can go with @ShridharGoel's #41349 (comment). Their main solution looks good to me.

Keeping the same icons mix string and align it well.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented May 27, 2024

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

@parasharrajat
Copy link
Member

@iwiznia we also need to swap C+ as per #41349 (comment)

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 27, 2024
@iwiznia
Copy link
Contributor

iwiznia commented May 27, 2024

Assigned @ShridharGoel. Not sure how to trigger a new reassignment for C+ though... @mallenexpensify or @alexpensify do you know?

Copy link

melvin-bot bot commented May 28, 2024

@iwiznia @alexpensify @mallenexpensify @ShridharGoel @Santhosh-Sellavel @dubielzyk-expensify this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@mallenexpensify
Copy link
Contributor

Removed @Santhosh-Sellavel and assigned @parasharrajat . Should be all set.

@parasharrajat
Copy link
Member

@ShridharGoel Feel free to move ahead with the PR as you are assigned. Offer can be sent later.

@alexpensify
Copy link
Contributor

Thanks, @mallenexpensify, for the help here. I'm back online and taking over again as the BZ member.

@parasharrajat
Copy link
Member

@ShridharGoel When can we expect the PR?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 29, 2024
@ShridharGoel
Copy link
Contributor

@parasharrajat #42801

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. Design External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests