Skip to content

[6.x] About Craft CMS widget and command palette action - #20802

Open
brandonkelly wants to merge 5 commits into
6.xfrom
about-craft
Open

brandonkelly wants to merge 5 commits into
6.xfrom
about-craft

Conversation

@brandonkelly

@brandonkelly brandonkelly commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Description

Adds an “About Craft CMS” dashboard widget and command palette action, which share one view. It replaces the Updates widget.

<AboutCraft info>                    (common/components)
  <CraftCmsMark /> Craft CMS [PRO] 6.x
  <AboutCraftUpdates updates>        only for users who can update Craft
    <AboutCraftRow tone>             “Up to date” + refresh button
                                     “3 updates available” + Go to Updates
  <AboutCraftRow>                    an installed trial + Buy now

<craft:widget-about-craft>           dashboard widget (title is screen-reader only)
<AboutView>                          command palette’s “About Craft CMS” action
 Dashboard widget types
-  Updates
+  About Craft CMS
 Migration
+  Updates widgets → About Craft CMS widgets, in place
+  admins with a saved dashboard get it at the end
  • Checks for updates when they haven’t been fetched lately, keeping the last result on screen while it checks again.
  • With updates available, their section turns blue, and links to the Updates utility instead of offering to check again. If the refresh button had focus, focus moves to the link.
  • Its icons and the Craft Support widget’s share a .cp-item-icon class, which colors them with their card. On white cards, whose loud fill is white, they take the link color.

Evidence

The widget, up to date
Up to date, with a button to check again.
The widget, with 3 updates available
Updates available, linking to the Updates utility.
The widget, with Craft Pro installed as a trial
A trial installed, with a link to buy it.
The command palette’s About Craft CMS view, with updates available and a trial
The command palette’s “About Craft CMS” action.
  • Front-end tests: AboutCraft.test.ts, AboutCraftUpdates.test.ts, AboutView.test.ts.
  • PHP tests: ReplaceUpdatesWidgetWithAboutCraftTest, AboutCraftControllerTest, and updated dashboard and widget tests.
  • composer ci: Pint, Rector and PHPStan pass. Pest passes except two HandleInertiaRequestsTest tests, which fail locally only because a running Vite dev server’s hot file is present.

Related issues

🤖 Generated with Claude Code

The widget and the palette's new action share one view: Craft's version
and edition, any installed trials with a link to buy them, and, for users
who can update Craft, whether updates are available. It checks for
updates when they haven't been fetched lately.

It replaces the Updates widget. A migration turns existing Updates widgets
into it, and adds it to the end of admins' saved dashboards.

Craft Support's icons and the widget's share a .cp-item-icon class, which
colors them with their card, and with the link color on white cards,
whose loud fill is white.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

brandonkelly and others added 2 commits November 17, 2026 08:49
The Yii adapter's craft\widgets\Updates extended the removed Updates
widget, which failed PHPStan. It now extends AboutCraft, which replaced
it, so plugins that refer to it keep working.

AboutCraft::component() returns ?string, like the other widgets, to
match the adapter's BuiltInWidgetTrait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a non-neutral card, the band that highlights available updates takes
the card's quiet fill, text color and loud icon color instead of blue.
The command palette and neutral cards keep the blue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The update check can falsely report “Up to date” when Craftnet is unreachable, leave trial information stale after success, and lose keyboard focus when updates are found.

3 open issues
What changed in this PR

Replaces the Updates widget with a shared “About Craft CMS” view for the dashboard and command palette, bringing together version, edition, trial, and update information.

Changes:

  • Adds shared About components, update checking, and a command palette action.
  • Migrates existing Updates widgets in place and adds About widgets to admins’ saved dashboards when missing.
  • Centralizes trial information, shares icon styling, and updates tests and release notes.
File Description
yii2-adapter/​legacy/​widgets/​Updates.php Redirects the legacy widget to AboutCraft.
tests/​Feature/​Updates/​UpdatesTest.php Checks fetch timestamps through About data.
tests/​Feature/​Http/​Controllers/​Dashboard/​WidgetsControllerTest.php Uses AboutCraft in widget operation tests.
tests/​Feature/​Http/​Controllers/​Dashboard/​DashboardControllerTest.php Updates default widget ordering expectations.
tests/​Feature/​Http/​Controllers/​App/​AboutCraftControllerTest.php Tests About responses and update permissions.
tests/​Feature/​Database/​Migrations/​ReplaceUpdatesWidgetWithAboutCraftTest.php Covers replacement, insertion, and duplicate handling.
tests/​Feature/​Database/​Migrations/​AddColorToWidgetsTest.php Replaces the removed Updates test fixture.
tests/​Feature/​Dashboard/​DashboardTest.php Tests default About widget eligibility and placement.
src/​Twig/​Variables/​Cp.php Delegates trial information to License.
src/​License/​License.php Centralizes trial messages and purchase URLs.
src/​Http/​Controllers/​App/​AboutCraftController.php Serves About information as JSON.
src/​Database/​Migrations/​2026_11_17_000001_replace_updates_widget_with_about_craft.php Migrates saved widgets and adds missing admin widgets.
src/​Database/​Migrations/​0000_00_00_000002_migrate_widget_types.php Preserves legacy mapping for the replacement migration.
src/​Dashboard/​WidgetTypes.php Registers AboutCraft instead of Updates.
src/​Dashboard/​Widgets/​Updates.php Removes the superseded widget class.
src/​Dashboard/​Widgets/​AboutCraft.php Defines the new singleton dashboard widget.
src/​Dashboard/​Dashboard.php Adds AboutCraft last for eligible users.
src/​Cp/​AboutCraft.php Builds shared About data with permission-gated updates.
src/​Cms.php Advances the schema version.
routes/​actions.php Registers the About endpoint.
resources/​translations/​en/​app.php Adds About and update-status strings.
resources/​js/​pages/​Dashboard.vue Adds bottom spacing to the dashboard grid.
resources/​js/​modules/​dashboard/​Updates.vue Removes the superseded widget component.
resources/​js/​modules/​dashboard/​Updates.test.ts Removes tests replaced by shared-component coverage.
resources/​js/​modules/​dashboard/​register.ts Registers the About widget component.
resources/​js/​modules/​dashboard/​craft-support/​Index.vue Adopts shared item-icon coloring.
resources/​js/​modules/​dashboard/​AboutCraft.vue Wraps the shared view in a dashboard card.
resources/​js/​modules/​command-palette/​sources/​on-page-actions.ts Adds the About Craft CMS action.
resources/​js/​modules/​command-palette/​components/​CommandPalette.vue Registers the About palette view.
resources/​js/​modules/​command-palette/​components/​AboutView.vue Loads About details into the palette.
resources/​js/​modules/​command-palette/​components/​AboutView.test.ts Tests immediate identity and fetched trial information.
resources/​js/​common/​components/​CraftCmsMark.vue Adds the decorative Craft CMS mark.
resources/​js/​common/​components/​AboutCraftUpdates.vue Displays update status and handles refreshes.
resources/​js/​common/​components/​AboutCraftUpdates.test.ts Covers update states, announcements, and focus handoff.
resources/​js/​common/​components/​AboutCraftRow.vue Provides shared status-row layout and styling.
resources/​js/​common/​components/​AboutCraft.vue Composes identity, updates, and trial sections.
resources/​js/​common/​components/​AboutCraft.test.ts Tests identity and trial purchase rendering.
resources/​js/​common/​components/​about-craft.ts Defines shared About data types.
resources/​css/​cp.css Adds shared icon colors with a white-card fallback.
CHANGELOG.md Documents the About feature and widget replacement.
CHANGELOG-WIP.md Updates feature notes and legacy replacement guidance.

Review effort: Balanced

…ling

- A response without a fetch date is a failed check: Craft caches a failed
  request for updates as no updates, which showed as “Up to date”. The
  last real result stays, or the row says the updates couldn't be fetched.
- When a check finds updates, focus moves to the anchor inside “Go to
  Updates”. A link-mode craft-button doesn't take focus itself.
- After a successful check, the trials are fetched again. They're only
  known while the license info is cached, which is fetched with the
  updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Rendered accessibility checks for card contrast, palette focus transfer, forced-colors behavior, and 320px reflow remain unverified because browser validation was unavailable.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@brandonkelly
brandonkelly marked this pull request as ready for review November 17, 2026 18:06
@brandonkelly

Copy link
Copy Markdown
Member Author

@gcamacho079 Could you take a look at the accessibility side of this? Here’s what changed, and what I’m least sure about.

Changes

Structure and names

  • The widget’s title, “About Craft CMS”, is visually hidden. It’s still an h2 and the widget’s heading, but sighted users see the Craft mark and “Craft CMS [PRO]” where the title would be.
  • The edition badge is aria-hidden, with a visually hidden “{edition} edition” in its place, so it reads as “Craft CMS Pro edition” instead of an abbreviation. “Craft CMS” is marked lang="en".
  • The Craft mark is a decorative SVG (aria-hidden, focusable="false"), and so are the row icons.
  • Related, already on 6.x (01ed5d1): the command palette no longer lists visually hidden headings, so this widget’s hidden title doesn’t show up as a result that focuses something invisible.

Update status

  • A visually hidden role="status" region announces “Checking for updates…” when a check starts, then the result (“Up to date” / “3 updates available”) or “Unable to fetch updates at this time.” The row itself keeps showing the last result while it checks, so the layout doesn’t jump.
  • If a re-check fails while an earlier result is showing, a role="alert" callout appears above the row.
  • The refresh button is icon-only, labelled “Check for updates”. It uses craft-button’s loading state, which keeps its size and focus and announces “Loading”.
  • When updates are available, the refresh button is removed and “Go to Updates” takes its place. If the refresh button had focus when the check found updates, focus moves to the link’s anchor.

Links

  • “Go to Updates” and “Buy now” are link-style plain buttons with a decorative circle-arrow icon after the text. “Buy now” goes to Craft Console, so it opens in a new tab and gets the usual visually hidden “Opens in a new window” cue.

Color

  • The row icons and the Craft Support widget’s icons now share a .cp-item-icon class, which colors them with the widget’s card color. On white cards they use the link color, since white’s loud fill is white and the icons disappeared. That affected Craft Support before this PR too.
  • On a non-neutral card, the “updates available” band uses the card’s color (quiet fill, its text color, loud icon) instead of blue.

Concerns and what I haven’t verified

  • Contrast: I checked the tinted band and icons on purple, red, gray and white cards in the light theme, but didn’t measure contrast across the whole palette, in the dark theme, or in forced colors.
  • Announcements on load: when the cached update info has expired, the widget checks on its own as the dashboard loads, so “Checking for updates…” and then the result are announced without the user doing anything. Is that too chatty for a status that wasn’t asked for?
  • Hidden title: is relying on the visible “Craft CMS” name, with the real heading visually hidden, OK here?
  • No refresh while updates are available: the only way to check again then is from the Updates utility.
  • Testing: focus handoff and announcements are covered by unit tests, and I confirmed in Chrome that the link’s anchor has to take focus. I haven’t tested with a screen reader or done a full keyboard pass.

@mmikkel

mmikkel commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The widget looks nice, but it would be great if it was room for the Craft edition and version somewhere global (i.e. footer, sidebar) in addition to it.

We've actually hidden the dashboard altogether on something like 99% of all sites we've ever built. Judging from the non-trivial install count for the Dashboard Begone plugin, we're not alone in preferring a no-dashboard experience 😊

@brandonkelly

brandonkelly commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

@mmikkel The command palette action is available globally.

Maybe we could add an info icon to the global header (or reopen #20770 but with just the version + an info icon) which opens a modal window / HUD with the same About component.

@mmikkel

mmikkel commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

reopen #20770 but with just the verssion + an info icon) which opens a modal window / HUD with the same About component.

That sounds like a fantastic solve, IMO!

This branch has not been deployed

No deployments
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