Skip to content

feat: re-land compact (reading) view for TestMeta block on master#69

Merged
DavertMik merged 2 commits into
masterfrom
feat/testmeta-compact-on-master
Jun 13, 2026
Merged

feat: re-land compact (reading) view for TestMeta block on master#69
DavertMik merged 2 commits into
masterfrom
feat/testmeta-compact-on-master

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

Summary

Re-lands the compact (reading) view for the TestMeta block on top of master.

The original change (#68) was accidentally merged into the feat/block-test-meta branch, which has since diverged from master. Because the npm releases are built from master, the published packages (0.4.69, 0.4.70) shipped the TestMeta block without the compact view. This PR cherry-picks the two compact-view commits onto current master so the next publish includes it.

Cherry-picked commits (originally from #68):

  • c962498 — feat: compact (reading) view for TestMeta block
  • afc8881 — fix: omit keys without values from TestMeta compact summary

Behaviour (unchanged from #68)

  • A populated TestMeta block defaults to a collapsed one-liner summary built only from fields that have a value, with an expand/collapse chevron pinned to the far right.
  • A block with no readable fields starts expanded so it's immediately editable.
  • The summary ellipsizes on overflow (title shows the full text on hover).
  • expanded is UI-only local state — markdown serialization is untouched, so <!-- test … --> round-tripping is unchanged.

Testing

  • tsc -b — clean
  • npm run test:run175 passed
  • npm run build:package — succeeds; built package/editor/blocks/testMeta.js and package/styles.css both contain the compact code.

🤖 Generated with Claude Code

DavertMik and others added 2 commits June 13, 2026 11:44
Render the test/suite metadata block as a single truncated one-liner by
default (e.g. `priority: high · tags: smoke, login`), with an expand/collapse
chevron pinned to the far right. Expanding reveals the full editable key/value
rows and the add-field button; collapsing returns to the summary line.

- A block with no readable fields starts expanded so it is immediately editable.
- Clicking the one-liner (or the chevron) expands it; the summary ellipsizes
  when it overflows the header.
- `expanded` is UI-only local state — the markdown serialization is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The collapsed one-liner now lists only fields that have a value; keys with
empty values are an editing-only concern and are shown only in the expanded
rows. A block with no valued fields starts expanded so the summary is never
misleadingly empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying blocks with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4d64710
Status: ✅  Deploy successful!
Preview URL: https://67ebcca6.blocks-cno.pages.dev
Branch Preview URL: https://feat-testmeta-compact-on-mas.blocks-cno.pages.dev

View logs

@DavertMik DavertMik merged commit dad46ab into master Jun 13, 2026
3 checks passed
@DavertMik DavertMik deleted the feat/testmeta-compact-on-master branch June 13, 2026 09:09
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