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

[files app]: Fix dark color mode detection for filelist #33299

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 20, 2022

The color of the file list entries is dynamically calculated, but clipped to readable values.
This clipping is currently broken when using the system color theme and the system is using a dark color theme.

When system default color theme is selected for theming, the enabledThemes array
is empty or just contains one entry 'default', in this case the color theme has
to be retrieved from the browser to ensure text like the modified date is readable.

Before:
Color theme detection broken

After:
Readable file list as the colortheme detection is fixed

@susnux susnux added bug design Design, UI, UX, etc. 3. to review Waiting for reviews feature: files accessibility and removed design Design, UI, UX, etc. labels Jul 20, 2022
@szaimen szaimen requested review from skjnldsv, a team, PVince81 and szaimen and removed request for a team July 20, 2022 22:55
@szaimen szaimen added this to the Nextcloud 25 milestone Jul 20, 2022
@PVince81 PVince81 requested review from Pytal, artonge and CarlSchwan July 21, 2022 07:37
apps/files/js/filelist.js Outdated Show resolved Hide resolved
@susnux susnux force-pushed the fix/files-dark-color-theme branch from 1bec397 to 7573cf3 Compare July 24, 2022 12:38
@susnux susnux requested a review from Pytal July 24, 2022 12:41
apps/files/js/filelist.js Outdated Show resolved Hide resolved
apps/files/js/filelist.js Outdated Show resolved Hide resolved
When system default color theme is selected for theming, the `enabledThemes` array
is empty or just contains on entry `'default'`, in this case the color theme has
to be retrieved from the browser to ensure text like the modified date is readable.

This fixes #33298

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
@susnux susnux force-pushed the fix/files-dark-color-theme branch from 7573cf3 to e4c825e Compare July 26, 2022 10:19
@susnux susnux requested a review from artonge July 26, 2022 10:20
@artonge
Copy link
Contributor

artonge commented Jul 28, 2022

CI failure unrelated

@artonge artonge merged commit d2d408b into master Jul 28, 2022
@artonge artonge deleted the fix/files-dark-color-theme branch July 28, 2022 09:04
@skjnldsv skjnldsv mentioned this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: files app does not detect dark color mode if using system theming is enabled
4 participants