Skip to content

Dashboard: prevent domain card column controls from appearing on right-click#111824

Draft
agent-sandbox-automattic[bot] wants to merge 1 commit into
trunkfrom
ai/agent/dotmsd-1316-1781840439
Draft

Dashboard: prevent domain card column controls from appearing on right-click#111824
agent-sandbox-automattic[bot] wants to merge 1 commit into
trunkfrom
ai/agent/dotmsd-1316-1781840439

Conversation

@agent-sandbox-automattic

Copy link
Copy Markdown
Contributor

Fixes DOTMSD-1316

Proposed Changes

  • In useFields(), when inOverview is true, map all returned fields to have enableHiding: false.

Why are these changes being made?

The domain info card on the site overview page renders a DataViews table using only DataViews.Layout and DataViews.Pagination sub-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, and is_primary_domain) had enableHiding: true (or no explicit enableHiding: false). @wordpress/dataviews shows the "Manage columns" context menu option whenever any field in the fields array is hideable.

Setting enableHiding: false on all fields when inOverview is 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

  1. Navigate to a site overview page in the multi-site dashboard.
  2. Scroll to the Domain names card.
  3. Right-click on any column header in the domain table (e.g. "Paid until" or "Status").
  4. Before: A context menu with a "Manage columns" or column selection option appeared.
  5. After: No column management option appears in the context menu.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

Linear: DOTMSD-1316

Co-authored-by: p-jackson philip.jackson@automattic.com

This PR was auto-generated by Agent Sandbox. Please review carefully before merging.

…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>
@matticbot

Copy link
Copy Markdown
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug ai/agent/dotmsd-1316-1781840439 on your sandbox.

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.

1 participant