feat(bolt): white-core glow pulse for in-flight zap#573
Open
dmnyc wants to merge 1 commit into
Open
Conversation
Ports iOS commit barrydeen#6 from feat/one-tap-zap. Replaces the multi-layer Canvas bolt animation that was smearing the silhouette at scale peaks. New approach: always-white silhouette + three stacked zap-color shadows underneath, driven by a single sin-eased oscillator. Math (period 0.9s): sine ∈ [-1, 1] phase ∈ [0, 1] = (sine + 1) / 2 iconScale = 1.0 + 0.10 * sine (0.90 → 1.10) verticalOffset = -0.5 * sine (±0.5dp centered on baseline) Shadow layers (Canvas strokes — drawn outer → inner so the white core sits on top): outer — radius 8 + 6*phase dp, α = 0.30 + 0.50*phase medium — radius 4 + 3*phase dp, α = 0.55 + 0.45*phase inner — radius 1.5dp constant, α = 0.95 core — solid white silhouette, untinted Vertical motion held to ±0.5dp so the icon doesn't lift off the action-bar baseline and misalign with neighbouring glyphs. The white IS the luminous core; the warm halos do the heat work. LinearEasing on the sineAngle (not FastOutSlowInEasing) — the sine function itself supplies the easing curve. Wrapping with another easing would double-stack and visibly stutter.
This was referenced May 26, 2026
Open
Open
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.
Slim carve-out from #556. Single-file animation rewrite of the action-bar bolt for in-flight zaps. Ports iOS commit #6 from
feat/one-tap-zap.What changes
Replaces the existing alpha+scale
LightningAnimation(tween(600)reverse-repeat) with a sin-eased single-oscillator on a 0.9s period:sine ∈ [-1, 1],phase ∈ [0, 1] = (sine + 1) / 2iconScale = 1.0 + 0.10 * sine(0.90 → 1.10)verticalOffset = -0.5 * sine(±0.5dp, centered on baseline — kept tight so the bolt doesn't lift off the action-bar baseline and misalign with neighbouring glyphs)The silhouette stays solid white; three stacked stroked shadows behind it do the warm-glow work:
1.5dp, constant width, holds the white core's outline4 + 3·phase dp, breathes with the phase8 + 6·phase dp, widest bleed, breathes with the phase, alpha 0.3 → 0.8All three shadows tint with
WispThemeColors.zapColor.Note for reviewer
Main already has
WispThemeColors.zapAnimationColor(added by #558) — a vivid-floored variant ofzapColorspecifically for animations so the burst never reads muddy on light backgrounds. The bolt animation still tints withzapColorin this PR to keep the carve-out faithful to the original commit; we can swap tozapAnimationColorhere in a follow-up if that's preferred.Files
app/src/main/kotlin/com/wisp/app/ui/component/ActionBar.kt(+52 / −35)Test plan
Carve-out context
PRs in the series so far: #570 (wallet setup polish), #571 (wallet dashboard polish), #572 (drop relay-backup status list).