WARNING
Depends on #1646 (and the PRs below it), still open. Until they merge, this diff also shows their changes; this pull request's own changes.
Summary
The API docs listed the two headlines endpoints with no summary, and the hot topics as an array of empty objects. This documents both, as the first of small follow-ups filling the gaps of the reference group by group.
Changes
- Summaries.
HeadlineController::indexand::showget docblocks, which become their summaries in the spec and the docs. - The hot topics' fields.
indexbuilds its JSON by hand, so Scramble couldn't see what it holds. An@responsetag now gives the shapeHotTopicsQuery::get()already declares: anid, anameand asummarythat may be null. The controller still returns itsJsonResponseas before: nothing changes in what the API answers. - Spec.
resources/api/openapi.jsonis generated again; only the two headlines operations change. A test checks both summaries and the fields of a hot topic.
Validation
| Check | Result |
|---|---|
pest --parallel --coverage --exactly=100.0 (full suite) | 6661 passed, 100.0% |
pest --type-coverage --min=100 | 100.0% |
pint --test, rector --dry-run, phpstan | clean |
scramble:export | same spec as committed |
Visual evidence
Playwright (Chromium) against a local dev server, GET /headlines opened with its fields unfolded. Before is #1646, after is this branch.
| Before, 1440 light | After, 1440 light | After, 1440 dark |
|---|---|---|
| Before, 390 light | After, 390 light |
|---|---|
Device verification
Emulation only (390×844, DPR 2, touch): no hardware or simulator. No interaction changes.
Independent review
A fresh read-only reviewer, given the guidelines, the diff, the validation results and the captures, checked the summaries against HotTopicsQuery, HeadlinePageQuery and HeadlineCommitsQuery, and the @response shape against what the query returns. On base 3c4a4838 (#1646), head f88fd6a2: CODE: PASS, VISUAL: PASS, no blocker or should-fix. Its one nit is applied in 1bdbd65a: a headline's page now also says its recap shows only while it's safe to, like the hot topics.
Limitations
None.
Activity
7This pull request is a draft
Merging is unavailable until it is marked ready for review.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share