Skip to content

Conversation

@oandregal
Copy link
Member

@oandregal oandregal commented Sep 1, 2025

What?

Screenshot 2025-09-01 at 12 54 21

Update the existing Field Types story so that each field type (text, integer, email, array, etc.) displays:

  • the default state: {id: '…', type: '…' }.
  • how it renders when it has a list of elements: { id: '', type: '...', elements: [ ... ] }.
  • how it renders when using a specific Edit control: { id: '…', type: '…', Edit: 'checkbox' }.

This affects both DataForm (the control displayed in regular layout) and DataViews (the control used for filtering).

Why?

So that we have documentation for people onboarding into DataForm/DataViews development (either contributing or consuming the libraries).

How

  • Review every field type and update data/config so it has an example with and without elements.
  • Introduce the Edit control for the whole story, so that users can switch to using a different Edit control and see the effects it causes.

Testing Instructions

Run the storybook locally (npm install && npm run storybook:dev) and visit "DatViews > Field Types" story.

@oandregal oandregal self-assigned this Sep 1, 2025
@oandregal oandregal added the [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond label Sep 1, 2025
@github-actions
Copy link

github-actions bot commented Sep 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 <[email protected]>

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

@oandregal oandregal added the [Type] Developer Documentation Documentation for developers label Sep 1, 2025
@github-actions
Copy link

github-actions bot commented Sep 1, 2025

Flaky tests detected in def1ad5.
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/17375135068
📝 Reported issues:

@oandregal oandregal merged commit 983df1f into trunk Sep 1, 2025
67 checks passed
@oandregal oandregal deleted the update/field-type-stories branch September 1, 2025 11:50
@github-actions github-actions bot added this to the Gutenberg 21.6 milestone Sep 1, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

It would have been nice to ensure this was handled in git as a move instead of a separate add/delete, as it severs the git history and makes rebasing PRs much harder.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I didn't think about that in this PR (didn't expect anyone working with this story), sorry.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, maybe it was related to the way the PR was squashed into trunk rather than something you did. I see in the first commit it was handled as a move - 847bf62

Ignore me 😄

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