Skip to content

Design cleanup - #12

Merged
Psybah merged 2 commits into
mainfrom
design-cleanup
Nov 19, 2026
Merged

Psybah merged 2 commits into
mainfrom
design-cleanup

Conversation

@Psybah

@Psybah Psybah commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Live tiles: previews on /components run and respond in place: draw track, hover the folder, scroll the deck. Each tile's name row ("Name · Open →") opens the component page.
  • Tiles keep each component's shape: in place of fixed rows, each component declares a column span and the preview's natural aspect ratio. Tiles without an aspect fill their row.
    • Split Footer: full width at its own height.
    • Icon Folder beside Draw a Line (16:9).
    • Scroll Deck (16:10, a real 1440×900 hero scaled down) beside the Submit tile.
  • Credits: Draw a Line and Scroll Deck credit tekcify.com, in the copied Markdown and as a link under the description on their pages. shared/component-meta.ts gains an optional creditUrl.
  • Share images from screenshots:
    • /components/<slug>?og=1 renders one component on a 1200×630 frame.
    • corepack pnpm og:components (scripts/capture-component-og.ts) photographs each frame with the local Chrome into public/og/components/<slug>.png, and records a hash per picture in shared/component-og.ts.
    • /api/component-image serves the picture when one exists, otherwise the text card. The share-link version includes the hash, so previews refresh when a picture changes.
  • Scaled previews: they can now be interactive and fill their frame at the same time. Scroll Deck no longer blocks page scrolling once its own scroll reaches the end.

How I checked it

  • corepack pnpm typecheck: passes.
  • corepack pnpm lint: 0 errors (the warnings are the existing fast-refresh ones).
  • corepack pnpm test: 757 passed, 62 skipped.
  • New tests:
    • The grid previews are live and each name row links to its page.
    • The tekcify.com credit appears in the Markdown and as a link on the page.
    • The capture frame renders on its own.
    • The image endpoint serves a captured picture, falls back to the text card, and the share-link version changes when a picture exists.

Anything left to check

  • Pictures not captured yet: run corepack pnpm og:components before merging and commit public/og/components/ with shared/component-og.ts; until then every component uses the text card.

  • Not checked in a browser: the new tile shapes and the live previews (drawing, hovering, scrolling) on desktop, tablet and phone.

  • Scroll Deck tile: it takes wheel scrolling while the pointer is over it, and hands back to the page at its ends. Decide whether that's right for the grid.

  • Production file path: on Pxxl, check that one share-image URL returns the picture after deploying. The endpoint reads dist/og/components or public/og/components from the server's working folder.

  • I kept this pull request focused and updated the relevant documentation.

  • I added regression coverage for a bug fix where useful.

  • I kept secrets, private member details and generated files out of the changes.

…andling

- Introduced a new script for capturing Open Graph images of components.
- Updated `component-image.ts` to utilize the new screenshot functionality when available.
- Enhanced `component-seo.ts` to include logic for generating image versions based on component metadata and screenshots.
- Modified `library/registry.tsx` to support new card structure with aspect ratios and Open Graph settings.
- Adjusted `Components.tsx` to handle Open Graph capture requests and improved grid layout for component display.
- Added tests to verify new functionality and ensure proper rendering of components without placeholders.
Copilot AI balanced review requested due to automatic review settings November 19, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Psybah
Psybah merged commit c989d4e into main Nov 19, 2026
2 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.

2 participants