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

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

Closed
1 of 8 tasks
m-natarajan opened this issue Feb 7, 2025 · 22 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

Comments

@m-natarajan
Copy link

m-natarajan commented Feb 7, 2025

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
@m-natarajan m-natarajan added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 7, 2025
Copy link

melvin-bot bot commented Feb 7, 2025

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.

@linhvovan29546
Copy link
Contributor

linhvovan29546 commented Feb 8, 2025

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

@samranahm
Copy link
Contributor

Related to #56560

@melvin-bot melvin-bot bot added the Overdue label Feb 10, 2025
@289Adam289
Copy link
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

@OfstadC
Copy link
Contributor

OfstadC commented Feb 10, 2025

Thanks @289Adam289 !

@luacmartins
Copy link
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.

@luacmartins luacmartins self-assigned this Feb 10, 2025
@shawnborton
Copy link
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.

@289Adam289
Copy link
Contributor

We've added quite a bit of code just to change syntax color to textSupporting. Could you confirm if the decision on supportingText color is intended to be permanent. If so I think there's no point in keeping this logic in the codebase and I will go ahead and remove it. Other wise just changing the color should be enough.
@luacmartins @shawnborton

@shawnborton
Copy link
Contributor

I feel quite strongly that using the gray text was a mistake, so I would love it if we could revert this back to our normal text color. I think we're still waiting for @JmillsExpensify to chime in though.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 17, 2025
Copy link

melvin-bot bot commented Feb 17, 2025

@OfstadC, @luacmartins, @289Adam289 Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 20, 2025
@melvin-bot melvin-bot bot changed the title The type and status portion of the router does not use the correct darker text color [Due for payment 2025-02-27] The type and status portion of the router does not use the correct darker text color Feb 20, 2025
Copy link

melvin-bot bot commented Feb 20, 2025

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 20, 2025
Copy link

melvin-bot bot commented Feb 20, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.1-6 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 2025-02-27. 🎊

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

Copy link

melvin-bot bot commented Feb 20, 2025

@luacmartins @OfstadC @289Adam289 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@ikevin127
Copy link
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 ? 🤔

@luacmartins
Copy link
Contributor

Yea, you should

@ikevin127
Copy link
Contributor

ikevin127 commented Feb 25, 2025

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.

@dylanexpensify dylanexpensify moved this to Hold for Payment in [#whatsnext] #expense Feb 25, 2025
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 26, 2025
Copy link

melvin-bot bot commented Feb 27, 2025

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.

@ikevin127
Copy link
Contributor

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

@luacmartins
Copy link
Contributor

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

@OfstadC
Copy link
Contributor

OfstadC commented Feb 27, 2025

@ikevin127 - Offer sent here

@ikevin127
Copy link
Contributor

@OfstadC Offer accepted, thank you!

@OfstadC
Copy link
Contributor

OfstadC commented Feb 27, 2025

Payment Summary

@OfstadC OfstadC closed this as completed Feb 27, 2025
@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Feb 27, 2025
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
Projects
Status: Done
Development

No branches or pull requests

8 participants