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

fix(form): fix issue where FormInput was not rendering field when passed 'includeField' #7350

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Aug 9, 2024

Description

Currently using FormInput with includeField does not work for nested fields. This PR fixes the issue, and also adds proper support for includeItem so fields and array items works the same way.

What to review

Repro steps, current (broken) behavior:

  • Go to the playground in the preview build without the fix here
  • Scroll down to the Nested -> Nested field and click the "eye"-icon to put it in "attention mode"
  • Then hit the "Include Field" checkbox
  • Observe that the field is not rendered (bad)

Repro steps with fix applied:

  • Go to the playground in the preview build with the fix included here
  • Scroll down to the Nested -> Nested field and click the "eye"-icon to put it in "attention mode"
  • Then hit the "Include Field" checkbox
  • Observe that the field is rendered (good)

Note: during testing I found that includeItem didn't quite work as expected with treeArrayEditing enabled, assuming it's due to the beta status of that feature.

Testing

Included a test document type named formInputTest that is placed under V3 APIs in the test-studio structure (link).

Notes for release

  • Fixes an issue with FormInput causing includeField to not have any effect for nested paths.

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:40am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:40am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:40am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:40am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 11:40am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Aug 12, 2024 11:40am

@bjoerge bjoerge changed the title Sdx 1527 fix(form): fix issue where FormInput was not rendering field when passed 'includeField' Aug 9, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Aug 9, 2024

Component Testing Report Updated Aug 12, 2024 11:49 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 43s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 36s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 47s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 8s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 26s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 1m 23s 20 0 1
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 1m 48s 30 0 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 19s 3 0 0

Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

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

Appreciate the clarity of repro steps and usage, this is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants