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

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

Open
1 of 8 tasks
m-natarajan opened this issue Feb 7, 2025 · 9 comments
Open
1 of 8 tasks
Assignees
Labels
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 [email protected] 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: @289Adam289
@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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
Status: No status
Development

No branches or pull requests

7 participants