Skip to content

Greenfield UI + motion redesign - #75

Open
kvn8888 wants to merge 10 commits into
mainfrom
design/motion-redesign
Open

kvn8888 wants to merge 10 commits into
mainfrom
design/motion-redesign

Conversation

@kvn8888

@kvn8888 kvn8888 commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #70

Readers get a consistent paper-and-sticker interface across the shelf, books, audio and clubs. The Django templates now share locally bundled Motion interactions, keyboard-friendly menus, responsive filters, a chapter sheet and listening controls. Forms, URLs, permissions, CSRF checks and saved reading/listening positions are preserved.

This branch includes main through 0ce080e: My Library, private PDF/MP3 uploads, community submission review, 10 MB songs, quizzes, comment translation, back-to-top and pronunciation button changes all remain available. The conflicts with main are resolved in local merge a3dfaeb, now included in this PR.

Changes for review

  • Shelf cards have menus for opening an item, related filters and copying its link. Format options share a moving highlight. Cards reveal as they enter view.
  • The account menu, chapter sheet, bookmarks, club membership and comments have shared feedback and focus behavior.
  • The custom audio deck controls the existing native audio element. Only the deck is shown normally; keyboard focus reveals native controls. JavaScript failure or an audio error leaves native playback available. Volume, seeking, saved positions and no autoplay are retained.
  • The recovery fix in ea912a5 repositions menus after the button press and card hover animations settle. Previously the menu retained a measurement taken while the button was moving. Menus also stay within the viewport at 320 px.
  • Reduced motion removes movement and blur. Native forms, popovers and audio continue to work without JavaScript. Motion 14.5.0 is bundled locally with its license and provenance; no runtime CDN is used.

Consolidation with #74

The branch replaces #74's additive ui-polish.css/ui-motion.js layer and its second Motion copy with the redesign's single layer. Loading both would animate the same controls twice. #74's browser rehearsal is retained and passes against the redesign, now with menu-position regression checks. Kevin's acceptance of this consolidation remains tracked in #76; #74 is not declared complete by this PR.

Verification

Executed locally in Chrome 156.0.8078.80 against isolated SQLite databases:

  • 117 Django tests passed; check, migration dry run, fresh migrations through catalog 0003, demo seed/verification and JavaScript syntax checks passed.
  • Static collection passed in debug and production manifest modes; 462 files were post-processed in the latter.
  • tests/browser_demo.py passed: filtering, sign-in, bookmarks, 12-second audio resume, no autoplay, club membership/comments, CSRF/permission checks, privacy and staff report review. errors: [], failed_assets: [].
  • scripts.check_motion_browser passed at 1440/390/320 px, including mouse/keyboard menu positioning, scrolling, Escape/focus return, reduced motion, missing Motion and no JavaScript. No remote runtime requests.
  • Large-song, learning and comment-translation browser checks passed. The uploads browser check passed when rerun alone, including PDF page saving, MP3 resume, staff review and withdrawal.
  • 41/41 saved interaction checks and 37/37 player/upload-layout checks passed.
  • Nine runtime audit scenarios reported 0 ms forced layout in Chrome Long Animation Frames. Long frames still occurred; this does not establish consistently smooth rendering or replace a human review.

One inconsistent check remains disclosed: the initial grouped upload rehearsal failed immediately after reload because #player was absent when its predicate ran. It passed unchanged when rerun alone. No upload source or assertion was changed, so that failure is not claimed fixed.

Evidence and remaining review

Detailed review and exact limitations, fresh screenshots and demo evidence, and the original before/, after/ and after-no-js/ screenshots are on the branch.

Human spring/feel review, Safari/Firefox, physical mobile, VoiceOver and MotionScore remain in #76. Cross-document view transitions were removed after intermittent Chrome errors.

This recovery did not merge the PR, inspect/change production data, run production migrations or deploy. Before deploying the merged version, verify the production schema and apply catalog 0002/0003 if pending. Kevin remains the PR reviewer. GitHub reports no code conflicts and passing CI, but the overall merge state remains BLOCKED. Main has an active repository ruleset named "PROTECT MAIN AT ALL COST!!!" with an update restriction. Anthony, as repository owner, must handle that merge restriction before a merge can complete. No repository rules were changed by this recovery.

AI contributions: the redesign and integration merge were authored with Claude; the recovery, menu fix and regression check were completed with Codex. Human contributions from main remain in the branch history.

kvn8888 and others added 6 commits November 7, 2026 21:26
Self-contained UMD build (window.Motion) from the npm tarball, with its MIT
license and a provenance record (version, shasums). No runtime CDN.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps the palette, Trebuchet/Georgia type and copy tone; warms the ground to paper.
Every URL, form action/method, field name and csrf_token is unchanged.

- Shelf: segmented Format radios, styled selects, clear-filters link; cards rest at
  a slight tilt and straighten on hover; title link covers the card; per-card
  popover menu (native [popover], works without JS).
- Header: account popover menu (Log out inside), anonymous Log in / Join us.
- Media pages: travelling cover, sticky reader bar with Chapters sheet and reading
  progress, bookmark ribbon, listening deck markup over the native <audio>.
- Clubs: sticker cards, matching hero colours, member stamp, compose-first thread,
  spoilers that un-blur on open.
- Page-load blur reveal in CSS; cross-document view transitions for the shared
  cover/club; reduced motion removes all transforms and blur.
- catalog/templatetags/nextchapter_ui.py: stable cover/club colours by pk.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… deck

ui.js: three shared springs, blur-in toasts that leave the way they came,
popovers anchored to and grown from their trigger (interruptible, Esc/outside
via native popover), a single travelling highlight in nav and menus, a sliding
Format thumb, press feedback via Motion press(), shelf cards dealt in on
scroll, view-transition naming of the one shared element, and pending/arrival
feedback for join, leave and comment posts.

reader.js: TOC sheet with staggered rows, current-chapter label, scroll-linked
progress, bookmarks saved in place via the existing JSON response (native post
as fallback).

audio-deck.js: play/pause morph, scrub, skip, saved-position tick; the native
<audio> stays visible and authoritative. player.js only gains a
progress-saved event; resume and save logic are unchanged.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rsal

Cross-document view transitions aborted intermittently in Chrome 156 and the
aborted transition surfaced as an unhandled page error that no page script can
catch, so the shared-cover transition is removed (CSS @view-transition rule and
the pageswap/pagereveal naming). In-page travelling objects remain.

Also: club cards tilt half as much (large tilted text rasterised unevenly), the
mobile media cover keeps its format glyph, the phone filter grid puts Language
and Level side by side.

tests/browser_demo.py, deliberately updated, same intent:
- Format is now a radio group: check the option instead of select_option.
- The table of contents is a sheet: open Chapters before asserting it is visible.
- Bookmarks save in place: wait for 'Saved here' before reloading.
- Log out lives in the account menu: open it first.
- Scope audio locators to audio#player. The word-help practice panel (already
  on main) adds two more <audio> elements, which broke the strict locator.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n audit

- Shelf deal-in and the initial chapter label take positions from an
  IntersectionObserver's first report instead of measuring at start-up
  (was 55 ms and 25 ms of forced layout on load).
- Format thumb measures in a ResizeObserver (after layout), reads before writes.
- Listening deck writes only a transform per frame; time text and slider value
  change once a second (164 -> 56 layouts in 2.5 s; the rest is the native player).
- Blur budget: large containers (book, shelf, discussion) reveal without blur;
  dealt cards blur 6px, at most four at once.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Before/after at 1440 and 390 px, a no-JavaScript set, and mid-animation
interaction frames, with the runtime motion audit results and known limits.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kvn8888 and others added 4 commits November 8, 2026 00:04
Keeps every feature main gained in the redesigned templates: book quiz link and
section, comment translation (include, CSS, JS), editorial song-context and
Transcript headings, the Songs & audiobooks shortcut (now a sixth Format chip),
back-to-top, and the new audio pack.

Supersedes the additive #74 polish layer: ui-polish.css, ui-motion.js and a
second vendored Motion (14.10.1) restyled the old markup in another direction and
animated the same elements, so they are removed; one Motion copy (14.5.0) and one
layer remain. ui.js sets data-ui-motion, which #74's check reads.
SOURCE_VERIFICATION.md records 14.5.0.

Fixes found while verifying the merge:
- Deck saved-position tick could widen the page at 320px (live since 66602a3);
  the meter now clips horizontally.
- Six Format options: own full-width row on desktop, wrap on phones.
- Toasts sit above the back-to-top button on phones.
- A block holding the #target paragraph skips its entrance, so linked reading
  positions never shift.

Tests changed deliberately, same intent:
- catalog/tests.py: the audio shortcut preselects the checked radio (was option).
- scripts/check_motion_browser.py: hover lift via translate, Format radio,
  new query order.
- tests/browser_demo.py: main's new song wording and Transcript heading.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its ResizeObserver's first report (after layout) now runs the initial check, so
shelf load has no forced reflow (the runtime motion audit saw 42 ms).

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e redesign

Conflicts, resolved in the redesigned templates with all of Anthony's additions:
- base.html: uploads.css link and the My Library nav link (uploads namespace
  aria-current); #74's ui-polish.css stays out.
- catalog.html: community-shelf empty state and the community_shelf include.

Clash and regression fixes found while checking his UI against ui.js:
- .quiet was dropped in the CSS rewrite, leaving Word help, Translate and
  Withdraw to private as bare browser buttons. Restored.
- audio, #audio-progress and .pagination styles moved to app.css, since upload
  pages load neither reader.css nor clubs.css.
- .media-header is a row only when it has a cover (upload detail has none).
- Community shelf whole-card links are no longer underlined.
- Topbar keeps its account controls right-aligned despite uploads.css's rules
  for the old grid topbar.

Player: with the deck up, the native audio strip is visually hidden so one
player shows. It stays rendered, playing and in the tab order; keyboard focus
reveals it. JS off or an audio error shows the native player. The deck gains
a volume slider, since the native one is no longer on screen.

Refs #70

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clamp menus to narrow viewports and verify mouse, keyboard, scroll and fallback behavior after the main merge. Record current browser and Django evidence for PR #75. Refs #70.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant