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

[BUG] mgt-react - SearchResults Dark theme missing #3113

Closed
tavikukko opened this issue Mar 1, 2024 · 5 comments · Fixed by #3116
Closed

[BUG] mgt-react - SearchResults Dark theme missing #3113

tavikukko opened this issue Mar 1, 2024 · 5 comments · Fixed by #3116
Assignees
Labels
bug Something isn't working

Comments

@tavikukko
Copy link
Contributor

Describe the bug
mgt-react component SearchResults is missing dark theme

To Reproduce

create new react app and add necessary components and configure auth.
When switching the the dark/light theme, the SearchResults is missing necessary css variables
Expected behavior
Font color in SearchResults is light

Screenshots
Screenshot 2024-03-01 at 17 32 22
Screenshot 2024-03-01 at 17 32 56

@tavikukko tavikukko added bug Something isn't working Needs: Triage 🔍 labels Mar 1, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Graph Toolkit Mar 1, 2024
@sebastienlevert
Copy link
Contributor

sebastienlevert commented Mar 1, 2024

KinG¡ Hello Tomi ;)

What is the version you are using? Our Storybook seems all good so we're confused.

image

https://mgt.dev/?path=/story/components-mgt-search-results-html--search-results

Is this happening just on mgt-react? Can you repro using the React story and using the stackblitz feature? https://mgt.dev/?path=/story/components-mgt-search-results-react--search-results

Thanks!

@tavikukko
Copy link
Contributor Author

tavikukko commented Mar 1, 2024

Hi Seb!
yes, storybooks works, the react component not. I was checking the sourcecode and there is no .theme file at all, like in the other components. I created small app to repro this, I will link it.
and yes, latest version 4.

@tavikukko
Copy link
Contributor Author

Just add your own clientid and toggle the theme
https://github.com/tavikukko/mgt-search-results

@gavinbarron
Copy link
Member

gavinbarron commented Mar 1, 2024

@tavikukko We overhauled theming in v3 to use the fluent web components theming, there not being a .theme file is not necessarily a problem.

The problem here is that the CSS trying to use the --color token is not using the sass variable that also provides the theme based default token.

As to why it's working in Storybook I have no answer, thankfully it's an easy fix.

Edit: also, try setting your body background-color via this CSS rule and then you don't need the event handler background-color: var(--fill-color);

@tavikukko
Copy link
Contributor Author

tavikukko commented Mar 1, 2024

Great! I hope I would have cathed that and contribute!

@gavinbarron gavinbarron self-assigned this Mar 1, 2024
@gavinbarron gavinbarron moved this from Needs Triage 🔍 to In Review 💭 in Graph Toolkit Mar 1, 2024
@github-project-automation github-project-automation bot moved this from In Review 💭 to Done ✔️ in Graph Toolkit Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants