Data source settings: toggle labels are not visible in dark mode
Version Information
3.21.72-beta (latest main)
Environment
Local setup / MacOS
What is the expected behaviour?
Toggle labels in data source settings (for example "Retry on network errors" on the REST API data source) should be readable in dark mode.
What is the current behaviour?
In dark mode the toggle's label text is not visible. Only the grey subtext below it shows, so the setting appears to have no label.
How to reproduce the issue?
- Switch ToolJet to dark mode
- Open a REST API data source
- Look at Retry on network errors under General settings
Screenshots or Screencast
Screenshot to follow in a comment.
Please provide any traces or logs that could help here.
N/A
Any possible solutions?
.tj-toggle-text in frontend/src/_ui/Toggle/Toggle.scss has no colour of its own, so it inherits a dark colour. Setting it to the theme token var(--text-default) makes it follow light and dark mode. The subtext already has its own colour, which is why it stays visible.
Can you identify the location in the driver source code where the problem exists?
frontend/src/_ui/Toggle/Toggle.scss (.tj-toggle-text). The component is shared by the toggles in data source settings (REST API, gRPC, Redis, MinIO, Mailgun, Elasticsearch and the OAuth section), so all of them are affected.
If the bug is confirmed, would you be willing to submit a PR?
Yes, I'll open a PR with the fix.
cc @johnsoncherian @adishM98 @gsmithun4 @kavinvenkatachalam
Source: ToolJet/ToolJet