Skip to content

Rebuild the demo as an issue tracker, with an x-ray - #25

Open
dannote wants to merge 10 commits into
masterfrom
demo-tracker
Open

dannote wants to merge 10 commits into
masterfrom
demo-tracker

Conversation

@dannote

@dannote dannote commented Oct 9, 2026

Copy link
Copy Markdown
Member

The demo had become two apps stapled together, a workspace and a gallery of six toy pages, with a generic look. This rebuilds it as one showcase: a small Linear-style issue tracker, where each PhoenixVapor mode is used where it fits, and an x-ray that shows how each part of a page renders.

The demo

  • Board (hybrid): drag and drop through a server action; filters as Reka menus folded once per value; a live activity rail.
  • Issue page (hybrid): inline editing, status, priority and assignee menus, comments, a branch name with an Elixir counterpart.
  • Issues and My issues (hybrid): grouped by status, sorted with a folded menu, a selection moved at once.
  • New issue (Reactive): refs and computeds in QuickBEAM, value-only updates written straight to the DOM.
  • ⌘K palette (hybrid): a LiveView of its own from the root layout; Reka's Dialog folds open and closed.
  • Sidebar (~VUE) and activity rail (server-only .vue).
  • X-ray (press X): outlines each region by how it renders, with a legend; a click shows the region's source.
  • Dark and light themes, Geist, "Reset demo". Full runtime mode is no longer in the demo; the library's own tests cover it.

Library fixes the demo found

  • Unique ids across folded components: each fold rendered in an app of its own, so two Reka menus repeated reka-dropdown-menu-trigger-v-0. Each render now gets a numbered idPrefix.
  • Direct DOM patching after a block: in Reactive mode, a value after a v-if in the same parent was written into the wrong element. data-vapor-keys now marks blocks false; a slot after the last block is found from the end, and one between two blocks is left to LiveView.

Both have tests and CHANGELOG entries under Unreleased.

Tests

The demo's browser tests are rewritten for the tracker: the board's drag and filters, the issue page, the list's bulk move, the reactive form and its direct patches, the palette, the x-ray, the client-state reports, and a PhoenixReplay session of the board checked in the player's frames.

  • Root: mix lint, mix test --include e2e (410 passed).
  • Demo: mix lint, mix test (16 passed, stable across repeated runs).

npm.lock only drops es-toolkit; mix npm.install would also have bumped Playwright, so the entry was removed by hand and --frozen accepts the result.

dannote added 10 commits October 9, 2026 11:30
Each fold renders in a Vue app of its own, whose useId() starts at v-0, so
two folded menus on a page both had reka-dropdown-menu-trigger-v-0. Each
render now gets an idPrefix numbered within the compile.
Replaces the workspace and the modes gallery with a small Linear-style
tracker in memory: a ~VUE sidebar, a hybrid board with folded filter menus
and drag and drop through a server action, a hybrid issue page with folded
property menus and comments, and a server-only activity rail. Press X for
the x-ray, which outlines each region by how it renders.
The patcher locates slots by parsing the statics with markers, where a
v-if branch or a component is only its marker's text but renders elements.
A slot after one in the same parent was written to the wrong element. The
render now keys blocks false in data-vapor-keys, and the patcher skips the
slots that follow a block in its parent.
The list groups a team's issues, or the person's, by status, sorts them
with a folded menu and moves a selection through one server action. New
issue is Reactive mode: its refs and computeds run in QuickBEAM, and
creating the issue is the LiveView's own Elixir clause.
The layout renders it once and it lives on across navigation. Reka's Dialog
folds open and closed, the filtering runs in the browser, and an Elixir
counterpart lists the commands for the server's render.
While the x-ray is on, a legend names the four ways a region renders, and
a click on a region shows its file, served from the demo's own sources
read while compiling.
A block shifts the siblings that follow it, but not how many follow: a slot
after the last block in its parent is addressed by its index from the end,
so it's still written straight to the DOM. Only a slot between two blocks
is left to LiveView.
- Tests drive the board's drag and filters, the issue page, the list's bulk
  move, the reactive form and its direct DOM patches, the palette, the
  x-ray, and a PhoenixReplay session of the board.
- The palette renders from the root layout, once: in the app layout it was
  re-sent with every update, so no update was value-only.
- Activity ids count up, as random ones could repeat a seeded id.
- The tests use the system's fonts, so a page's load doesn't wait on Google.
- The Button macro styles the tracker's buttons; es-toolkit is gone.
As PhoenixReplay's example app does: VaporDemoWeb.Theme reads the theme
cookie into the session and a @theme assign, the root layout renders it on
<html>, and the dashboard's frame_layout is that root layout, so the replay
renders it again at each moment. The theme was only in localStorage, which a
recording never sees. The replay test switches it mid-session.
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