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: Don't render actions dropdown when all eligible ones are primary #68168

Conversation

ntsekouras
Copy link
Contributor

@ntsekouras ntsekouras commented Dec 20, 2024

What?

Related: #66811 and #67020

There can be cases where the eligible actions are all primary ones. In that case there is no need to render the dropdown with the actions as it will only contain the primary ones. This is used in table layout for now.

Testing Instructions

  1. In storybook or a component that uses DataViews pass two primary actions only and choose the table layout.
  2. The dropdown should not be rendered.
  3. Everything else should work as before.

@ntsekouras ntsekouras added [Type] Bug An existing feature does not function as intended [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Dec 20, 2024
@ntsekouras ntsekouras self-assigned this Dec 20, 2024
Copy link

Flaky tests detected in e5ad8ea.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12427420451
📝 Reported issues:

Copy link

github-actions bot commented Dec 20, 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: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: mcsf <mcsf@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>

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

Copy link
Member

@oandregal oandregal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested but sounds sensible for the table layout. We can't do this for grid or list, though.

@ntsekouras ntsekouras merged commit d9f18e5 into trunk Dec 20, 2024
73 checks passed
@ntsekouras ntsekouras deleted the dataviews/dont-render-dropdown-if-all-eligible-actions-are-primary branch December 20, 2024 16:58
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 20, 2024
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] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants