Skip to content

Conversation

oandregal
Copy link
Member

What?

Removes an unnecessary span in the title field when level is 0.

How?

Check that level is greater than 0 to add the span.

Testing Instructions

  • Go to the Site Editor's pages page.
  • Open the table view.
  • Inspect the title field and verify there's no span element with class dataviews-view-table__level if the item doesn't have parents.

Copy link

github-actions bot commented Aug 1, 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: oandregal <oandregal@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>

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

@oandregal oandregal self-assigned this Aug 1, 2025
@oandregal oandregal 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 Aug 1, 2025
@oandregal oandregal changed the title Do not render the level span if level is 0 DataViews: do not render an empty level span if level is 0 Aug 1, 2025
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

Thanks :)

@oandregal oandregal enabled auto-merge (squash) August 1, 2025 14:52
@oandregal oandregal merged commit fe3e1de into trunk Aug 1, 2025
60 checks passed
@oandregal oandregal deleted the fix/dataviews-levels-space branch August 1, 2025 14:55
@github-actions github-actions bot added this to the Gutenberg 21.4 milestone Aug 1, 2025
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.

2 participants