Huxpro / Huxpro/BusyWeek

Add the lynx-pretext Dancer effect as an Easter egg

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
12
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## Summary

Port the Dancer effect from [Huxpro/lynx-pretext](https://github.com/Huxpro/lynx-pretext/tree/main/examples/dance) into BusyWeek as a hidden Easter egg.

The effect combines an animated transparent sprite with per-frame exclusion geometry. Text is laid out line by line into the space around the dancer's changing silhouette, so the content appears to flow around a moving person rather than sitting behind a video rectangle.

## Easter-egg behavior

- Keep the trigger undisclosed in the normal UI.
- Suggested trigger: long-press the `好忙啊` subtitle for approximately 1.5 seconds, suppressing the normal header tap only after the long press wins.
- Present one short dancer loop over the timeline.
- During the loop, nearby Todo/intro text reflows around the dancer profile.
- A tap outside or a second trigger dismisses it immediately.
- Finishing or dismissing the effect restores the exact original timeline layout and scroll anchor.
- The Easter egg must not mutate, complete, move, or persist any Todo data.

## Reference technique

The upstream example uses:

- a transparent PNG sprite sheet
- 70 sampled frames, typically played at 12 fps
- a per-frame exclusion profile divided into horizontal bands
- `prepareWithSegments()` and `layoutNextLine()`
- different available intervals on the left and right of the silhouette for each text line

Reference:

- Example: https://github.com/Huxpro/lynx-pretext/tree/main/examples/dance
- README: https://github.com/Huxpro/lynx-pretext/blob/main/examples/dance/README.md
- Implementation: https://github.com/Huxpro/lynx-pretext/blob/main/examples/dance/src/index.tsx

## BusyWeek adaptation

- Render the dancer in a non-interactive overlay inside the timeline viewport.
- Generate a temporary line/exclusion layout from current visible content without changing stored data.
- Prefer reflowing a decorative intro/copy layer first; reflow actual Todo rows only if identity, hit targets, and accessibility remain correct.
- Keep checkbox/delete hit targets outside the animated exclusion layout or disable them for the short duration.
- Pause frame advancement when the app is backgrounded or the overlay is not visible.
- Cache prepared text and exclusion data; do not re-prepare text every frame.

## Asset and performance constraints

- Confirm the license and redistribution status of any upstream dancer sprite before copying it.
- If the existing character assets are unsuitable for redistribution, reproduce the technique with an original BusyWeek mascot/dancer asset.
- Keep the shipped asset size intentional and documented.
- Target sprite updates at the source cadence (for example 12 fps); do not force 60 text-layout recomputations per second.
- Instrument frame time on representative iOS and Web targets before enabling the Easter egg in production.

## Acceptance criteria

- [ ] A hidden, deterministic gesture enters and exits the Easter egg without conflicting with the completed-items header toggle.
- [ ] The dancer animates from a sprite sheet on Web and Lynx native.
- [ ] Visible text flows around the per-frame silhouette instead of a fixed rectangle.
- [ ] No Todo state, ordering, completion, or persistence changes.
- [ ] Dismissal restores the previous layout and scroll position without a flash.
- [ ] The overlay does not permanently block Todo gestures or accessibility.
- [ ] Backgrounding/unmounting stops timers and animation work.
- [ ] Reduced-motion mode uses a still silhouette or a simple non-reflowing appearance.
- [ ] Asset licensing/attribution and bundle-size impact are documented.
- [ ] Tests cover trigger arbitration, teardown, frame selection, exclusion intervals, and state preservation.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the referenced lynx-pretext dance example, especially examples/dance/src/index.tsx and its README, then inspect BusyWeek’s timeline viewport, header subtitle gesture, and completed-items toggle. Define the overlay and temporary exclusion layout around the stated acceptance criteria, including Web and Lynx behavior, teardown, reduced motion, licensing, and state preservation. Add tests for trigger arbitration, frame selection, exclusion intervals, teardown, and unchanged Todo state.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.