Skip to content

docs(demo): light and dark screenshots of the ECharts showcase app - #232

Merged
eizedev merged 2 commits into
mainfrom
docs/echarts-demo-screenshots
Nov 25, 2026
Merged

eizedev merged 2 commits into
mainfrom
docs/echarts-demo-screenshots

Conversation

@eizedev

@eizedev eizedev commented Nov 25, 2026

Copy link
Copy Markdown
Owner

docs/demo.md showed three single screenshots of the ECharts showcase app. They are now light/dark pairs, so the screenshot test no longer needs exceptions.

What changes

  • Six screenshots in assets/: Ticket report, Data platform and Managed services (service review), each in light and dark. I took them from New-UDEChartShowcase on a PowerShell Universal instance, with the app's own theme switch. Each shot ends just below a card, so no chart is cut. Both images of a pair show the same numbers and have the same size.
  • docs/demo.md shows each pair with #only-light / #only-dark and alt text per theme.
  • docs/site/screenshots.mjs takes these shots when PSU_ECHARTS_DEMO_URL points at the app. It works like PSU_PIVOT_DEMO_URL: a fixed 1440 px window, the theme set through the app bar's switch, the pointer moved off the charts, no alert or snackbar. Before it saves a shot, it waits until two shots in a row are identical. ECharts animates on a canvas, which animations: "disabled" does not stop. With neither variable set, it takes the site shots as before.
  • tests/js/screenshots.test.js: SINGLES is empty. The mechanism stays for a future exception that has a reason and an issue.
  • tests/browser/echarts-page.mjs: the wait for a page's charts, which psu.spec.mjs had inline. The spec and the screenshot script now share it.
  • docs/development/index.md names the command for the new pairs.

Checks

  • npm test: 219 pass, 0 fail, 0 skipped.
  • npm run lint: 0 errors, 9 warnings (the same react-hooks warnings as on main, none in the changed files).
  • npm run growth: all ok.
  • Build-Site.ps1, then zensical build --strict --clean with the pinned design and Zensical version: "No issues found". node build/check-readme-links.js site: 56 links checked.
  • On the built demo/ page at 1280 px and 390 px, in light and dark: exactly the three images of the active theme are visible, with no horizontal scroll.
  • I opened all six images. Each pair has the same content, nothing is cut, and no toast or tooltip is visible.
  • After the review fixes, I ran the script again. All six files came out byte-identical to the committed ones.
  • psu.spec.mjs against the showcase app in Chromium, with the shared helper: 16 passed.

Not changed

The ticket report's line chart draws its two "Average" labels on top of each other at the right edge. That comes from the showcase app, not from the screenshots. Both themes show it the same way.

Neutral review

A read-only reviewer with a fresh brief checked the first commit in its own worktree. It had no access to the instance. Its run: npm test 213 pass, 6 skipped, 0 fail. Lint and growth matched mine. It planted an unpaired screenshot, and the test caught it. Verdict: acceptable, no blocker.

  1. The overlapping "Average" labels in the ticket report. These are app content; noted above and left for a separate change.
  2. The chart-count wait was copied from psu.spec.mjs. Fixed: tests/browser/echarts-page.mjs.
  3. The clip used the card's box relative to the window, the width appeared twice, and the 8 px margin was unexplained. Fixed: the bottom is measured on the page, the width is one constant, and a comment explains the margin.
  4. Cards are found by a title substring. Accepted: the three titles are unique on their pages, and the images end at the intended cards.
  5. The stillness check could, in theory, pass on two blank shots. Accepted: it starts only after charts exist, and all six images show drawn charts.
  6. The images are 1x, like the old ones. Kept.
  7. With SINGLES empty, the exception path is unused. Kept on purpose, as in pivotkit's test.
  8. The development table row said "but the quick start". Fixed: it names the three pairs.

Closes #213

🤖 Generated with Claude Code

eizedev and others added 2 commits November 25, 2026 22:18
docs/demo.md showed three single screenshots of the ECharts showcase app.
They are now light/dark pairs with #only-light/#only-dark, taken from
New-UDEChartShowcase on a PSU instance. Each shot ends at a card's bottom,
so no chart is cut.

docs/site/screenshots.mjs takes them when PSU_ECHARTS_DEMO_URL is set: the
app's theme switch, a fixed 1440 px window, and two identical shots in a row
before saving, so the charts are drawn and still. The screenshot test no
longer allows singles.

Refs #213

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The showcase spec and the showcase screenshots both waited for a page to
stop adding charts. tests/browser/echarts-page.mjs now holds that wait once.
The screenshot clip counts the card's bottom on the page, not in the window,
and names the window width once. The development table names the three
screenshot pairs.

Refs #213

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eizedev
eizedev merged commit bda8de8 into main Nov 25, 2026
11 checks passed
@eizedev
eizedev deleted the docs/echarts-demo-screenshots branch November 25, 2026 21:27
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.

Docs: current screenshots, hand-over to pivotkit's docs, structure as in pivotkit

1 participant