Skip to content

Forms: use title at dashboard when at top level - #47446

Merged
simison merged 2 commits into
trunkfrom
update/forms-dash-header
Mar 6, 2026
Merged

simison merged 2 commits into
trunkfrom
update/forms-dash-header

Conversation

@simison

@simison simison commented Mar 4, 2026 •

Copy link
Copy Markdown
Member

Fixes JETPACK-1400

Make the header more consistent across all other Jetpack pages by using title (bigger text) rather than breadcrumbs (smaller text) on top-level pages.

Proposed changes:

  • Use title in Page component for Forms dashboard when at top level (forms list, all responses) and breadcrumbs only when deeper into the hierarchy (Forms -> Form responses)
  • Don't translate "Forms" as it's a product name

Before

image image image

After

image image image

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Test old dashboard continues to look good
  • Test new dashboard, use flags:
add_filter('jetpack_forms_alpha', '__return_true');
add_filter( 'jetpack_block_editor_feature_flags', 'central_form_management_feature' );
function central_form_management_feature( $flags ) {
	$flags['reusable-forms'] = true;
	$flags['central-form-management'] = true;
	return $flags;
}
  • Test forms screen, responses screen, and individual forms responses screen
  • Compare to other Jetpack screens around
    image

Changelog

  • Generate changelog entries for this PR (using AI).

@simison
simison requested review from a team and ilonagl March 4, 2026 10:47
@simison simison added the Enhancement Changes to an existing feature — removing, adding, or changing parts of it label Mar 4, 2026
Copilot AI review requested due to automatic review settings March 4, 2026 10:47
@simison simison added [Status] Needs Review This PR is ready for review. [Package] Forms labels Mar 4, 2026
@github-actions

github-actions Bot commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the update/forms-dash-header branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/forms-dash-header

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

github-actions Bot commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: March 31, 2026
    • Code freeze: March 31, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Mar 4, 2026

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.

Pull request overview

Updates the Forms dashboard header rendering so top-level routes use the Page title (larger header text) while deeper routes (single form responses) continue to use breadcrumbs, aligning Forms with other Jetpack admin pages.

Changes:

  • Add a title return field to usePageHeaderDetails and compute either title (top-level) or breadcrumbs (single-form depth).
  • Update Forms and Responses dashboard routes to pass the new title prop into the admin-ui Page header.

Reviewed changes

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

File Description
projects/packages/forms/src/dashboard/wp-build/hooks/use-page-header-details.tsx Introduces title vs breadcrumbs selection logic for header content.
projects/packages/forms/routes/forms/stage.tsx Passes title from usePageHeaderDetails into Page.
projects/packages/forms/routes/responses/stage.tsx Passes title from usePageHeaderDetails into Page.
Comments suppressed due to low confidence (1)

projects/packages/forms/src/dashboard/wp-build/hooks/use-page-header-details.tsx:54

  • The hook now returns a title field in addition to breadcrumbs/subtitle/actions. Please update the docblock above (Build wp-build page header details ...) to include title so the documentation matches the exported API.
type UsePageHeaderDetailsReturn = {
	breadcrumbs: ReactNode;
	title?: ReactNode;
	badges?: ReactNode;
	subtitle: ReactNode;
	actions?: ReactNode;
};

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +208 to +212
<Breadcrumbs
items={ [
{ label: __( 'Forms', 'jetpack-forms' ), to: '/forms' },
{ label: formTitle || __( 'Form responses', 'jetpack-forms' ) },
] }

Copilot AI Mar 4, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description (and the comment above) says "Forms" is a product name and should not be translated, but the breadcrumb label still uses __( 'Forms', 'jetpack-forms' ). Use the non-translated product name here as well to keep behavior consistent.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Here "forms" refers to forms as CPTs, so I think it's fine to translate.

@jp-launch-control

jp-launch-control Bot commented Mar 4, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/wp-build/hooks/use-page-header-details.tsx 0/106 (0.00%) 0.00% 4 💔

Full summary · PHP report · JS report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@simison simison added I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Mar 4, 2026
@github-actions github-actions Bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Mar 4, 2026
@simison simison added the Reviewer Can Merge PR author indicates the reviewer is free to merge/deploy if they want to own the change. label Mar 4, 2026
@github-actions github-actions Bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Mar 4, 2026
}, [ sourceIdNumber, formTitle, duplicateForm, previewForm, copyEmbed, copyShortcode ] );

const breadcrumbsItems = useMemo( () => {
const WrapWithJetpackLogo = ( { children }: { children: ReactNode } ) => (

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Something to componentize soon, most likely.

@enejb enejb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This worked well for me. But I haven't tested it in the CIAB.

@simison simison mentioned this pull request Mar 5, 2026
1 of 4 tasks
@simison simison added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Mar 5, 2026
@simison

simison commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

@ilonagl and @grbicsanja approved in a convo, internal ref p1772622550100669-slack-C052XEUUBL4

@simison
simison merged commit 328750d into trunk Mar 6, 2026
77 checks passed
@simison
simison deleted the update/forms-dash-header branch March 6, 2026 10:47
@github-actions github-actions Bot added this to the jetpack/15.7 milestone Mar 6, 2026
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Contact Form I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Reviewer Can Merge PR author indicates the reviewer is free to merge/deploy if they want to own the change. [Status] UI Changes Add this to PRs that change the UI so documentation can be updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants