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(types): correct ArrayOptions #6737

Merged
merged 1 commit into from
May 30, 2024
Merged

fix(types): correct ArrayOptions #6737

merged 1 commit into from
May 30, 2024

Conversation

christianhg
Copy link
Contributor

@christianhg christianhg commented May 22, 2024

  • Removed the comment about layout since it's confusing/wrong. The grid option also works for a string array.
  • Added list as a valid layout option. Even though it's the default, it feels weird that you can't specify it manually.
  • Removed direction since it doesn't seem to do anything. Maybe it's old?

I realise that (a) this might be a bold change and (b) I might have no idea what I'm doing since I'm relatively new here, but these changes are based on my observations as I work with the Array schema type and read through https://www.sanity.io/docs/array-type

Copy link

vercel bot commented May 22, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 10:36am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 10:36am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 10:36am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2024 10:36am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview May 30, 2024 10:36am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented May 22, 2024

Component Testing Report Updated May 30, 2024 10:38 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 17s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 4s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 21s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 30s 12 0 0

@christianhg christianhg marked this pull request as ready for review May 22, 2024 13:43
@christianhg christianhg requested a review from a team as a code owner May 22, 2024 13:43
@christianhg christianhg requested review from juice49 and removed request for a team May 22, 2024 13:43
@rexxars rexxars changed the title fix(sanity): adjust ArrayOptions fix(types): correct ArrayOptions May 22, 2024
Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

Thanks, Christian! This looks great, and does more closely reflect the underlying functionality.

Instead of removing direction, please can you mark is as deprecated? Removing it is technically a breaking change to the API, even though it doesn't actually do anything.

@christianhg
Copy link
Contributor Author

Thanks, Christian! This looks great, and does more closely reflect the underlying functionality.

Instead of removing direction, please can you mark is as deprecated? Removing it is technically a breaking change to the API, even though it doesn't actually do anything.

Thanks for the feedback! I've deprecated the option now, instead of removing it.

- Removed the comment about `layout` since it's confusing/wrong. The `grid`
  option also works for a string array.
- Added `list` as a valid `layout` option. Even though it's the default, it
  feels weird that you can't specify it manually.
- Deprecated `direction` since it doesn't do anything anymore.
Copy link
Contributor

@juice49 juice49 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

@christianhg
Copy link
Contributor Author

Looks good to me. Thanks!

Thank you! Feel free to merge it on my behalf. I don't have permissions to do so.

@juice49 juice49 added this pull request to the merge queue May 30, 2024
Merged via the queue into next with commit 39da169 May 30, 2024
40 of 42 checks passed
@juice49 juice49 deleted the adjust-array-options branch May 30, 2024 10:43
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.

None yet

2 participants