Skip to content

Forms: update DataViews header and filters - #46732

Merged
edanzer merged 7 commits into
trunkfrom
update/centralized-forms-header-filters
Jan 23, 2026
Merged

edanzer merged 7 commits into
trunkfrom
update/centralized-forms-header-filters

Conversation

@edanzer

@edanzer edanzer commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Proposed changes:

This PR adjusts our DataViews header and filter to accommodate the needs of Centralized Form Management. Changes:

  • Moves the Search / Filter components to be on the same level as the main page tabs. This was requested by @ilona See this comment from and the Figma designs here: 8TmDfrB54NU4Rzj19Qs9Tg-fi-6116_73070
  • Removes the fixed inbox/spam/trash filter pills, and replaces those with a regualr DataViews filter for 'Folder'. This is following the apparent decision in the P2 here: p1HpG7-xwg-p2#comment-77460
  • When inbox/spam/trash filters are selected, update the URL status param. We've been using that param to drive the DataViews table, and for external linking, so we can't move it. But we need it to follow to the filter.
  • Creates new DataViewsHeaderRow component to hold the the header tabs and filters that live above our responses and forms tables. This is needed because we're essentially duplicating the component code and CSS and need to keep things better in sync.

All behavior should be the same when the 'centralzed form management' flag is off.
no-cfm-flag

When the centralized form management flag is ON....

Inbox before
responses-list-before

Inbox after
inbox-after

Forms list before
forms-list-before

Forms list after
forms-list-after

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

See #46580 (comment) from
See Figma designs here: 8TmDfrB54NU4Rzj19Qs9Tg-fi-6116_73070
See P2 here: p1HpG7-xwg-p2#comment-77460

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

Testing instructions:

Add this feature flag to your test site.

add_filter( 'jetpack_block_editor_feature_flags', 'eb_register_feature' );
function eb_register_feature( $flags ) {
    $flags['central-form-management'] = true;
    return $flags;
}

Test with Flag on:

  • Go to Jetpack > Forms
  • Confirm you see the Forms and Responses tab and they show the forms list and inbox
  • On Forms, confirm filters work as before
  • On Responses, try filtering the Folder for Inbox, Spam, and Trash and confirm that works

Test with flag off to confirm no regressions:

  • Remove feature flag and confirm everything works as before

@edanzer
edanzer requested a review from a team January 22, 2026 18:29
@edanzer edanzer self-assigned this Jan 22, 2026
Copilot AI review requested due to automatic review settings January 22, 2026 18:29
@edanzer edanzer added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Pri] Normal [Package] Forms labels Jan 22, 2026
@github-actions

github-actions Bot commented Jan 22, 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/centralized-forms-header-filters branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/centralized-forms-header-filters

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 added [Feature] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Jan 22, 2026
@github-actions

github-actions Bot commented Jan 22, 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: February 3, 2026
    • Code freeze: February 3, 2026

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

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

This PR refactors the DataViews header and filters for the Forms feature to accommodate Centralized Form Management (CFM). The changes reorganize the UI to place search and filter components at the same level as the main page tabs, and replace fixed status filter pills with a flexible DataViews "Folder" filter.

Changes:

  • Creates a new shared DataViewsHeaderRow component to consolidate duplicate header/filter markup
  • When CFM is enabled, adds a "Folder" DataViews filter (Inbox/Spam/Trash) that syncs with the URL status parameter
  • Maintains backward compatibility by showing legacy InboxStatusToggle when CFM is disabled
  • Fixes a state mutation bug in the resetPage callback

Reviewed changes

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

Show a summary per file
File Description
projects/plugins/jetpack/changelog/update-centralized-forms-header-filters Adds changelog entry for the plugin
projects/packages/forms/changelog/update-centralized-forms-header-filters Adds changelog entry for the package (has capitalization issue)
projects/packages/forms/src/dashboard/components/dataviews-header-row/index.tsx New shared component for DataViews header row with tabs and controls
projects/packages/forms/src/dashboard/components/dataviews-header-row/style.scss Styles for the new header component, migrated from inbox styles
projects/packages/forms/src/dashboard/inbox/stage/index.js Integrates DataViewsHeaderRow, adds folder filter logic with URL sync
projects/packages/forms/src/dashboard/forms/index.tsx Replaces duplicate header markup with DataViewsHeaderRow component
projects/packages/forms/src/dashboard/components/inbox-status-toggle/index.tsx Makes onChange callback optional for reusability
projects/packages/forms/src/dashboard/hooks/use-inbox-data.ts Updates comment to clarify new filter behavior
projects/packages/forms/src/dashboard/inbox/style.scss Removes styles migrated to DataViewsHeaderRow
projects/packages/forms/src/dashboard/forms/style.scss Removes unused breakpoints import

@jp-launch-control

jp-launch-control Bot commented Jan 22, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/forms/src/dashboard/inbox/stage/index.js 0/178 (0.00%) 0.00% 16 💔
projects/packages/forms/src/dashboard/inbox/stage/views.js 0/26 (0.00%) 0.00% 2 ❤️‍🩹

1 file is newly checked for coverage.

File Coverage
projects/packages/forms/src/dashboard/components/dataviews-header-row/index.tsx 0/5 (0.00%) 💔

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

Copilot AI review requested due to automatic review settings January 22, 2026 21:14

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

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

@edanzer
edanzer force-pushed the update/centralized-forms-header-filters branch from a90bf5c to d4d0f1c Compare January 22, 2026 22:08
Copilot AI review requested due to automatic review settings January 22, 2026 22:15

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

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

enejb
enejb previously approved these changes Jan 22, 2026

@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 works really well for me.
It's great to see the refactor the header component into its own.

@edanzer
edanzer force-pushed the update/centralized-forms-header-filters branch from 99b0cf1 to 8e3bdbc Compare January 22, 2026 23:29
@edanzer

edanzer commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

Rebased and addressed small merge conflict.

Copilot AI review requested due to automatic review settings January 23, 2026 16:21
@edanzer
edanzer force-pushed the update/centralized-forms-header-filters branch from c933324 to 78b7fbc Compare January 23, 2026 16:21
@Automattic Automattic deleted a comment from Copilot AI Jan 23, 2026
@edanzer

edanzer commented Jan 23, 2026

Copy link
Copy Markdown
Contributor Author

Just addressed a couple more legit Copilot comments, and rebased again. Will merge when tests pass.

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

@edanzer
edanzer merged commit 7a506b1 into trunk Jan 23, 2026
68 checks passed
@edanzer
edanzer deleted the update/centralized-forms-header-filters branch January 23, 2026 18:49
@github-actions github-actions Bot added this to the jetpack/15.5 milestone Jan 23, 2026
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Jan 23, 2026
nerrad added a commit that referenced this pull request Apr 19, 2026
The .jp-forms-filters-bar block (and its __chips / __status-chips
modifiers) styled the inbox/spam/trash pill row that was replaced
with native DataViews filters in #46732. The SCSS was missed at
the time. No JSX consumer exists anywhere in the repo.

Drops the dead rules from src/dashboard/inbox/style.scss and removes
the now-empty src/dashboard/forms/style.scss along with its sole
import in src/dashboard/forms/index.tsx.

Refs #48160.
simison pushed a commit that referenced this pull request Apr 19, 2026
The .jp-forms-filters-bar block (and its __chips / __status-chips
modifiers) styled the inbox/spam/trash pill row that was replaced
with native DataViews filters in #46732. The SCSS was missed at
the time. No JSX consumer exists anywhere in the repo.

Drops the dead rules from src/dashboard/inbox/style.scss and removes
the now-empty src/dashboard/forms/style.scss along with its sole
import in src/dashboard/forms/index.tsx.

Refs #48160.
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] Forms [Package] Forms [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants