Skip to content

Modernize FOSSE admin screens#149

Merged
kraftbj merged 4 commits into
trunkfrom
fosse-admin-visual-overhaul
May 16, 2026
Merged

Modernize FOSSE admin screens#149
kraftbj merged 4 commits into
trunkfrom
fosse-admin-visual-overhaul

Conversation

@RCowles
Copy link
Copy Markdown
Contributor

@RCowles RCowles commented May 14, 2026

Summary

  • Adds no-build Gutenberg-like primitives for FOSSE admin cards, fields, badges, detail lists, callouts, actions, and wizard surfaces.
  • Modernizes Settings, Status, ActivityPub, Bluesky, and onboarding wizard markup while preserving existing actions, input names, nonces, and fragment targets.
  • Updates PHP/e2e markup contracts and refreshes the wizard screenshot.

Testing

  • composer run-script test-php
  • composer run-script lint-php
  • pnpm test
  • pnpm run lint
  • pnpm run format:check
  • pnpm run test:e2e

Copilot AI review requested due to automatic review settings May 14, 2026 23:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes FOSSE’s WordPress admin UI (Settings, Status, providers, and onboarding wizard) by introducing shared “Gutenberg-like” UI primitives (cards, fields, badges, detail lists, callouts, action bars) and updating markup/tests to match.

Changes:

  • Reworks admin screen markup to use shared card/field/detail-list primitives while preserving existing actions/nonces/targets.
  • Updates onboarding wizard step layouts (including completion messaging/actions) to use consistent card surfaces.
  • Refreshes PHPUnit + Playwright contracts to assert the new classnames/structure and visual/layout invariants.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/php/Admin/Setup_PageTest.php Adds/updates render assertions for guided setup callout, footer wizard link, and new card/field primitives.
tests/php/Admin/Onboarding_WizardTest.php Updates wizard markup expectations (choice cards, detail list summary, completion copy).
tests/php/Admin/Bluesky_ProviderTest.php Updates provider panel/status card expectations to card/detail-list primitives and new token classes.
tests/php/Admin/AP_ProviderTest.php Updates ActivityPub setup/status expectations for field-stack + detail-list markup.
tests/e2e/status-page.spec.ts Adjusts status page polish checks from table-based markup to detail-list markup; adds footer wizard-link placement coverage.
tests/e2e/onboarding-wizard.spec.ts Updates wizard E2E assertions for card primitives and adds layout checks for actions/completion card alignment.
tests/e2e/bluesky-provider.spec.ts Updates setup/status UI expectations for new primitives and adds guided-setup + footer-link checks.
src/Admin/templates/status-page.php Converts Status page shell/summary/actions to admin card primitives and adds footer “Run the wizard” link.
src/Admin/templates/setup-page.php Converts Settings page sections to admin card + field-stack primitives; replaces notice with guided-setup callout; adds footer wizard link.
src/Admin/class-onboarding-wizard.php Refactors wizard steps to shared card header/body/footer structure; updates destination/appearance/content/bluesky/complete markup and completion messaging.
src/Admin/class-bluesky-provider.php Converts Bluesky connection actions and status card to admin card + detail-list primitives; updates domain-handle panel styling hooks.
src/Admin/class-ap-provider.php Converts ActivityPub setup/connection/status rendering to field-stack + detail-list primitives and adds connection badge.
src/Admin/assets/css/admin.css Introduces shared admin-shell/card/field/detail-list/callout/action-bar styles and updates wizard styles to match new surfaces.

Comment thread tests/php/Admin/Setup_PageTest.php
Comment thread src/Admin/class-bluesky-provider.php Outdated
@RCowles RCowles force-pushed the fosse-admin-visual-overhaul branch from a6e0b09 to 918add1 Compare May 14, 2026 23:43
@RCowles RCowles force-pushed the fosse-admin-visual-overhaul branch from 918add1 to 888a265 Compare May 14, 2026 23:59
@RCowles RCowles requested a review from kraftbj May 15, 2026 00:07
kraftbj added 2 commits May 15, 2026 21:10
Remove three blocks of legacy CSS that no longer have any PHP emissions
after the admin modernization: the duplicate token rule superseded by the
new var-driven primitives block, the `.fosse-summary` table rules replaced
by `.fosse-detail-list`, and the legacy choice/radio classes replaced by
`.fosse-choice-card` / `.fosse-checkbox-grid`.

Rename the Advanced ActivityPub settings link from
`fosse-settings-secondary-link` (no matching rule) to the
`fosse-admin-page__secondary-link` primitive so it picks up the muted
underline treatment used elsewhere.

Tighten unit and e2e contracts around the new primitives:
PHP tests assert `fosse-status-badge` variants on the AP and Bluesky
panels, the new `fosse-choice-card` / `fosse-post-type-item` markup on
the wizard content step, the `fosse-domain-handle-panel fosse-callout`
shape on the eligible Bluesky path, and the `fosse-wizard__form` class
on step forms. Hoist `resetWizardIfComplete` into the shared e2e helper,
drop the design-token color pin on the connection callout border, add a
`CompletionMetrics` type alias for the geometry block, and pin the
wizard-link placement check to a 1280x720 viewport.
CI fixes on commit 23d6c71:

- Remove the `fosse-wizard__form` assertion from the bluesky-step test
  (Onboarding_WizardTest::test_render_bluesky_step_disconnected_shows_connect_form):
  the bluesky step's form uses `class="fosse-bluesky-form"`, not
  `fosse-wizard__form`. The assertion was added based on an incorrect
  claim during code review that the class appears on every step form;
  it actually appears only on the destinations, appearance, and content
  steps. The bluesky-form class is already asserted at the same site.

- Inline `page.goto(...)` and the `resetWizardIfComplete` arrow signature
  in test-helpers.ts to satisfy prettier (the eslint job rejected
  multi-line wrapping for a single short string argument and a single
  parameter).

Code review follow-ups (admin.css, test-helpers.ts, onboarding-wizard.spec.ts):

- Delete dead `.fosse-status-card__table` block and its responsive
  override: the AP and Bluesky status displays were migrated to
  `<dl class="fosse-detail-list">` and no PHP still emits the old
  selectors. Same shape as the earlier cleanup commit; this catches
  what that pass missed.
- Delete `.fosse-wizard__completion-footer { display: block; }` — the
  rule is a no-op on a `<div>`.
- Drop the silently-overridden `.fosse-domain-handle-panel` base rule:
  every declaration is overridden later in the cascade by
  `.fosse-callout`, which the same elements always carry. The blue-tint
  background never rendered. The `h4` / `p` / `form` sub-element rules
  are preserved because no `.fosse-callout` descendant rules cover them.
- Add a JSDoc block and explicit `: Promise<void>` return type to the
  `resetWizardIfComplete` e2e helper, matching the style of the adjacent
  `resetBlueskyState`. The previous signature left the precondition
  (page must already hold an authenticated wp-admin session) invisible
  to callers.
- Replace the `if ( await reset.count() )` check inside the helper with
  a `waitFor( { state: 'attached', timeout: 2000 } )` based
  stabilization. Playwright's auto-wait does not apply to raw `count()`,
  so the previous shape sampled a single instant after `goto` resolved.
- Extend the existing "Skip setup marks wizard complete and goes to
  Setup page" e2e test to assert the post-completion Settings page
  hides `.fosse-guided-setup` and still exposes the footer wizard link.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comment thread src/Admin/assets/css/admin.css
…lied

Status card headers carry both the legacy `fosse-status-card__header`
class (`margin-bottom: 18px`) and the new `fosse-card-header` primitive
(which adds its own `border-bottom` separator). The additive 18px gap
sits between the new border separator and the card body, producing an
extra slug of whitespace where the parallel settings-panel header lays
flush.

Mirror the fix already in place for settings-panel headers a few rules
above by resetting the legacy margin when both classes are present.
@kraftbj kraftbj merged commit 94bb8fc into trunk May 16, 2026
13 checks passed
@kraftbj kraftbj deleted the fosse-admin-visual-overhaul branch May 16, 2026 03:02
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.

3 participants