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

Use configured background color during initialization #154

Conversation

jpovixwm
Copy link
Contributor

When using the dark theme, this will shorten the user's exposition to the eye-blinding white background during startup.
If custom color overrides were set up using a prior version of TrguiNG, the user will need to re-apply their custom colors, because otherwise the computed property will not be present. I don't think it's worth it to try and handle this edge case, so I left it as is.
image

src/index.tsx Outdated
Comment on lines 107 to 111
display: "flex",
justifyContent: "center",
alignItems: "center",
width: "100%",
height: "100%",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to loader.css.
Also spinner needs to be a bit brighter in dark theme for contrast.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also spinner needs to be a bit brighter in dark theme for contrast.

So I'd need to move border-color from loader.css into index.ts and apply a brighter color depending on configured theme? Or is there a trick to keep that in the css file and still have it depend on the chosen theme?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move border-color from loader.css into index.ts and apply a brighter color depending on configured theme

Either that or use additional class for dark theme overriding the border-color.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems so obvious now 😂
Anyway, let me know if you want me to change the implementation to use that additional class.

@jpovixwm jpovixwm force-pushed the feature/use-configured-backround-color-during-init branch from 165f5d4 to d777a43 Compare January 25, 2024 22:29
@jpovixwm jpovixwm force-pushed the feature/use-configured-backround-color-during-init branch from d777a43 to 0312d7f Compare January 25, 2024 22:32
@qu1ck qu1ck merged commit 40611b5 into openscopeproject:master Jan 26, 2024
3 checks passed
@qu1ck
Copy link
Member

qu1ck commented Jan 26, 2024

Current implementation is fine, thanks.
Mantine moved away from emotion-like styling and when TrguiNG updates to mantine v7 styling needs to be reworked all over and this will likely be updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants