Skip to content

feat(contribution): a page may show a count in its menu entry (badge) - #1205

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/page-badge-key
Oct 5, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
feat/page-badge-key

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

OpenSpec change page-badge-key (new). Asked by lane L1 for the resident menu's counts (#1203, gap G-05 of the school portals).

A contributed page may declare badge: { collection, label? }. PageMenuKeys now keeps it when collection is one of the same contribution's collections, with label as text of at most 80 characters (the site fills in {count}). Anything else is dropped, so a badge can never count another app's rows. Today the server drops badge whole, so the menu in #1203 shows no counts.

Independent of other PRs. #1203 reads the key.

Verified

  • PHPUnit PageMenuKeysTest::testABadgeNamesACollectionOfTheContribution through the real PortalManifestNormaliser: kept with a label, label too long dropped while the count stays, and four wrong shapes dropped. tests/Unit/Contribution green.
  • phpcs, phpmd, phpstan, psalm clean on the changed file; npm run lint 0 errors, check:specs 0, check:l10n-js 0, openspec validate page-badge-key --strict.
  • composer check:strict once: lint, phpcs, phpmd, psalm and phpstan clean; PHPUnit shows the same 46 inherited errors as development, by name.
  • hydra gates: only the two inherited failures (StoreController routes, AuditTrailService).

Not in this PR

Declaring badge on a portalPage record (register schema); a provider app declares it in its contribution.

🤖 Generated with Claude Code

@rubenvdlinde
rubenvdlinde merged commit 94179b2 into development Oct 5, 2026
38 of 39 checks passed
rubenvdlinde added a commit that referenced this pull request Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/portaliq @ 14e02f1

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
check-manifest ✅
format ✅
check-l10n-js ✅
check-schema-l10n ❌
check-reuse ✅
composer ✅ ✅ 108/108
npm ✅ ✅ 984/984
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ✅
Newman ✅
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-10-05 17:36 UTC

Download the full PDF report from the workflow artifacts.

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