Dashboard: prevent domain card column controls from appearing on right-click#111824
Draft
agent-sandbox-automattic[bot] wants to merge 1 commit into
Draft
Dashboard: prevent domain card column controls from appearing on right-click#111824agent-sandbox-automattic[bot] wants to merge 1 commit into
agent-sandbox-automattic[bot] wants to merge 1 commit into
Conversation
…t-click In the domain info card on the site overview page, column controls are intentionally hidden (the DataView is rendered using only Layout and Pagination sub-components, without the full toolbar). However, right-clicking on a column header still surfaced the column selection interface because some domain fields had `enableHiding: true`. When `inOverview` is true, `useFields()` now maps all returned fields to have `enableHiding: false`. This prevents `@wordpress/dataviews` from showing the "Manage columns" option in the column header context menu, since column controls are disabled in that context. No automated test is added: the right-click column controls behaviour requires browser-level interaction that is better covered by E2E tests. Fixes DOTMSD-1316 Co-authored-by: p-jackson <philip.jackson@automattic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
Contributor
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes DOTMSD-1316
Proposed Changes
useFields(), wheninOverviewistrue, map all returned fields to haveenableHiding: false.Why are these changes being made?
The domain info card on the site overview page renders a DataViews table using only
DataViews.LayoutandDataViews.Paginationsub-components — not the full toolbar. This means column controls are intentionally absent from the visible UI.However, right-clicking on a column header still surfaced the column selection interface because some domain fields (
owner,ssl_status, andis_primary_domain) hadenableHiding: true(or no explicitenableHiding: false).@wordpress/dataviewsshows the "Manage columns" context menu option whenever any field in thefieldsarray is hideable.Setting
enableHiding: falseon all fields wheninOverviewis true tells DataViews there are no user-manageable columns, so the column selection interface is suppressed from both the toolbar (already hidden by using sub-components) and the right-click context menu.Testing Instructions
Pre-merge Checklist
Linear: DOTMSD-1316
Co-authored-by: p-jackson philip.jackson@automattic.com