Repository navigation
fix(viewer): keep the dark palette to the viewer's own parts - #125
Merged
Merged
Conversation
It was set on the whole modal and reached into what a handler shows: under a light theme a document in Text came out white on black below its light menu bar, and printed grey. The header, arrows, close button, loading and error states keep it. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #125 +/- ##
==========================================
+ Coverage 91.31% 91.33% +0.01%
==========================================
Files 41 41
Lines 3524 3532 +8
Branches 815 816 +1
==========================================
+ Hits 3218 3226 +8
Misses 287 287
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The viewer app gave a handler asking for the 'default' theme the user's own theme: backdrop and header in the theme's colours, light or dark. The library treated 'default' as dark, so Text opened as a light document in a dark frame under a light theme. Port that back, with the same --background-invert-if-dark check. A handler with no theme stays dark, as every built-in one does. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The viewer set its dark palette (
--color-main-textand friends) on the whole modal, so it reached into what a handler shows. Under a light theme, a document in Text came out white on#171717below Text's light menu bar, and printed in grey: Text's print snapshot test on nextcloud/text#9235 fails on it.The palette now only applies to the viewer's own parts on the dark backdrop: the header, the previous and next arrows, the close button, and the loading and error states. A handler's content keeps the theme's colours, which is what the old viewer did for
theme: 'default'. Pictures and videos look the same.The existing contrast test for the header still passes; a new one checks a handler's element keeps the theme's text colour, and fails on
main. Built into Text locally, a document shows white with#222text under the light theme, below the dark header.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.