Skip to content

templates: move dashboard onboarding into a widget - #19149

Merged
denolfe merged 2 commits into
mainfrom
templates/website-ugly
Oct 28, 2026
Merged

denolfe merged 2 commits into
mainfrom
templates/website-ugly

Conversation

@denolfe

@denolfe denolfe commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Moves the onboarding block in the website and ecommerce templates below the "Welcome" heading on the admin dashboard. The block is now a card that matches the other dashboard widgets.

Template Before After
Website Website dashboard before Website dashboard after
Ecommerce Ecommerce dashboard before Ecommerce dashboard after

Changes

  • Onboarding block is a dashboard widget
    • BeforeDashboard is now the GettingStarted widget in both templates.
    • The beforeDashboard slot always renders above the modular dashboard (the widget grid). CSS cannot place it below the welcome heading.
    • defaultLayout repeats the built-in order with getting-started after welcome.
    • Users can remove the widget from Edit Dashboard. Users with a saved layout see it only after a layout reset.
  • Restyled block
    • The block uses the card class, an h2 heading, and an ol list with spacing tokens.
    • The green banner is gone. It repeated the welcome heading.
    • All links are underlined. Before, only the seed button looked like a link.
    • The seed button inherits the surrounding font and color.
  • Regenerated importMap.js and payload-types.ts
    • Both were stale against current core in both templates.
    • defaultLayout needs the new widget slugs in the generated types to type-check.
  • Ecommerce seed data
  • with-vercel-website is not edited
    • The template generator copies it from website, so it picks up this change on the next regeneration.

References / Links

🤖 Written with AI

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9bf7339 and cf5e907.

Files selected for processing: 14
  • templates/ecommerce/src/app/(payload)/admin/importMap.js
  • templates/ecommerce/src/components/BeforeDashboard/index.css
  • templates/ecommerce/src/components/GettingStarted/SeedButton/index.css
  • templates/ecommerce/src/components/GettingStarted/SeedButton/index.tsx
  • templates/ecommerce/src/components/GettingStarted/index.css
  • templates/ecommerce/src/components/GettingStarted/index.tsx
  • templates/ecommerce/src/endpoints/seed/contact-form.ts
  • templates/ecommerce/src/endpoints/seed/home-static.ts
  • templates/ecommerce/src/endpoints/seed/home.ts
  • templates/ecommerce/src/endpoints/seed/image-hat.ts
  • templates/ecommerce/src/endpoints/seed/image-tshirt-black.ts
  • templates/ecommerce/src/endpoints/seed/image-tshirt-white.ts
  • templates/ecommerce/src/payload-types.ts
  • templates/ecommerce/src/payload.config.ts
Files with no reviewable changes: 1
  • templates/ecommerce/src/components/BeforeDashboard/index.css

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The website and ecommerce templates update generated Payload types and admin dashboard setup. Both replace BeforeDashboard with a GettingStarted widget. The ecommerce template also adds textStyle values to seeded rich-text paragraphs and captions.

Changes: Website template

Layer / File(s) Summary
Content and user types
templates/website/src/payload-types.ts
Generated types update Lexical rich-text definitions, add audit relationships and media metadata, remove generateSlug fields, and update select interfaces.
Admin, instruction, and widget types
templates/website/src/payload-types.ts
Generated types add the LLM-instructions collection, jobs-stats global, five dashboard widget types, and related record and select interfaces.
Job and scheduled-task types
templates/website/src/payload-types.ts
Generated job types add metadata, parent-task references, processing fields, and a concurrency key. Logged task input becomes required, and scheduled-publish user uses a relationship object or null.
GettingStarted dashboard widget
templates/website/src/components/GettingStarted/*, templates/website/src/components/BeforeDashboard/index.css, templates/website/src/app/(payload)/admin/importMap.js, templates/website/src/payload.config.ts
The configuration and import map register GettingStarted and other admin components. The widget displays setup instructions with updated styles and removal guidance.

Ecommerce template

Layer / File(s) Summary
Lexical and content types
templates/ecommerce/src/payload-types.ts, templates/ecommerce/src/endpoints/seed/*
Generated types define Lexical rich-text structures for content and forms. Seeded rich-text paragraphs and captions add empty textStyle values.
Collections, relationships, and selections
templates/ecommerce/src/payload-types.ts
Generated types add audit relationships, media metadata, LLM-instruction types, and transaction processing status. They remove generateSlug fields and update selection interfaces.
GettingStarted dashboard widget
templates/ecommerce/src/components/GettingStarted/*, templates/ecommerce/src/components/BeforeDashboard/index.css, templates/ecommerce/src/app/(payload)/admin/importMap.js, templates/ecommerce/src/payload.config.ts
The configuration and import map register GettingStarted and other admin components. The widget displays setup instructions with updated styles and removal guidance.

Priority: Low

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Suggested labels: area: templates

Suggested reviewers: patrikkozak, alessiogr

Merge Risk: Minimal · up to cf5e9

No actionable issue is established for the template updates. They appear mergeable after normal checks.

Security architecture risk: Low · up to cf5e9

The changes remain within the existing admin dashboards and preserve seed permissions. Onboarding visibility now depends on each user’s saved layout. No introduced security boundary violation was established, but concurrency and recovery guarantees for the existing destructive seed workflow were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — Ecommerce seeding affects the application dataset rather than only the invoking user’s widget: it clears header/footer navigation and deletes records and versions across thirteen listed collections, including carts, transactions, and orders. This broad destructive scope predates the PR and remains behind the admin-role gate.

Security Findings and Attack Paths

  • inferred — Multiple onboarding widget instances can provide independent seed buttons, but this does not establish a new attacker privilege or independently attackable dataset. The renamed button implementations are byte-identical to base, and authorized users already had access to the same route through separate dashboard sessions or direct requests. Cross-request reseeding guarantees remain unverified rather than an introduced finding.

Trust Boundaries and Controls

  • observed — The server, not widget visibility, enforces seed authorization. Ecommerce authenticates request headers and requires the admin role; website authenticates request headers and requires a user. Both checks occur before creating the Payload request and invoking seed, and both routes are unchanged across the PR.
Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly explains the dashboard widget conversion, layout changes, restyling, regenerated files, and related seed-data updates reflected in the changeset.
Title check Passed The title clearly and concisely describes the main change: moving dashboard onboarding into a widget across the templates.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 14 files. (2 skipped: 2 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖

Meta File Out File Size (raw) Note
packages/next/meta_index.json esbuild/index.js 279.40 KB 🆕 Added
packages/payload/meta_index.json esbuild/index.js 1.94 MB 🆕 Added
packages/payload/meta_shared.json esbuild/exports/shared.js 543.09 KB 🆕 Added
packages/richtext-lexical/meta_client.json esbuild/exports/client_optimized/index.js 303.47 KB 🆕 Added
packages/ui/meta_client.json esbuild/exports/client_optimized/index.js 1.38 MB 🆕 Added
packages/ui/meta_shared.json esbuild/exports/shared_optimized/index.js 19.46 KB 🆕 Added
Largest paths These visualization shows top 20 largest paths in the bundle.

Meta file: packages/next/meta_index.json, Out file: esbuild/index.js

Path Size
../../node_modules ${{\color{Goldenrod}{ ████████████████████████▋ }}}$ 98.7%, 272.71 KB
dist/adapters/router.js ${{\color{Goldenrod}{ }}}$ 0.4%, 1.00 KB
dist/adapters/server.js ${{\color{Goldenrod}{ }}}$ 0.2%, 533 B
dist/adapters/layout.js ${{\color{Goldenrod}{ }}}$ 0.2%, 529 B
dist/adapters/views.js ${{\color{Goldenrod}{ }}}$ 0.2%, 469 B
dist/adapters/UnmountWhenHidden ${{\color{Goldenrod}{ }}}$ 0.2%, 449 B
dist/utilities/initAdminContext.js ${{\color{Goldenrod}{ }}}$ 0.1%, 366 B
dist/utilities/selectiveCache.js ${{\color{Goldenrod}{ }}}$ 0.1%, 263 B
dist/esbuildEntry.js ${{\color{Goldenrod}{ }}}$ 0.0%, 0 B

Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js

Path Size
../../node_modules ${{\color{Goldenrod}{ █████████████████▏ }}}$ 68.6%, 1.32 MB
dist/collections/operations ${{\color{Goldenrod}{ ▉ }}}$ 3.5%, 68.24 KB
dist/fields/hooks ${{\color{Goldenrod}{ ▋ }}}$ 2.5%, 48.00 KB
dist/uploads/fileVersioning ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 22.30 KB
dist/globals/operations ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 19.40 KB
dist/auth/operations ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 17.68 KB
dist/utilities/configToJSONSchema.js ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 16.04 KB
dist/queues/operations ${{\color{Goldenrod}{ ▏ }}}$ 0.7%, 14.32 KB
dist/fields/config ${{\color{Goldenrod}{ ▏ }}}$ 0.7%, 13.77 KB
dist/collections/config ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 11.96 KB
dist/utilities/telemetry ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 11.93 KB
dist/fields/validations.js ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 10.32 KB
dist/cli/commands ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 9.93 KB
dist/config/orderable ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 8.78 KB
dist/uploads/fetchAPI-multipart ${{\color{Goldenrod}{ }}}$ 0.4%, 8.39 KB
dist/database/migrations ${{\color{Goldenrod}{ }}}$ 0.4%, 8.16 KB
dist/config/sanitize.js ${{\color{Goldenrod}{ }}}$ 0.4%, 8.15 KB
dist/utilities/entityInputSchema ${{\color{Goldenrod}{ }}}$ 0.4%, 8.02 KB
dist/uploads/generateFileData.js ${{\color{Goldenrod}{ }}}$ 0.4%, 7.97 KB
dist/uploads/transformers ${{\color{Goldenrod}{ }}}$ 0.4%, 7.92 KB
(other) ${{\color{Goldenrod}{ ███████▊ }}}$ 31.4%, 605.81 KB

Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js

Path Size
../../node_modules ${{\color{Goldenrod}{ ██████████████████████ }}}$ 88.2%, 474.44 KB
dist/fields/validations.js ${{\color{Goldenrod}{ ▍ }}}$ 1.9%, 10.29 KB
dist/fields/config ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 5.83 KB
dist/utilities/traverseFields.js ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 4.34 KB
dist/utilities/deepCopyObject.js ${{\color{Goldenrod}{ ▏ }}}$ 0.7%, 3.52 KB
dist/collections/config ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 3.44 KB
dist/config/orderable ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 3.13 KB
dist/fields/baseFields ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 2.79 KB
dist/config/client.js ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 2.62 KB
dist/auth/cookies.js ${{\color{Goldenrod}{ }}}$ 0.3%, 1.55 KB
dist/utilities/flattenTopLevelFields.js ${{\color{Goldenrod}{ }}}$ 0.3%, 1.42 KB
dist/utilities/getVersionsConfig.js ${{\color{Goldenrod}{ }}}$ 0.2%, 1.04 KB
dist/globals/config ${{\color{Goldenrod}{ }}}$ 0.2%, 957 B
dist/uploads/generatePayloadFileURL.js ${{\color{Goldenrod}{ }}}$ 0.2%, 864 B
dist/utilities/unflatten.js ${{\color{Goldenrod}{ }}}$ 0.2%, 850 B
dist/utilities/flattenAllFields.js ${{\color{Goldenrod}{ }}}$ 0.1%, 798 B
dist/errors/ValidationError.js ${{\color{Goldenrod}{ }}}$ 0.1%, 772 B
dist/utilities/sanitizeUserDataForEmail.js ${{\color{Goldenrod}{ }}}$ 0.1%, 713 B
dist/auth/extractJWT.js ${{\color{Goldenrod}{ }}}$ 0.1%, 696 B
dist/utilities/getFieldPermissions.js ${{\color{Goldenrod}{ }}}$ 0.1%, 681 B
(other) ${{\color{Goldenrod}{ ██▉ }}}$ 11.8%, 63.71 KB

Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js

Path Size
dist/features/blocks ${{\color{Goldenrod}{ ███▌ }}}$ 14.5%, 43.67 KB
dist/lexical/plugins ${{\color{Goldenrod}{ ███ }}}$ 12.4%, 37.19 KB
dist/lexical/ui ${{\color{Goldenrod}{ ██▊ }}}$ 11.2%, 33.66 KB
dist/features/table ${{\color{Goldenrod}{ ██▎ }}}$ 9.3%, 27.79 KB
dist/features/toolbars ${{\color{Goldenrod}{ █▊ }}}$ 7.4%, 22.26 KB
dist/features/link ${{\color{Goldenrod}{ █▌ }}}$ 6.2%, 18.63 KB
dist/features/upload ${{\color{Goldenrod}{ █▏ }}}$ 4.7%, 14.03 KB
dist/features/textState ${{\color{Goldenrod}{ ▉ }}}$ 3.7%, 11.08 KB
dist/lexical/utils ${{\color{Goldenrod}{ ▊ }}}$ 3.3%, 10.01 KB
dist/features/relationship ${{\color{Goldenrod}{ ▊ }}}$ 3.1%, 9.32 KB
dist/features/converters ${{\color{Goldenrod}{ ▋ }}}$ 2.8%, 8.41 KB
dist/utilities/fieldsDrawer ${{\color{Goldenrod}{ ▋ }}}$ 2.7%, 8.06 KB
dist/features/debug ${{\color{Goldenrod}{ ▋ }}}$ 2.5%, 7.40 KB
dist/lexical/config ${{\color{Goldenrod}{ ▍ }}}$ 1.7%, 5.14 KB
dist/features/indent ${{\color{Goldenrod}{ ▎ }}}$ 1.4%, 4.16 KB
dist/features/lists ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 3.67 KB
dist/lexical/LexicalEditor.js ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 3.33 KB
dist/features/horizontalRule ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 3.29 KB
dist/features/format ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 3.28 KB
dist/field/Field.js ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 3.06 KB
(other) ${{\color{Goldenrod}{ █████████████████████▍ }}}$ 85.5%, 256.59 KB

Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js

Path Size
../../node_modules ${{\color{Goldenrod}{ ███████▏ }}}$ 28.9%, 394.65 KB
dist/elements/Hierarchy ${{\color{Goldenrod}{ ▉ }}}$ 3.6%, 49.57 KB
dist/elements/BulkUpload ${{\color{Goldenrod}{ ▌ }}}$ 2.2%, 30.62 KB
dist/views/Version ${{\color{Goldenrod}{ ▌ }}}$ 2.2%, 30.41 KB
dist/elements/Table ${{\color{Goldenrod}{ ▌ }}}$ 2.2%, 29.56 KB
dist/views/Edit ${{\color{Goldenrod}{ ▍ }}}$ 1.6%, 22.36 KB
dist/views/Dashboard ${{\color{Goldenrod}{ ▍ }}}$ 1.6%, 21.86 KB
dist/views/HierarchyList ${{\color{Goldenrod}{ ▍ }}}$ 1.6%, 21.50 KB
dist/elements/WhereBuilder ${{\color{Goldenrod}{ ▎ }}}$ 1.3%, 17.69 KB
dist/providers/Auth ${{\color{Goldenrod}{ ▎ }}}$ 1.3%, 17.40 KB
dist/fields/Relationship ${{\color{Goldenrod}{ ▎ }}}$ 1.3%, 17.10 KB
dist/forms/Form ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 16.93 KB
dist/fields/Blocks ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 16.73 KB
dist/fields/Upload ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 15.41 KB
dist/elements/Popup ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 14.51 KB
dist/widgets/Activity ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 14.12 KB
dist/views/List ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 13.31 KB
dist/elements/ReactSelect ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 13.22 KB
dist/elements/PublishButton ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 12.16 KB
dist/elements/QueryPresets ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 12.09 KB
(other) ${{\color{Goldenrod}{ █████████████████▊ }}}$ 71.1%, 969.61 KB

Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js

Path Size
dist/graphics/Logo ${{\color{Goldenrod}{ ███████▍ }}}$ 29.9%, 5.61 KB
../../node_modules ${{\color{Goldenrod}{ ███▌ }}}$ 14.1%, 2.65 KB
dist/graphics/Icon ${{\color{Goldenrod}{ ██ }}}$ 8.1%, 1.51 KB
dist/utilities/formatDocTitle ${{\color{Goldenrod}{ █▊ }}}$ 7.0%, 1.32 KB
dist/providers/TableColumns ${{\color{Goldenrod}{ █▏ }}}$ 4.6%, 866 B
dist/utilities/getGlobalData.js ${{\color{Goldenrod}{ █ }}}$ 4.1%, 762 B
dist/utilities/api.js ${{\color{Goldenrod}{ █ }}}$ 4.0%, 756 B
dist/utilities/groupNavItems.js ${{\color{Goldenrod}{ █ }}}$ 4.0%, 745 B
dist/utilities/traverseForLocalizedFields.js ${{\color{Goldenrod}{ ▊ }}}$ 3.0%, 570 B
dist/elements/Translation ${{\color{Goldenrod}{ ▋ }}}$ 2.6%, 493 B
dist/forms/Form ${{\color{Goldenrod}{ ▋ }}}$ 2.5%, 474 B
dist/utilities/handleTakeOver.js ${{\color{Goldenrod}{ ▌ }}}$ 2.3%, 440 B
dist/elements/withMergedProps ${{\color{Goldenrod}{ ▍ }}}$ 1.8%, 339 B
dist/utilities/getNavGroups.js ${{\color{Goldenrod}{ ▍ }}}$ 1.8%, 338 B
dist/utilities/getVisibleEntities.js ${{\color{Goldenrod}{ ▍ }}}$ 1.8%, 329 B
dist/elements/WithServerSideProps ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 233 B
dist/layouts/Root ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 230 B
dist/utilities/handleGoBack.js ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 180 B
dist/fields/mergeFieldStyles.js ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 158 B
dist/utilities/handleBackToDashboard.js ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 152 B
(other) ${{\color{Goldenrod}{ █████████████████▌ }}}$ 70.1%, 13.16 KB
Details

Next to the size is how much the size has increased or decreased compared with the base branch of this PR.

  • ‼️: Size increased by 20% or more. Special attention should be given to this.
  • ⚠️: Size increased in acceptable range (lower than 20%).
  • ✅: No change or even downsized.
  • 🗑️: The out file is deleted: not found in base branch.
  • 🆕: The out file is newly found: will be added to base branch.

@denolfe denolfe changed the title templates: move website dashboard onboarding into a widget templates: move dashboard onboarding into a widget Oct 28, 2026
@denolfe
denolfe enabled auto-merge (squash) October 28, 2026 16:36
@denolfe
denolfe merged commit b9827b6 into main Oct 28, 2026
43 checks passed
@denolfe
denolfe deleted the templates/website-ugly branch October 28, 2026 17:04
@github-actions

Copy link
Copy Markdown
Contributor

🚀 This is included in version v4.0.0-beta.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants