Skip to content

[Due for payment 2025-02-27] The type and status portion of the router does not use the correct darker text color #56559

Closed

Description

@m-natarajan

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.95-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation (hyperlinked to channel name): Expense

Action Performed:

  1. Navigate to report search > Expenses
  2. Click Search and enter anything to search

Expected Result:

The type and status portion of the router use the correct darker text color

Actual Result:

The type and status portion of the router does not use the correct darker text color

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Image

Image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @OfstadC

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 7, 2025
  2. melvin-bot commented on Feb 7, 2025

    @melvin-bot

    Triggered auto assignment to @OfstadC (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. linhvovan29546 commented on Feb 8, 2025

    @linhvovan29546
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-02-08 03:25:54 UTC.

    Proposal

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

    The type and status portion of the router does not use the correct darker text color

    What is the root cause of that problem?

    In SearchAutocompleteInput, we use a markdown input.


    And the styling is applied via the useMarkdownStyle hook. useMarkdownStyle uses syntax color, and in light mode, the color is set to productLight800, which appears lighter than expected.
    syntax: {
    color: theme.syntax,
    },

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

    We can update the syntax color in light mode to a darker text color, such as productLight900, but this change would apply to all markdown inputs.

    syntax: colors.productLight800,

    A safer solution is to introduce a new prop styles, to override markdownStyle.
    const styling = {
    syntax: {
    color: theme.syntax,
    },

    function useMarkdownStyle(message: string | null = null, excludeStyles: Array<keyof MarkdownStyle> = defaultEmptyArray, styles)
    ....
                syntax: {
                    color: theme.syntax,
                    ...styles?.syntax,
                },
    
    // Alternatively, we can override it like this:
    if (styles) {
        Object.keys(styles).forEach((key) => {
            if (styles[key]) {
                // Merge nested objects
                styling[key] = { ...styling[key], ...styles[key] };
            }
        });
    }

    Then, in SearchAutocompleteInput, we can override the markdown style like this:

    markdownStyle={{syntax:{color:theme.darkerColor}}} //The color based on design 

    const markdownStyle = useMarkdownStyle(undefined, excludedMarkdownStyles);
    and native as well

        const markdownStyle = useMarkdownStyle(undefined, excludedMarkdownStyles,inputProps?.markdownStyle);

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A, UI bug

    What alternative solutions did you explore? (Optional)

    N/A
    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. samranahm commented on Feb 8, 2025

    @samranahm
    Contributor

    Related to #56560

  5. 289Adam289 commented on Feb 10, 2025

    @289Adam289
    Contributor

    Hi, I am Adam from SWM and I would like to work on this issue. It is a regression from my PR #56243

    cc @luacmartins for visibility

  6. OfstadC commented on Feb 10, 2025

    @OfstadC
    Contributor

    Thanks @289Adam289 !

  7. luacmartins commented on Feb 10, 2025

    @luacmartins
    Contributor

    @289Adam289 before you start working on this. Let's first agree on the expected behavior since this is the expected behavior described in the design doc.

  8. self-assigned this
    on Feb 10, 2025
  9. shawnborton commented on Feb 10, 2025

    @shawnborton
    Contributor

    The only thing I think we need to change is just change the color from textSupporting to our regular text color. Any normal text that's in the router should just use our normal text color.

  10. 14 remaining items

  11. ikevin127 commented on Feb 20, 2025

    @ikevin127
    Contributor

    Let's first agree on the expected behavior since this is the expected behavior described in the design doc.

    @luacmartins Should I receive payment for the review of the revert PR given that the revert wasn't performed due to a mistake / lack of testing from author / reviewer but rather a mistake in the design doc ? 🤔

  12. luacmartins commented on Feb 21, 2025

    @luacmartins
    Contributor

    Yea, you should

  13. ikevin127 commented on Feb 25, 2025

    @ikevin127
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other: Design doc mismatch.

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: Not needed since this issue occured due to a mistake in the design doc, see #56559 (comment) for details.

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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.

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Not need for a regression test since this issue occured due to a mistake in the design doc, see #56559 (comment) for details.

  14. moved this to Hold for Payment in #expensify-bugson Feb 25, 2025
  15. melvin-bot commented on Feb 27, 2025

    @melvin-bot

    Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

  16. ikevin127 commented on Feb 27, 2025

    @ikevin127
    Contributor

    Incorrect, I require payment for reviewing the PR - confirmed here, BZ Checklist completed ✅

  17. luacmartins commented on Feb 27, 2025

    @luacmartins
    Contributor

    @ikevin127 assigned you to the issue. @OfstadC we need to process payment to @ikevin127 for the PR review.

  18. OfstadC commented on Feb 27, 2025

    @OfstadC
    Contributor

    @ikevin127 - Offer sent here

  19. ikevin127 commented on Feb 27, 2025

    @ikevin127
    Contributor

    @OfstadC Offer accepted, thank you!

  20. OfstadC commented on Feb 27, 2025

    @OfstadC
    Contributor

    Payment Summary

  21. moved this from Hold for Payment to Done in #expensify-bugson Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions