Skip to content

Render 2D scramble previews for all events - #184

Merged
coder13 merged 1 commit into
masterfrom
agent/scramble-previews
Jul 13, 2026
Merged

Render 2D scramble previews for all events#184
coder13 merged 1 commit into
masterfrom
agent/scramble-previews

Conversation

@coder13

@coder13 coder13 commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the 3x3-only SVG preview with lazy-loaded cubing.js 2D visualizations
  • map every configured WCA, variant, and training event to its corresponding puzzle
  • add responsive click-to-enlarge previews that retain the scramble text and close on backdrop click or Escape
  • share the preview behavior across standard and Grand Prix rooms

Why

Let's Cube only rendered a scramble state for 3x3. Larger cubes and side events had no visual preview, and large puzzles need an enlarged view to remain readable on desktop and mobile.

During review, the enlarged canvas was changed to fill the dialog's available content width rather than using viewport width directly, preventing overflow on narrow screens.

Implementation notes

cubing.js is loaded asynchronously so the visualization code is split from the initial client bundle. The preview forces 2D rendering with no controls and shows the final scrambled state. If cubing.js cannot load, the textual scramble remains available.

Validation

  • all 82 client tests pass
  • client lint passes
  • production client build passes
  • git diff --check passes
  • generated scrambles for all 22 configured events parse against their mapped cubing.js puzzles

Replace the 3x3-only SVG preview with lazy-loaded cubing.js visualizations. Add responsive click-to-enlarge dialogs so larger puzzles remain readable while preserving scramble text.
@coder13
coder13 marked this pull request as ready for review July 13, 2026 03:07
@coder13
coder13 merged commit 0d89284 into master Jul 13, 2026
6 checks passed
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