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

DataViews: Performance: check isEligible on dropdown open #63176

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jul 5, 2024

What?

Currently we check isEligible for the trash, restore, and rename actions, even though these are not even rendered on load (the action buttons appear in a dropdown). This PR moves the checks to the place where the buttons are rendered.

One catch is that we cannot disable the button when no actions are available. Instead, I added a message in the dropdown that no actions are available. I believe that's ok, and it should be rarer anyway?

Why?

It initiates an OPTION request for EACH item on load.

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

@ellatrix ellatrix added the [Type] Performance Related to performance efforts label Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

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: ellatrix <ellatrix@git.wordpress.org>

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant