refactor: inline theme styles into renderers#651
Merged
Conversation
ba79944 to
3b57fd7
Compare
Contributor
|
Nice! Hopefully moving the style resolution to a more central location makes #641 easier. I rebased my branch on top of this, and ignoring all the mechanical changes and focusing on just the light/dark change notifications worked! |
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
May 11, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.10.4` → `v0.10.5` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>idursun/jjui (idursun/jjui)</summary> ### [`v0.10.5`](https://github.com/idursun/jjui/releases/tag/v0.10.5) [Compare Source](idursun/jjui@v0.10.4...v0.10.5) This release adds several usability and customisation improvements, including dynamic theme switching, better list and input handling, new UI configuration options, and fixes for a few revision workflow issues. #### New features - Added dynamic light/dark theme switching, with support for terminal theme change notifications and a polling fallback where those notifications are unavailable. [#​641](idursun/jjui#641) - Added `ui.mouse_support = false` to completely disable jjui mouse handling. [#​663](idursun/jjui#663) [#​661](idursun/jjui#661) - Added `ui.set_window_title = false` to disable jjui's custom terminal window title. [#​341](idursun/jjui#341) - Lua/input customisation improvements: - `input({ value = ... })` can now open with a pre-filled value. [#​660](idursun/jjui#660) [#​653](idursun/jjui#653) - `revisions.open_set_bookmark({ value = ... })` can now pre-fill bookmark names. [#​652](idursun/jjui#652) #### Improvements - Added `ctrl+n` / `ctrl+p` as up/down aliases in input-driven lists, so list navigation works without leaving the home row. [#​667](idursun/jjui#667) [#​666](idursun/jjui#666) - Improved the details view styling so explanatory hints remain readable when a file row is selected. - Custom TOML actions can now define their binding inline with the action, instead of requiring a separate `[[bindings]]` entry. ```toml [[actions]] name = "new after" lua = ''' jj("new", "-A", context.change_id(), "--no-edit") revisions.refresh() ''' seq = ["\\", "n", "a"] scope = "revisions" ``` #### Fixes - Fixed Lua scripts that chain built-in actions so each step waits for the previous one to finish before continuing. - Added `@` and `f` bindings in revert mode for jumping to the working copy and ace-jump navigation. [#​662](idursun/jjui#662) - Fixed squash preview refresh when moving to the target revision. [#​658](idursun/jjui#658) - Fixed split hints in details view so they follow checked files instead of the currently hovered unchecked file. [#​659](idursun/jjui#659) - Fixed revision selection after rewrite operations so focus stays on the intended row. #### What's Changed - refactor: inline theme styles into renderers by [@​idursun](https://github.com/idursun) in [#​651](idursun/jjui#651) - Dynamic light/dark switching by [@​zerowidth](https://github.com/zerowidth) in [#​641](idursun/jjui#641) - feat(bookmark): pre-fill bookmark name via open\_set\_bookmark value arg by [@​rdeaton](https://github.com/rdeaton) in [#​652](idursun/jjui#652) - feat(input): allow pre-filled value for input field by [@​baggiiiie](https://github.com/baggiiiie) in [#​660](idursun/jjui#660) - feat(ui): config setting to completely disable mouse support by [@​shoce](https://github.com/shoce) in [#​663](idursun/jjui#663) - feat(ui): add ctrl-n/p list navigation aliases by [@​vvvu](https://github.com/vvvu) in [#​667](idursun/jjui#667) #### New Contributors - [@​rdeaton](https://github.com/rdeaton) made their first contribution in [#​652](idursun/jjui#652) - [@​shoce](https://github.com/shoce) made their first contribution in [#​663](idursun/jjui#663) - [@​vvvu](https://github.com/vvvu) made their first contribution in [#​667](idursun/jjui#667) **Full Changelog**: <idursun/jjui@v0.10.4...v0.10.5> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjkuNCIsInVwZGF0ZWRJblZlciI6IjQzLjE2OS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
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.
We store the resolved styles in the
CurrentPaletteinstance but also models had a reference tostylesinstances during runtime. This PR moves style resolution to ViewRect functions so that we only rely on the palette cache, effectively allowing theme change during runtime just by updating the palette.Prerequisite for #641