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

Hosting Dashboard: Convert the existing “Actions” fields into core DataViews “Actions” #94198

Closed
allilevine opened this issue Sep 4, 2024 · 8 comments
Assignees
Labels
[Pri] Normal Schedule for the next available opportuinity. [Type] Enhancement [Type] Fit and Finish Issues related to the fit, finish and overall polish of WordPress.com

Comments

@allilevine
Copy link
Member

Convert the existing “Actions” fields into proper core DataViews “Actions”. This means we have bulk selection for free and there’s no table header tools for that column (move left/right controls).

Follow-up to #93503

@youknowriad
Copy link
Contributor

youknowriad commented Sep 5, 2024

I started looking at this a little bit. There are a two things that are not possible currently in the Actions API and that exist in the Actions dropdown used in the sites dataviews

1- Descriptions or help text for actions

Screenshot 2024-09-05 at 12 56 45 PM Screenshot 2024-09-05 at 12 56 51 PM

This is probably something we can easily support upstream if needed.

2- Nested drop-down for actions (or "grouping" actions)

Screenshot 2024-09-05 at 12 57 10 PM

While I think it's possible to support potentially by introducing some notion of "group" for actions or something like that. I'm not entirely sure we should support it to be honest. My suggestion would be to remove the nesting and maybe have a single link to Hosting where the user can see all these sections.

WDYT. @jameskoster @davemart-in

@davemart-in
Copy link
Contributor

I think it would be fine to drop both the nested dropdown and the help text.

@mmtr mmtr self-assigned this Sep 25, 2024
@mmtr mmtr added [Type] Enhancement [Pri] Normal Schedule for the next available opportuinity. [Type] Fit and Finish Issues related to the fit, finish and overall polish of WordPress.com labels Sep 25, 2024
@mmtr mmtr assigned youknowriad and unassigned mmtr Sep 25, 2024
@youknowriad
Copy link
Contributor

For clarity, myr PR is at the moment blocked by the fact that the /sites endpoint doesn't include features which means that for each "site", we need to perform an extra REST API request to fetch the features before rendering the DataViews.

I know @jsnajdr was looking into iterations on the sites endpoint to address that but it seems a bit complex, so I'm not entirely sure what's the next step here.

@jsnajdr
Copy link
Member

jsnajdr commented Sep 25, 2024

The REST endpoint is fixed, it now returns the active features. I have a draft PR for Calypso that removes all the explicit QuerySiteFeatures queries, but it's a big change and will some more work to finish: #94840.

@youknowriad
Copy link
Contributor

Oh I didn't know. Thanks @jsnajdr. Do you think I should wait for your PR to land first or should I update my actions PR (smaller scope) to use the featured directly? Thinking the latter unless you have any reservations

@jsnajdr
Copy link
Member

jsnajdr commented Sep 25, 2024

should I update my actions PR (smaller scope) to use the featured directly?

I won't get to work on it again at least until Oct 2, so you might want to use the features directly for now.

Instead of using the siteHasFeature selector, look directly at the site object:

hasFeature = ( state, siteId, feature ) => getSite( state, siteId ).plan.features.active.includes( feature )

If the /me/sites info is loaded at all, then the plan.features.active info will reliably be there.

@youknowriad
Copy link
Contributor

Great Thanks, I'll give it a try.

@Copons
Copy link
Contributor

Copons commented Nov 22, 2024

I think this can be closed now. ✨

@Copons Copons closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] Normal Schedule for the next available opportuinity. [Type] Enhancement [Type] Fit and Finish Issues related to the fit, finish and overall polish of WordPress.com
Projects
None yet
Development

No branches or pull requests

6 participants