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

Docs - Dataviews: Better explanation of the "elements" property and its connection to the "filterBy" property #64633

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

juanmaguitar
Copy link
Contributor

What?

The connection between the elements and filterBy properties for each item passed to the fields prop is not clear in the docs. This PR aims to clarify this in the docs.

Why?

To use the Dataviews component outside of WordPress, the purpose of each property needs to be crystal clear in order to make the most of this component and alleviate pain points.

How?

This PR add to the docs the following clarifications:

  • The format expected by the elements property
  • That a filter by a field is enabled just by setting a value to the elements property - this is a bit confusing as one would expect to enable filters by a fields somehow through the filterBy property

cc: @oandregal

Copy link

github-actions bot commented Aug 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: juanmaguitar <[email protected]>
Co-authored-by: oandregal <[email protected]>

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

@juanmaguitar juanmaguitar enabled auto-merge (squash) August 20, 2024 08:57
@juanmaguitar juanmaguitar merged commit 8384d2a into trunk Aug 20, 2024
60 checks passed
@juanmaguitar juanmaguitar deleted the docs/dataviews-elements branch August 20, 2024 09:32
@github-actions github-actions bot added this to the Gutenberg 19.1 milestone Aug 20, 2024
@artemiomorales artemiomorales added [Type] Developer Documentation Documentation for developers [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Aug 21, 2024
bph pushed a commit to bph/gutenberg that referenced this pull request Aug 31, 2024
…ts connection to the "filterBy" property (WordPress#64633)

* better explanation of the elements property

* Update packages/dataviews/README.md

Co-authored-by: André <[email protected]>

* Update packages/dataviews/README.md

Co-authored-by: André <[email protected]>

---------

Co-authored-by: André <[email protected]>
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] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants