Skip to content

Not fully compatible with the dark mode #59

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

Open
frantz45 opened this issue Nov 4, 2021 · 5 comments
Open

Not fully compatible with the dark mode #59

frantz45 opened this issue Nov 4, 2021 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@frantz45
Copy link
Collaborator

frantz45 commented Nov 4, 2021

Some areas are not compatible with the dark theme:

Wizard Alert Rules main page:
rule

Wizard Lists main page:
list

Text box when creating/editing a rule:
value

Background of rule conditions when creating/editing a THEN/OR/AND rule:
then

@c8y3 c8y3 added the P3 label Sep 5, 2022
@c8y3 c8y3 modified the milestones: 4.3.0, 4.4.0 Sep 5, 2022
@frantz45 frantz45 removed the P3 label Sep 6, 2022
@c8y3 c8y3 modified the milestones: 4.4.0, 4.5.0 Oct 3, 2022
@c8y3 c8y3 self-assigned this Apr 21, 2023
@c8y3
Copy link
Collaborator

c8y3 commented Apr 21, 2023

For the rule list, it seems to be because we hardcoded the text color to be 000 when the rule is valid (see AlertRuleList.jsx, colorValid variable).
Instead, we should probably be changing the className to text-success/text-danger or use bsStyle. See https://getbootstrap.com/docs/3.4/css/#helper-classes-colors and https://getbootstrap.com/docs/3.4/css/#helper-classes-backgrounds

@c8y3
Copy link
Collaborator

c8y3 commented Jun 2, 2023

There also seems to be the possibility to style components (with styled-components) using the them colors as illustrated in graylog code: views/components/widgets/MessageTable.tsx.

@c8y3 c8y3 removed their assignment Jun 2, 2023
@frantz45
Copy link
Collaborator Author

frantz45 commented Sep 1, 2023

I've tested with Wizard v5.1.0 but there are still some issues:

For AND and THEN rules:

image

It's even visible in light mode:

image

It's also the case with an OR rule but with a different color:

image

image

@frantz45 frantz45 assigned c8y3 and unassigned frantz45 Sep 1, 2023
@c8y3
Copy link
Collaborator

c8y3 commented Sep 22, 2023

In the case of the THEN and AND, it's because component <HighlightedDiv> is explicitly written in the code. For the OR, it is a bit more complex, the color is hardcoded: <div style={{ backgroundColor: '#f6f6f6', padding: '10px' }}>.
So, I believe the code was written this way on purpose in order to differentiate the conditions that are linked by the connector AND, THEN, OR from the rest of the configuration.
What would be best to do:

  • keep HiglightedDiv
  • chose another way to highlight (our own custom colors adapted to the dark mode toggle, or some lines around, or something else. Maybe there are other components in Graylog to do just that, if there is some example...)
  • drop the highlighting and just have the same white background

@frantz45
Copy link
Collaborator Author

Fixed in the latest master build (5.1.1). Issue can be closed after the version is officially released

@c8y3 c8y3 removed their assignment Sep 26, 2023
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
None yet
Development

No branches or pull requests

2 participants