Repository navigation
feat: draw every widget through layout blocks, with transitions and temporary output - #52
Merged
Merged
Conversation
…efore A clock's overlay now redraws on the clock's schedule like its layout, so a field that reads its text shows the current time.
… pixel tests A block's hover now reads its pointer state through one guarded property so a test can pin it.
9 tasks
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Fixes #16.
Widgets were drawn two ways. Built-in types went through a switch and
label(). Widgets with alayout, overlays and popups went through blocks. A widget's text was also worked out in three places. So transitions, temporary output and block options such asscrollSpeedwould each have needed building twice, and changed text or a widget that hides snapped into place.Changes
WidgetLabel.swift). It holds the text, icon and fields each widget shows. The bar, the More widgets menu and Diagnostics all read it, and clock layouts get the time.refactorcommits, aperfand twotestcommits.transition:fade,roll,numericornone. Customize's widget editor has a Transition picker.transitionfades or rolls in and out when its output'shiddenchanges, and its neighbours slide into place."temporary": { "fields": {…}, "duration": … }shows fields over the output's own for a set time. Sending the same temporary again after it ran out shows it again. The modular example's volume widget uses it.layout, built-in widgets can now use block options, such as an app name that scrolls withscrollSpeed.Testing
Suite:
swift testpasses 205 tests at the branch tip, 30 of them new. Every commit builds with its tests and passes the suite.Pixel tests: default layouts match the reference drawing at 1/255 for text, clock, script, provider and active-app widgets. That includes graphs and icon-only widgets, in every hover and open pair. GitHub's runners may antialias differently; the first CI run shows whether the tolerance holds there.
In a running bar, with a scratch configuration:
A recording follows in a comment.
Not checked:
Merging
A merge commit, so each commit reaches the changelog: four
featand oneperf.The pull request for #17 builds on this branch.
Claude Opus 5.5 via Claude Code