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 2024-03-14] [$500] Category - No spacing between long category name and category status #37417

Closed
4 of 6 tasks
izarutskaya opened this issue Feb 28, 2024 · 29 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 28, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Found when validating PR : #36324

Version Number: v1.4.44-7
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation:

Action Performed:

Precondition:

  • Collect workspace has a long category name.
  1. Log in to New Dot as admin.
  2. Go to workspace settings > Collect workspace.
  3. Go to Categories.

Expected Result:

There will be spacing between the long category name and category status.

Actual Result:

There is no spacing between the long category name and category status.

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

Bug6395224_1709111519336!Screenshot_20240228-130857_New_Expensify__1_

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014c7dcc9cd5ddc2d3
  • Upwork Job ID: 1762812215508320256
  • Last Price Increase: 2024-02-28
  • Automatic offers:
    • Ollyws | Reviewer | 0
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 28, 2024
@melvin-bot melvin-bot bot changed the title Category - No spacing between long category name and category status [$500] Category - No spacing between long category name and category status Feb 28, 2024
Copy link

melvin-bot bot commented Feb 28, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 28, 2024
Copy link

melvin-bot bot commented Feb 28, 2024

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

Copy link

melvin-bot bot commented Feb 28, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 28, 2024
Copy link
Contributor

👋 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.

Copy link

melvin-bot bot commented Feb 28, 2024

Current assignee @puneetlath is eligible for the Engineering assigner, not assigning anyone new.

@izarutskaya
Copy link
Author

We think that this bug might be related to #wave6-collect-submitters
CC @greg-schroeder

@Krishna2323
Copy link
Contributor

Krishna2323 commented Feb 28, 2024

Proposal

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

Category - No spacing between long category name and category status

What is the root cause of that problem?

We don't have any margins/padding between text and alternateText

<TextWithTooltip
shouldShowTooltip={showTooltip}
text={item.text}
textStyles={[
styles.optionDisplayName,
isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText,
styles.sidebarLinkTextBold,
styles.pre,
item.alternateText ? styles.mb1 : null,
styles.justifyContentCenter,
]}
/>
{!!item.alternateText && (
<TextWithTooltip
shouldShowTooltip={showTooltip}
text={item.alternateText}
textStyles={[styles.textLabelSupporting, styles.lh16, styles.pre]}
/>
)}

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

Add margins/padding between text and alternateText. Spacing can be discussed with the design team or can be same as other similar component.

Need to apply margin here:

<View style={[styles.flex1, styles.flexColumn, styles.justifyContentCenter, styles.alignItemsStretch]}>

Result

text

@dragnoir
Copy link
Contributor

dragnoir commented Feb 28, 2024

Proposal

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

Missing padding left

What is the root cause of that problem?

On WorkspaceCategoriesPage, the rightElement is missing a margin left.

rightElement: (
<View style={styles.flexRow}>
<Text style={[styles.disabledText, styles.alignSelfCenter]}>{value.enabled ? translate('workspace.common.enabled') : translate('workspace.common.disabled')}</Text>
<View style={[styles.p1, styles.pl2]}>
<Icon
src={Expensicons.ArrowRight}
fill={theme.icon}
/>

We can see that ther's a styles.pl2 for a marginLeft between the icon and the "Enabled". But we are missing another margin on the left between this rightElemen and what ever will be on the left side.

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

When dealing with a block containing two elements positioned on the left and right sides, it's preferable to apply margin-left to the element on the right. This ensures that if the right element is not displayed, the margin is automatically removed. Conversely, if we apply margin-right to the left element and the right element is subsequently removed, the margin persists, potentially leading to UI issues.

Here we need to add margin left to rightElement:

rightElement: (
  <View  style={styles.flexRow}>
-  <Text  style={[styles.disabledText, styles.alignSelfCenter]}>
+  <Text  style={[styles.disabledText, styles.alignSelfCenter, styles.pl2]}>
    {value.enabled ? translate('workspace.common.enabled') : translate('workspace.common.disabled')}
  </Text>
 

What alternative solutions did you explore? (Optional)

POC;
image

@puneetlath puneetlath removed the DeployBlockerCash This issue or pull request should block deployment label Feb 28, 2024
@puneetlath puneetlath added Daily KSv2 and removed Hourly KSv2 labels Feb 28, 2024
@wustwg
Copy link

wustwg commented Feb 28, 2024

Maybe this question is stupid. How can I "Log in to New Dot as admin"?
I find every where on Expensify App and web Ui, but find nothing.
I find the source code of categories , but I don't know how can I show it for me.

@brandonhenry
Copy link
Contributor

brandonhenry commented Feb 29, 2024

@wustwg no question is stupid :)

you can login to new dot as an admin by simply being the owner of the workspace. To see categories, you're going to need to go to Old Dot and login to your account (this one will be the "admin" account). Then go to settings -> workspaces -> new workspace. Create a Collect workspace. Open the console and enter:

p = Policy.getCurrent();
p.policy.isPolicyExpenseChatEnabled = "true";
p.save();

And you're done. Now you should start seeing the collect workspace in ND and the categories

@askavyblr
Copy link

@wustwg no question is stupid :)

you can login to new dot as an admin by simply being the owner of the workspace. To see categories, you're going to need to go to Old Dot and login to your account (this one will be the "admin" account). Then go to settings -> workspaces -> new workspace. Create a Collect workspace. Open the console and enter:

p = Policy.getCurrent();
p.policy.isPolicyExpenseChatEnabled = "true";
p.save();

And you're done. Now you should start seeing the collect workspace in ND and the categories

@brandonhenry please tell me more about Old Dot and login, i did not understand

@brandonhenry
Copy link
Contributor

brandonhenry commented Feb 29, 2024

@wustwg @askavyblr please read the Contributor Guidelines. It has all the information you need

@Ollyws
Copy link
Contributor

Ollyws commented Feb 29, 2024

Couldn't get to this one today but will do tomorrow.

@Ollyws
Copy link
Contributor

Ollyws commented Mar 1, 2024

@Krishna2323 The problem with adding margin to this view is that it will add unwanted margin even when the rightElement isn't being displayed.

@dragnoir's proposal LGTM.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Mar 1, 2024

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

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

melvin-bot bot commented Mar 1, 2024

📣 @Ollyws 🎉 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

Copy link

melvin-bot bot commented Mar 1, 2024

📣 @dragnoir You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@dragnoir
Copy link
Contributor

dragnoir commented Mar 4, 2024

PR will be ready in just few hours :)

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Mar 4, 2024
@dragnoir
Copy link
Contributor

dragnoir commented Mar 4, 2024

PR ready #37668

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 7, 2024
@melvin-bot melvin-bot bot changed the title [$500] Category - No spacing between long category name and category status [HOLD for payment 2024-03-14] [$500] Category - No spacing between long category name and category status Mar 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

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

Copy link

melvin-bot bot commented Mar 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.48-0 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 2024-03-14. 🎊

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

Copy link

melvin-bot bot commented Mar 7, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@Ollyws] The PR that introduced the bug has been identified. Link to the PR:
  • [@Ollyws] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@Ollyws] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@Ollyws] Determine if we should create a regression test for this bug.
  • [@Ollyws] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@puneetlath
Copy link
Contributor

@Ollyws friendly reminder about the checklist so we can pay in a couple days.

@Ollyws Ollyws mentioned this issue Mar 13, 2024
50 tasks
@Ollyws
Copy link
Contributor

Ollyws commented Mar 13, 2024

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR:

#36324

  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

#36324 (comment)

  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

N/A

  • Determine if we should create a regression test for this bug.

Yes

  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

Precondition: Collect workspace has a long category name.

1. Log in to New Dot as admin.
2. Go to workspace settings > Collect workspace.
3. Go to Categories.
4. Verify that there is padding between the category name and category status

Do we agree 👍 or 👎

@puneetlath
Copy link
Contributor

Thanks. @Ollyws @dragnoir offers to both of you are pending. Please ping on this issue once you've accepted.

@dragnoir
Copy link
Contributor

Thank you @puneetlath offer accepted, also pls check here #37668 (comment)

@puneetlath
Copy link
Contributor

@dragnoir has been paid.

@Ollyws ping me here when you've accepted the offer.

@Ollyws
Copy link
Contributor

Ollyws commented Mar 14, 2024

@puneetlath accepted, thanks!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 14, 2024
@puneetlath
Copy link
Contributor

All paid. Thanks y'all!

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Development

No branches or pull requests

8 participants