markwalet / markwalet/nova-modal-response

v2: docs + release (README rewrite, CHANGELOG 2.0.0, dist rebuild)

Open
#31 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
PHP
Stars
17
Forks
9
PR merge metrics
No merged PRs in 30d

Description

## Parent

#21

## What to build

Wrap up v2.0 for release.

- **README rewrite.** Replace the Usage section against the new shape. Document every public block factory and its fluent options: `Block::text`, `Block::heading` (+ `->small()`/`->medium()`/`->large()`), `Block::code` (+ `->language()`, `->withoutHighlighting()`), `Block::json` (+ `->withoutHighlighting()`), `Block::html`, `Block::badge` (+ five variant methods), `Block::divider`, `Block::list` (+ `->ordered()`). Update the `Action::modal('modal-response', [...])` example to the new wire shape, with a prominent note that the v1 shape no longer works. Document that `html` block content is not sanitized (matches v1 behavior).
- **CHANGELOG 2.0.0 entry.** Lead with the breaking change: the wire format is incompatible with v1; any direct `Action::modal('modal-response', [...])` callers must migrate. Note that the four legacy PHP factories (`ModalResponse::text/code/json/html`) and the modal-level `withoutSyntaxHighlighting()` keep working unchanged on the public PHP surface. List the new block menu and the new `ModalResponse::stack()` entry point. Link to ADR-0001.
- **dist rebuild.** Run `npm run dev` (or `npm run prod`, whichever the package's convention is — check `webpack.mix.js` and `package.json`). Commit the regenerated `dist/` assets so downstream consumers do not have to build them.
- **Screenshot.** If a multi-block modal makes a richer README hero image than the current `readme-heading.png`, replace it. Otherwise leave it.
- **Verification.** Run the full checklist from the PRD before considering this slice done.

## Acceptance criteria

- [ ] README's Usage section rewritten against the new wire format; every block factory documented with at least one example.
- [ ] README's `Action::modal('modal-response', [...])` example replaced with the new shape and a migration note.
- [ ] README notes that `html` block content is not sanitized.
- [ ] CHANGELOG has a `2.0.0` entry that leads with the breaking change and links to ADR-0001.
- [ ] CHANGELOG documents BC for the four legacy PHP factories and the modal-level `withoutSyntaxHighlighting()`.
- [ ] `dist/` regenerated and committed.
- [ ] `vendor/bin/pint` — clean.
- [ ] `vendor/bin/phpstan analyse` — clean.
- [ ] `vendor/bin/phpunit` — green, including all per-block tests.
- [ ] `npm run dev` — compiles without errors.
- [ ] Workbench manual verification: trigger an action returning a multi-block stack (text + heading + json + code + badge + divider + list); confirm all blocks render top-to-bottom with the expected styling; confirm badge variants render in their expected colours; confirm `ModalResponse::stack([])->title('Empty')` renders chrome only with no JS errors.

## Blocked by

#22, #23, #24, #25, #26, #27, #28, #29, #30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing parent issue #21 and the blocked issues #22–#30, then inspect the README, CHANGELOG, webpack.mix.js, and package.json. Run the package's documented npm build command and the listed PHP checks; done means the v2 documentation and migration notes are complete, dist/ is regenerated, and all verification criteria pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, webpack
Domain
build-system, documentation, release, testing
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.