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

Fix: DataViews edit page and template: remove multiple edit actions #68797

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

Rishit30G
Copy link
Contributor

@Rishit30G Rishit30G commented Jan 21, 2025

Why?

This PR is intended to solve issue mentioned here #68789

How?

It removes the vertical 3 dots present ( only if one option is present in dropdown ) and replace it with the edit icon in the Template section of Editor ( Grid and Table )

Testing Instructions

  • Open Editor
  • Go to template and click on the 3 vertical dots present on the left panel
  • Notice, now the 3 vertical dots are gone and there is a single edit icon

Screenshots or screencast

image
image

@Rishit30G Rishit30G marked this pull request as ready for review January 22, 2025 11:11
Copy link

github-actions bot commented Jan 22, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Rishit30G <rishit30g@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: karmatosed <karmatosed@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Rishit30G Rishit30G changed the title Remove edit action icon Fix: DataViews edit page and template: remove multiple edit actions Jan 23, 2025
@karmatosed
Copy link
Member

karmatosed commented Jan 29, 2025

Thank you for doing this @Rishit30G. I have added some people in to get a code and a11y review for you on this as both aspects were brought up in the ticket.

From a design perspective this is what I agreed and wanted if the 3 menu doesn't also just have one item. Is that also part of this solution?

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Jan 30, 2025
@Mamaduka
Copy link
Member

I think this introduces more inconsistency in grid layout actions.

Screenshot

CleanShot 2025-01-30 at 12 48 15

@Rishit30G
Copy link
Contributor Author

Hi @Mamaduka @karmatosed

I would be introducing a new filter function, to separate out the Primary Actions from the dropdown and make them visible as icons only
So before committing the code, I would like to share a screencast that shows how the Grid and Table would look like:
Please share your thoughts/suggestions if it is the expected solution to the issue raised 🙏🏻

Screen.Recording.2025-01-30.at.4.23.43.PM.mov

@Rishit30G
Copy link
Contributor Author

I think this introduces more inconsistency in grid layout actions.

I agree, but having the primary actions handy is also quite convenient from a user's perceptive
However we can maybe come to a common ground where we can keep only of one ( 'Edit' / 'View' / 'Delete' ) as primary action to have a better UI 🙇🏻

@Mamaduka
Copy link
Member

I think the current action-related design choices are intentional. The gird uses a compact version because there is limited space.

It's probably better to move the conversation back to the issue before we move forward with a solution.

@Rishit30G
Copy link
Contributor Author

Makes sense, thanks!

@afercia
Copy link
Contributor

afercia commented Jan 30, 2025

I think the current action-related design choices are intentional. The gird uses a compact version because there is limited space.

I'd agree just unsetting isCompact is not ideal because that just moves all the action defined as isPrimary out of the menu but they are still 'duplicated' within the menu. But yes, let's go back to the discussion on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants