Skip to content

Search - Tax and total value text are different heights #43909

Description

@lanitochka17

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: 1.4.85-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: N/A
Issue reported by: Applause - Internal Team

Issue found when executing PR #43764

Action Performed:

Precondition: Have at least one submitted expense with tax in a workspace chat.

  1. Navigate to https://staging.new.expensify.com/
  2. Open Search

Expected Result:

The values should be in line

Actual Result:

Tax and Total value text isn't line with each other in the row

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

Recording.1977.mp4

View all open jobs on GitHub

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 18, 2024
  2. melvin-bot commented on Jun 18, 2024

    @melvin-bot

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

  3. lanitochka17 commented on Jun 18, 2024

    @lanitochka17
    Author

    @CortneyOfstad 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

  4. daledah commented on Jun 18, 2024

    @daledah
    Contributor

    Proposal

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

    Tax and Total value text isn't line with each other in the row

    What is the root cause of that problem?

    Tax and total value text are different heights because they have different font sizes and line height

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

    Update the style of the Tax value to be the same as the Total value

    What alternative solutions did you explore? (Optional)

  5. devguest07 commented on Jun 18, 2024

    @devguest07
    Contributor

    Proposal

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

    Tax and total value text are different heights

    What is the root cause of that problem?

    Tax cell use line-height: 18 but Total cell use line-height: 20

    style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textAlignRight]}

    We use two lineHeight values from two styles
    1- 20 form optionDisplayName
    2- 18 from label

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

    We should use the same line-height for all cells. So remove the one from styles.labes

    What alternative solutions did you explore? (Optional)

    We need to make sure there's no duplicate styles. We can review style applied to all cells and make sure we use the same value for lineHeight or fonts, ....

  6. Krishna2323 commented on Jun 18, 2024

    @Krishna2323
    Contributor

    Proposal

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

    Search - Tax and total value text are different heights

    What is the root cause of that problem?

    The alignment issue is because of using styles.optionDisplayName on CategoryCell, TagCell. TaxCell and TotalCell. The styles.optionDisplayName has minHeight: variables.alternateTextHeight which takes minimum height of 20px causing the alignment issue.

    App/src/styles/index.ts

    Lines 1824 to 1829 in cceb345

    optionDisplayName: {
    fontFamily: FontUtils.fontFamily.platform.EXP_NEUE,
    minHeight: variables.alternateTextHeight,
    lineHeight: variables.lineHeightXLarge,
    ...whiteSpace.noWrap,
    },

    In the screenshot below, we can see that the tag, tax text cell is aligned to top.
    Monosnap (78) New Expensify 2024-06-18 21-38-33

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

    We can solve this issue in few ways:

    1. Remove styles.optionDisplayName style.
    2. Overwrite minHeight by passing {minHeight: 'auto'} or adding it to any style object.
    3. Use styles required from styles.optionDisplayName and remove styles.optionDisplayName, I don't think the styles.optionDisplayName is required in CategoryCell, TagCell. TaxCell and for TotalCell we leave as it is because the font line height is also 20px so, it won't affect.

    What alternative solutions did you explore? (Optional)

  7. Krishna2323 commented on Jun 18, 2024

    @Krishna2323
    Contributor

    Proposal Updated

    • Added option 3 in main solution
  8. CortneyOfstad commented on Jun 19, 2024

    @CortneyOfstad
    Contributor

    Double checking with the design team here, as this may be on purpose. Will follow up as soon as I have confirmation!

  9. CortneyOfstad commented on Jun 19, 2024

    @CortneyOfstad
    Contributor

    A PR is already in place for this here, so this can be closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions