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

feat(facelift): create menu item StudioUI #5090

Merged
merged 8 commits into from
Nov 2, 2023

Conversation

pedrobonamin
Copy link
Contributor

Description

Introduces StudioUI menu item, adding defaults to create the menu items.
Updates all the uses of menu items to use the new menu item.
Removes the need to define complex children when using menu items within the Studio.
tries to discourage the use of children prop for the menu item, making developers specifically opt out.

What to review

  • Menu item uses.
  • Publish actions menu items, using the renderMenuItem prop to support custom wrappers (e.g. tooltip)
  • Workspace menu item continues using the old design, confirm if it should be updated or not.

Notes for release

Introduces StudioUI menu item, adding defaults to create the menu items.

@vercel
Copy link

vercel bot commented Oct 30, 2023

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Nov 2, 2023 4:16pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2023 4:16pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 4:16pm

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2023

Package Documentation Change
sanity -9%
@sanity/types -13%
Full Report
@sanity/diff
This branch Next branch
13 documented 13 documented
16 not documented 16 not documented
@sanity/block-tools
This branch Next branch
4 documented 4 documented
9 not documented 9 not documented
sanity/desk
This branch Next branch
83 documented 83 documented
55 not documented 55 not documented
@sanity/portable-text-editor
This branch Next branch
21 documented 21 documented
44 not documented 44 not documented
@sanity/mutator
This branch Next branch
7 documented 7 documented
4 not documented 4 not documented
@sanity/cli
This branch Next branch
1 documented 1 documented
30 not documented 30 not documented
@sanity/schema/_internal
This branch Next branch
0 documented 0 documented
9 not documented 9 not documented
@sanity/util/paths
This branch Next branch
1 documented 1 documented
15 not documented 15 not documented
sanity/router
This branch Next branch
15 documented 15 documented
21 not documented 21 not documented
@sanity/util/legacyDateFormat
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
@sanity/schema
This branch Next branch
0 documented 0 documented
2 not documented 2 not documented
sanity/cli
This branch Next branch
2 documented 2 documented
0 not documented 0 not documented
@sanity/vision
This branch Next branch
0 documented 0 documented
2 not documented 2 not documented
@sanity/util/fs
This branch Next branch
0 documented 0 documented
3 not documented 3 not documented
sanity/_internal
This branch Next branch
0 documented 0 documented
1 not documented 1 not documented
@sanity/util/content
This branch Next branch
1 documented 1 documented
5 not documented 5 not documented
sanity
This branch Next branch
110 documented 122 documented
834 not documented 829 not documented
@sanity/types
This branch Next branch
46 documented 53 documented
240 not documented 233 not documented

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2023

Component Testing Report Updated Nov 2, 2023 4:16 PM (UTC)

File Status Duration Passed Skipped Failed
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 4s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 6s 6 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 7s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 31s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 6s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 4s 3 0 0

Copy link
Contributor

@ninaandal ninaandal left a comment

Choose a reason for hiding this comment

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

lgtm 🎉

Copy link
Contributor

@robinpyon robinpyon left a comment

Choose a reason for hiding this comment

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

Thanks @pedrobonamin – left some comments, would love your thoughts here

packages/sanity/src/ui/menuItem/MenuItem.tsx Outdated Show resolved Hide resolved
packages/sanity/src/ui/menuItem/MenuItem.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@robinpyon robinpyon left a comment

Choose a reason for hiding this comment

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

Thanks @pedrobonamin, this looks great!

@pedrobonamin pedrobonamin merged commit 8158fb7 into feat/facelift-mvi-2 Nov 2, 2023
17 checks passed
@pedrobonamin pedrobonamin deleted the EDX-635-menu-items branch November 2, 2023 17:09
robinpyon pushed a commit that referenced this pull request Nov 2, 2023
* feat(facelift): create menu item StudioUI

* fix(facelift): refactor workspace preview to use large menu item

* fix(facelift): support icon right in large menu item

* feat(facelift): update StudioUI Menu item props, remove size

* feat(facelift): add Studio UI menu item stories

* fix(tests): update snapshot
robinpyon pushed a commit that referenced this pull request Nov 3, 2023
* feat(facelift): create menu item StudioUI

* fix(facelift): refactor workspace preview to use large menu item

* fix(facelift): support icon right in large menu item

* feat(facelift): update StudioUI Menu item props, remove size

* feat(facelift): add Studio UI menu item stories

* fix(tests): update snapshot
robinpyon pushed a commit that referenced this pull request Nov 8, 2023
* feat(facelift): create menu item StudioUI

* fix(facelift): refactor workspace preview to use large menu item

* fix(facelift): support icon right in large menu item

* feat(facelift): update StudioUI Menu item props, remove size

* feat(facelift): add Studio UI menu item stories

* fix(tests): update snapshot
robinpyon pushed a commit that referenced this pull request Nov 18, 2023
* feat(facelift): create menu item StudioUI

* fix(facelift): refactor workspace preview to use large menu item

* fix(facelift): support icon right in large menu item

* feat(facelift): update StudioUI Menu item props, remove size

* feat(facelift): add Studio UI menu item stories

* fix(tests): update snapshot
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.

3 participants