sanity
sanity copied to clipboard
feat: added string/text to block converters
Description
Added converter for when a schema field changes type from string/text to portable text
To check if the field is of type block and not just array we need to check it in the MemberFieldError component. This is checked by seeing if any of the objects in the array is of type "block".
What to review
- Create a field of type string/test
- Add content to the field
- Publish document
- Change field type to array with of type 'block'
- You should now see a "Convert to portableText" button
- Click it
- The data should be transformed into portable text spans
For text that is multiline, there should be multiple portable text spans.
Notes for release
tbd
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
performance-studio | ✅ Ready (Inspect) | Visit Preview | Nov 28, 2023 2:22pm |
test-studio | ✅ Ready (Inspect) | Visit Preview | Nov 28, 2023 2:22pm |
1 Ignored Deployment
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
studio-workshop | ⬜️ Ignored (Inspect) | Nov 28, 2023 2:22pm |
No changes to documentation
Component Testing Report Updated Nov 28, 2023 2:27 PM (UTC)
File | Status | Duration | Passed | Skipped | Failed |
---|---|---|---|---|---|
comments/CommentInput.spec.tsx | ✅ Passed (Inspect) | 17s | 15 | 0 | 0 |
formBuilder/ArrayInput.spec.tsx | ✅ Passed (Inspect) | 2s | 3 | 0 | 0 |
formBuilder/inputs/PortableText/Annotations.spec.tsx | ✅ Passed (Inspect) | 8s | 3 | 0 | 0 |
formBuilder/inputs/PortableText/Decorators.spec.tsx | ✅ Passed (Inspect) | 6s | 6 | 0 | 0 |
formBuilder/inputs/PortableText/FocusTracking.spec.tsx | ✅ Passed (Inspect) | 16s | 15 | 0 | 0 |
formBuilder/inputs/PortableText/Input.spec.tsx | ✅ Passed (Inspect) | 8s | 9 | 0 | 0 |
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx | ✅ Passed (Inspect) | 39s | 18 | 0 | 0 |
formBuilder/inputs/PortableText/Styles.spec.tsx | ✅ Passed (Inspect) | 6s | 6 | 0 | 0 |
formBuilder/inputs/PortableText/Toolbar.spec.tsx | ✅ Passed (Inspect) | 3s | 3 | 0 | 0 |