Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sites - In table options, The hide button doesn't work #94762

Closed
davemart-in opened this issue Sep 20, 2024 · 7 comments
Closed

Sites - In table options, The hide button doesn't work #94762

davemart-in opened this issue Sep 20, 2024 · 7 comments
Assignees
Labels
[Pri] High Address as soon as possible after BLOCKER issues [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Status] 3rd Party Fix Needed A fix from a 3rd party is required to resolve this issue. [Type] Bug When a feature is broken and / or not performing as intended [Type] Fit and Finish Issues related to the fit, finish and overall polish of WordPress.com

Comments

@davemart-in
Copy link
Contributor

davemart-in commented Sep 20, 2024

Description

There are two related issues related to this:

Image

  1. The tooltip should not have [object Object]
  2. Clicking this link does nothing

Expected

We should not see [object Object] and the hide icon once clicked should hide the column. If we can't get that to work for one reason or another, we should hide this icon altogether.

@allilevine
Copy link
Member

What I've found so far:

The tooltip should not have [object Object]

This is happening because of a known upstream issue where the expected field label type is a string. We're using React elements:

// @ts-expect-error -- Need to fix the label type upstream in @wordpress/dataviews to support React elements.

Clicking this link does nothing

We have enableHiding set to false for all of these (though even with it set to true, the column isn't hidden). I think with false we're seeing the intended behavior: the hide icon is visible but not clickable.

I'd recommend working with core to fix these upstream.

@davemart-in
Copy link
Contributor Author

I'd recommend working with core to fix these upstream.

@jameskoster thoughts on who would be good to ping on this on the core side of things?

@allilevine
Copy link
Member

allilevine commented Sep 20, 2024

There is something weird about the hover color vs. the DataViews example:

Calypso DataViews
Screen Shot 2024-09-20 at 2 35 56 PM Screen Shot 2024-09-20 at 2 35 47 PM

It doesn't stay grayed out on hover like the example.

@allilevine
Copy link
Member

This is happening because of a known upstream issue where the expected field label type is a string. We're using React elements:

I see there's now a header for fields, I could try adding it:

https://github.com/WordPress/gutenberg/blob/b1d925530d22a8531a0f9c32ffe8ec4430005ab7/packages/dataviews/src/types.ts#L90C2-L94C33

@allilevine
Copy link
Member

I opened these two PRs to improve the experience:

The hide icon is still visible, though.

@jameskoster
Copy link
Contributor

@jameskoster thoughts on who would be good to ping on this on the core side of things?

@jorgefilipecosta worked on this recently. If the tooltip is problematic maybe we simplify; "Hide" / "Show"?

When field visibility cannot be toggled the button should be rendered as disabled with accessibleWhenDisabled and a tooltip explaining that the field cannot be hidden.

@Copons Copons moved this from Needs Triage to Needs Core/3rd Party Fix in Automattic Prioritization: The One Board ™ Nov 8, 2024
@Copons Copons added [Type] Bug When a feature is broken and / or not performing as intended [Pri] High Address as soon as possible after BLOCKER issues [Type] Fit and Finish Issues related to the fit, finish and overall polish of WordPress.com labels Nov 8, 2024
@github-actions github-actions bot added the [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts label Nov 8, 2024
@inaikem inaikem added the [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. label Jan 13, 2025
@inaikem inaikem added the [Status] 3rd Party Fix Needed A fix from a 3rd party is required to resolve this issue. label Feb 24, 2025
@inaikem inaikem moved this from Needs Triage to Needs Core/3rd Party Fix in Automattic Prioritization: The One Board ™ Feb 24, 2025
@lsl
Copy link
Contributor

lsl commented Feb 27, 2025

Closing stale, I think this might have already been fixed upstream as I was able to revert back to using labels in the override cleanup a while back. New file location here: https://github.com/Automattic/wp-calypso/blob/trunk/client/sites/components/Nsites-dataviews/index.tsx#L127

@lsl lsl closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2025
@github-project-automation github-project-automation bot moved this from Needs Core/3rd Party Fix to Done 🎉 in Automattic Prioritization: The One Board ™ Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] High Address as soon as possible after BLOCKER issues [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Status] 3rd Party Fix Needed A fix from a 3rd party is required to resolve this issue. [Type] Bug When a feature is broken and / or not performing as intended [Type] Fit and Finish Issues related to the fit, finish and overall polish of WordPress.com
Projects
Development

No branches or pull requests

6 participants