feat: add per-widget dim styling, whole widget or parens-only#433
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Preserve parens dim styling when foreground gradients render in both regular and powerline paths. Emit a combined intensity reset when restoring bold after dim so Ink preserves the dim reset in preview output. Reset whole-widget dim before powerline separators and end caps, and render ColorMenu style indicators as one suffix to avoid badge wrapping. Add regression coverage for gradient dim composition, powerline dim boundaries, Ink preview output, and ColorMenu indicator layout.
Owner
|
Made a few tweaks, mostly due to interaction of dim and bold widgets next to each other, preview not resetting bold properly after a dim, issues with separators in powerline mode after a dim, and the UI wrapping the dim indicator to the next line in some instances when bold was also applied. I'll publish it in the next release. |
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.
Closes #438.
Adds a per-widget dim toggle alongside bold. Press (d) in the colors menu to cycle: off → whole widget →
(...)spans only → off. Parens mode dims just the bracketed part of a widget, e.g. the(42%)in Context Bar output, while the rest keeps full intensity.types/Widget.tsdim: z.union([z.boolean(), z.literal('parens')])on widget itemsutils/colors.tsapplyColorsgains a dim arg;applyParensDimwraps(...)spans and re-asserts bold after each span (\x1b[22mclears both intensities)utils/renderer.tscolor-menu/mutations.tscycleWidgetDim; reset / clear-all stripdimColorMenu.tsx[DIM]/[DIM ()]indicator, dim shown in the widget list previewrenderer-dim.test.ts+ mutations testsNotes: