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.4k stars 2.79k forks source link

[$125] [Search v2.3] IOS - Emoji is cut off in the dropdown button #49890

Open lanitochka17 opened 4 days ago

lanitochka17 commented 4 days 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!


Version Number: 9.0.41-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

Expected Result:

The emoji will not be cut off in the dropdown button

Actual Result:

The emoji is cut off in the dropdown button

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/44146f16-1207-4e7a-99eb-1b23098f749f

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021840184545557049275
  • Upwork Job ID: 1840184545557049275
  • Last Price Increase: 2024-09-29
  • Automatic offers:
    • ahmedGaber93 | Reviewer | 104219452
    • Nodebrute | Contributor | 104219453
Issue OwnerCurrent Issue Owner: @ahmedGaber93
melvin-bot[bot] commented 4 days ago

Triggered auto assignment to @roryabraham (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 4 days ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
lanitochka17 commented 4 days ago

Production:

https://github.com/user-attachments/assets/1d2fac2a-988a-4315-b9c8-0991ec2e546e

Nodebrute commented 4 days ago

Edited by proposal-police: This proposal was edited at 2024-09-28 19:37:50 UTC.

Proposal

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

Emoji is cut off in the dropdown button

What is the root cause of that problem?

We recently enabled users to add emojis to saved search names, but we didn't update the styles of the Text component to support emojis. https://github.com/Expensify/App/blob/3047c1baa21f47825f5c1ffd652184341dd22256/src/pages/Search/SearchTypeMenuNarrow.tsx#L158-L163

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

We should also add styles of lineHeight: variables.lineHeightLarge to this text component https://github.com/Expensify/App/blob/3047c1baa21f47825f5c1ffd652184341dd22256/src/pages/Search/SearchTypeMenuNarrow.tsx#L158-L163

Solution 1

          style={[styles.textStrong, styles.flexShrink1, styles.label]}

Solution 2

                                style={[styles.textStrong, styles.flexShrink1, styles.fontSizeLabel, styles.lineHeightLarge]}
Screenshot 2024-09-29 at 12 30 46 AM

Other minor styles can be adjusted in the PR

What alternative solutions did you explore? (Optional)

We can also use styles.textLineHeightNormal here

                                style={[styles.textStrong, styles.flexShrink1, styles.fontSizeLabel,styles.textLineHeightNormal]}

Alternative solution 2 We can add the lineheight styles according to the design.

roryabraham commented 4 days ago

Issue stemming from https://github.com/Expensify/App/pull/49528, but NAB and not worth reverting imo

melvin-bot[bot] commented 4 days ago

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

melvin-bot[bot] commented 4 days ago

Triggered auto assignment to @dylanexpensify (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.

melvin-bot[bot] commented 4 days ago

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

melvin-bot[bot] commented 4 days ago

Triggered auto assignment to @dannymcclain (Design), see these Stack Overflow questions for more details.

melvin-bot[bot] commented 4 days ago

Upwork job price has been updated to $125

roryabraham commented 4 days ago

I think that @Nodebrute's proposal looks reasonable, but want @dannymcclain to double-check first

Krishna2323 commented 4 days ago

Proposal


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

IOS - Saved search - Emoji is cut off in the dropdown button

What is the root cause of that problem?

https://github.com/Expensify/App/blob/3047c1baa21f47825f5c1ffd652184341dd22256/src/pages/Search/SearchTypeMenuNarrow.tsx#L158-L163

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


const hasEmoji = useMemo(() => containsEmoji(menuTitle), [menuTitle]);

What alternative solutions did you explore? (Optional)

Result

Kicu commented 3 days ago

The solution presented by @Nodebrute seems legit but I would suggest one small improvement.

I can see that we have a dedicated style called label here: https://github.com/Expensify/App/blob/d47e1562fa6adb9968623512ee59af0fa6a4acba/src/styles/index.ts#L371 and it is defined like this:

label: {
      fontSize: variables.fontSizeLabel,
      lineHeight: variables.lineHeightLarge,
}

That tells me we do want this specific lineHeightLarge combined with fontSizeLabel. So I think instead of directly adding lineHeightLarge in the component we should just use styles.label. This style is used in multiple other places as well.

dannymcclain commented 2 days ago

Solution seems reasonable to me.

As a side note: I think we need to add the clear / circle-x button to that name field so people can clear it out quickly and easily (like we do with Group names): CleanShot 2024-09-30 at 08 28 16@2x Obviously that doesn't need to be part of this issue, just making a note here so I don't forget 😂 cc @dubielzyk-expensify

Muhammad-Maraj-Khan commented 2 days ago

The solution also seems good for me.

melvin-bot[bot] commented 2 days ago

📣 @Muhammad-Maraj-Khan! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
Muhammad-Maraj-Khan commented 2 days ago

Contributor details Your Expensify account email: mairajkhan11345@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01fdb5331a4bc5b415

melvin-bot[bot] commented 2 days ago

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Nodebrute commented 2 days ago

@roryabraham Can you assign this to me? Just a suggestion: could you increase the price? I can also implement this. https://github.com/Expensify/App/issues/49890#issuecomment-2383200176

roryabraham commented 2 days ago

Awaiting 👍🏼 from @ahmedGaber93 since he'll have to review the PR. I set the price lower because this seems like a very simple issue and it affects only one platform.

ahmedGaber93 commented 2 days ago

@Nodebrute's proposal LGTM! And works fine on other platforms

🎀 👀 🎀 C+ reviewed

melvin-bot[bot] commented 2 days ago

Current assignee @roryabraham is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

ahmedGaber93 commented 2 days ago

Do we solve this https://github.com/Expensify/App/issues/49890#issuecomment-2383200176 here too? If yes, we can handle it in the PR.

dannymcclain commented 1 day ago

Do we solve this https://github.com/Expensify/App/issues/49890#issuecomment-2383200176 here too? If yes, we can handle it in the PR.

I'll let @roryabraham weigh in on that one/decide—it's pretty unrelated but if it's a super simple update it'd be nice to get it knocked out.

roryabraham commented 1 day ago

Do we solve this https://github.com/Expensify/App/issues/49890#issuecomment-2383200176 here too? If yes, we can handle it in the PR.

Nah, let's do a separate issue for that. @dannymcclain can you create it, and label it Bug, External plz?

melvin-bot[bot] commented 1 day ago

📣 @ahmedGaber93 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 1 day ago

📣 @Nodebrute 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

Nodebrute commented 23 hours ago

I'll raise the pr in few hours.