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(core): facelift #4927

Merged
merged 163 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
bcbb70f
feat: studio facelift
robinpyon Dec 2, 2023
b9038e2
core(test-studio): remove custom branding and localised text
robinpyon Dec 3, 2023
1f09c1c
fix: add localized text for shared dialog component
robinpyon Dec 3, 2023
8c6c144
fix: localize pane header back button tooltip
robinpyon Dec 3, 2023
7cd0a56
refactor: render plain text buttons in invalid and untyped value inputs
robinpyon Dec 3, 2023
38d1c37
feat: add common localized context menu button component
robinpyon Dec 3, 2023
b675972
refactor: change dialog i18n key
robinpyon Dec 3, 2023
f770183
refactor: remove unused components and i18n strings
robinpyon Dec 3, 2023
e146215
fix: localize search button tooltip text
robinpyon Dec 3, 2023
6da45af
fix: localize create new button tooltip in document pane headers
robinpyon Dec 3, 2023
77f1bb6
fix: localize create new document button
robinpyon Dec 3, 2023
f83e37f
fix: add localized text for common loader component
robinpyon Dec 3, 2023
d4d960d
fix: add localized text for review change button tooltips
robinpyon Dec 3, 2023
329b953
fix: localize untitled text in compact preview
robinpyon Dec 3, 2023
ffa4f8e
feat: update file and image input + placeholder styles
robinpyon Dec 3, 2023
3f8e400
feat: update delete confirm dialog styles, use compact cards
robinpyon Dec 3, 2023
68e9abe
fix: show checkmark on selected locale in locale menu
robinpyon Dec 4, 2023
4d2f5e3
fix: ensure media border styles are only applied on the targeted elem…
robinpyon Dec 4, 2023
d4793fe
fix: update create new button localized text
robinpyon Dec 4, 2023
db18b80
fix: add clarifying comments on container query support, reverse head…
robinpyon Dec 4, 2023
cc29ad5
chore(deps): bump @sanity/ui
robinpyon Dec 5, 2023
a9d2618
feat: update user menu and presence menu items with new avatar sizes
robinpyon Dec 5, 2023
833de2e
fix: add localized text for config issue tooltip button (fixes edx-859)
robinpyon Dec 5, 2023
accf580
chore: fix typos
robinpyon Dec 5, 2023
ecb6056
feat: update image + file asset source styling
robinpyon Dec 5, 2023
0e701bb
fix: re-enable buildLegacyTheme (fixes edx-857)
robinpyon Dec 5, 2023
ec2e3ad
fix: tweak navbar padding, minor cleanup
robinpyon Dec 5, 2023
35a8be0
fix: fix back button alignment on smaller breakpoints, tweak search s…
robinpyon Dec 5, 2023
5c424ff
fix: localize document actions button tooltip, update ContextMenuButt…
robinpyon Dec 5, 2023
80fadca
fix: remove subtitle support from studio UI menu items, update layout…
robinpyon Dec 5, 2023
20412c7
chore(deps): bump @sanity/ui in other studios
robinpyon Dec 6, 2023
0742e84
fixup! fix: remove subtitle support from studio UI menu items, update…
robinpyon Dec 6, 2023
f7755c4
chore(deps): bump @sanity/ui
robinpyon Dec 6, 2023
4b6a0a3
feat: use smaller font size for hotkey + badge text in menu items and…
robinpyon Dec 6, 2023
68eda90
fix: tweak placement for workspace + presence menu tooltips
robinpyon Dec 6, 2023
66d81a7
refactor: use studio UI buttons, remove unused components
robinpyon Dec 6, 2023
21ddb41
test: add test ids to PTE toolbar component, fix failing ct test
robinpyon Dec 6, 2023
8d65bea
fix: use relative paths for core imports
robinpyon Dec 6, 2023
3d25aa6
fix: hide loading text in generic loader by default, tweak timings, u…
robinpyon Dec 6, 2023
349748e
fix: minor regression with menu item spacing
robinpyon Dec 6, 2023
60cb589
fix: remove extraneous padding on manage members menu item
robinpyon Dec 6, 2023
bfd18b3
fix: use localized relative time hook
robinpyon Dec 6, 2023
54afefb
feat: align search popover overlay background with dialog
robinpyon Dec 6, 2023
e559fa6
fix: ensure field names correctly truncate in search filter tooltips
robinpyon Dec 6, 2023
0393b49
fix: use correct focus ring offset + width for list panes + comment p…
robinpyon Dec 7, 2023
17d06a2
fix: use single pixel border for document banners
robinpyon Dec 7, 2023
d88bf76
feat: update font styles for no search results + insufficient permiss…
robinpyon Dec 7, 2023
c106d1e
feat: DRY document banners and update styles, create dedicated spacer…
robinpyon Dec 7, 2023
d1ce8fd
fix: large button size for remove field button
robinpyon Dec 7, 2023
68c0545
feat: update comments discard dialog styles
robinpyon Dec 7, 2023
4f3e845
refactor: simplify useDocumentStatusTimeAgo
robinpyon Dec 7, 2023
2020648
fix(deps): upgrade `@sanity/color`
mariuslundgard Dec 7, 2023
4de1824
fix(deps): update `@sanity/ui`
mariuslundgard Dec 7, 2023
1b72e5f
fix(studio): update navbar spacing
mariuslundgard Dec 7, 2023
99d189e
fix(deps): update `@sanity/ui`
mariuslundgard Dec 7, 2023
7f23c6e
fix: localize drag handle button, use correct delay values
robinpyon Dec 7, 2023
fab3c88
fix: add padding to workspace auth page, tweak mobile nav drawer
robinpyon Dec 7, 2023
d768e5d
fix: new presence menu item avatar sizes
robinpyon Dec 7, 2023
7d8ab45
feat: add absolute tooltip dates to document statusbar, don't render …
robinpyon Dec 8, 2023
a9ae5c6
chore: update snapshots
robinpyon Dec 8, 2023
19e247c
fix(deps): update `@sanity/ui`
mariuslundgard Dec 8, 2023
1987450
fix(ui): fade preview when menu item is disabled
mariuslundgard Dec 8, 2023
2e2d83a
fix(studio): do not use experimental avatar status
mariuslundgard Dec 8, 2023
3276289
fix(studio): adjust avatar size in user menu
mariuslundgard Dec 8, 2023
6cf47e6
fix(form): align form field header
mariuslundgard Dec 8, 2023
8c27193
fix(form): simplify and set status color using theme v2
mariuslundgard Dec 8, 2023
8e06418
fix(ui): align tooltip
mariuslundgard Dec 8, 2023
8a9936b
feat: new document status indicator, lockup and tooltips
robinpyon Dec 8, 2023
5e1a1f5
fix: force useRelativeTime to always render idiomatic dates with week…
robinpyon Dec 8, 2023
f79922b
fix: use correct document status indicator colors, update document st…
robinpyon Dec 8, 2023
09fbadc
chore: update workshop story
robinpyon Dec 8, 2023
8dc4345
chore: update snapshots
robinpyon Dec 9, 2023
277d96c
refactor: remove TooltipWithNodes component, no longer infer aria-lab…
robinpyon Dec 11, 2023
b80d163
fix(deps): update `@sanity/ui`
mariuslundgard Dec 11, 2023
d7e5df6
fix(sanity): set `maximum-scale` viewport property
mariuslundgard Dec 12, 2023
3605963
fix(facelift): update i18n imports after rebase
pedrobonamin Dec 12, 2023
7c453c3
fix(facelift): update i18n ignore rules
pedrobonamin Dec 13, 2023
b44f50f
fix(studio): update change indicator
mariuslundgard Dec 13, 2023
9251f5f
fix(studio): update beta badge
mariuslundgard Dec 13, 2023
5595184
fix(studio): update preview components
mariuslundgard Dec 13, 2023
59a377f
fix(form): update date input and picker
mariuslundgard Dec 13, 2023
7c9b8a4
fix(form): use border instead of shadow for reference input
mariuslundgard Dec 13, 2023
1b1a978
fix(form): use border instead of shadow for file input
mariuslundgard Dec 13, 2023
c48d614
fix(studio): update global styles
mariuslundgard Dec 13, 2023
6021f93
fix(studio): decrease heading size in config issues dialog
mariuslundgard Dec 13, 2023
4eb480e
fix(ui): change copy from 'Updated' to 'Edited'
mariuslundgard Dec 13, 2023
9b8a6ee
fix(desk): always use icon for publish action
mariuslundgard Dec 13, 2023
6e20b26
fix(desk): update inspect dialog
mariuslundgard Dec 13, 2023
ab72c03
fix(desk): align pane header
mariuslundgard Dec 13, 2023
3072162
fix(desk): use json icon
mariuslundgard Dec 13, 2023
b765938
fix(desk): align document actions
mariuslundgard Dec 13, 2023
9e5f186
fix(ui): update document status components
mariuslundgard Dec 13, 2023
e2fab2a
fix(desk): align comment feature feedback
mariuslundgard Dec 13, 2023
5fc023a
fix(deps): update `@sanity/icons`
mariuslundgard Dec 13, 2023
936395d
test(test-studio): update config
mariuslundgard Dec 13, 2023
b31ff9d
test(studio): update snapshot
mariuslundgard Dec 13, 2023
9916fac
fix(form): align elements
mariuslundgard Dec 13, 2023
606cfb4
fix(i18n): simplify copy
mariuslundgard Dec 13, 2023
d2a0507
fix(desk): align id container
mariuslundgard Dec 13, 2023
f69a3e8
fix(ui): include `paddingY` property
mariuslundgard Dec 13, 2023
e56afce
fix(desk): simplify copy
mariuslundgard Dec 13, 2023
0bd6326
fix(ui): align document status
mariuslundgard Dec 13, 2023
f343b5e
fix(studio): simplify `TextWithTone` component
mariuslundgard Dec 13, 2023
6c4b928
fix(desk): align document status bar
mariuslundgard Dec 13, 2023
a49759e
fix(studio): update scrollbar style
mariuslundgard Dec 13, 2023
2fce521
fixup! fix(studio): update scrollbar style
mariuslundgard Dec 13, 2023
19a9b22
fix(deps): update `@sanity/ui`
robinpyon Dec 13, 2023
cf03f7c
fix: update global search date picker styles, remove unused LazyTextI…
robinpyon Dec 13, 2023
73a628e
fix: use correct tooltip styling for search datetime errors, simplify…
robinpyon Dec 13, 2023
7c98fef
fix: expose document status indicator and tooltip in global search re…
robinpyon Dec 13, 2023
717612a
fix: update global search result item padding
robinpyon Dec 13, 2023
a7019e1
fix: re-use StatusButton component in mobile search header, localize …
robinpyon Dec 13, 2023
fba6800
fix: ensure focus is returned when closing search (defer focus handli…
robinpyon Dec 13, 2023
af055d0
fix: remove responsive styles from global search filters
robinpyon Dec 13, 2023
ec8b15c
chore: update snapshots
robinpyon Dec 13, 2023
66741c9
feat: animate search popover
robinpyon Dec 13, 2023
ca2d0b9
feat: add customized Popover and MenuItem components and enable anima…
robinpyon Dec 14, 2023
8b84b09
refactor: simplify tooltip usage in ActionMenuButton
robinpyon Dec 14, 2023
6aa5a57
feat: detach global search position from header
robinpyon Dec 14, 2023
6c3415f
fix(facelift): update focus ring offset in WithFocusRing cards
pedrobonamin Dec 14, 2023
3ac9c8d
fixup! fix(studio): update preview components
mariuslundgard Dec 14, 2023
c8c8844
fix(form): update pte styles
mariuslundgard Dec 14, 2023
7779bf8
fix(form): update border radius
mariuslundgard Dec 14, 2023
28d28fd
refactor(form): use theme v2
mariuslundgard Dec 14, 2023
36311bd
fix(studio): render smaller avatars in document previews
mariuslundgard Dec 14, 2023
ca0f791
fix(studio): set global selection color
mariuslundgard Dec 14, 2023
83fe9f8
fix(studio): increase button size in mobile search overlay
mariuslundgard Dec 14, 2023
d85f6fa
fix(deps): update `@sanity/ui`
mariuslundgard Dec 14, 2023
15e626c
fix: use updated background color for global search popover
robinpyon Dec 14, 2023
cff87b2
fix(studio): update default studio theme
mariuslundgard Dec 14, 2023
22b37d4
fix(studio): align navbar menus
mariuslundgard Dec 14, 2023
55cdb10
fix(deps): update @sanity/ui
pedrobonamin Dec 14, 2023
447f32b
fix(facelift): remove duplicated const after rebase
pedrobonamin Dec 14, 2023
3c1004a
fix(deps): update dependencies
mariuslundgard Dec 14, 2023
c111071
fix(preview): use icon color
mariuslundgard Dec 15, 2023
c17aba1
fix(tooltip): use regular font weight
mariuslundgard Dec 15, 2023
34fb020
fix(deps): update `@sanity/ui`
mariuslundgard Dec 15, 2023
8572585
fix(desk): add tooltip on menuitem when disabled only (#5375)
ninaandal Dec 15, 2023
5ce60aa
fix(ui): do not show dot on hover
mariuslundgard Dec 15, 2023
001414a
fix(core): fields actions position shift (#5348)
pedrobonamin Dec 15, 2023
3dc29ae
fix(facelift): self serve Inter font (#5374)
pedrobonamin Dec 15, 2023
ebb0f17
feat(desk): add responsive layout to document status bar
robinpyon Dec 16, 2023
ac242ac
feat(core): add locale switcher in navdrawer, update layout
robinpyon Dec 16, 2023
5eac967
chore(deps): update @sanity/ui
pedrobonamin Dec 16, 2023
03ce88b
fix(facelift): update free trial to match facelift
pedrobonamin Dec 16, 2023
ed6c521
fix(core/tests): fix failed tests (#5376)
ninaandal Dec 16, 2023
b83bf78
chore(colocation): update location of the new components (#5383)
pedrobonamin Dec 18, 2023
68621df
fix(desk): update DeskRename popover
pedrobonamin Dec 18, 2023
be7d84a
chore(deps): update @sanity/ui
pedrobonamin Dec 18, 2023
e21cfdf
fix: hide document status dot for published documents with no edits
robinpyon Dec 18, 2023
4b995c8
fix(core): updates after rebase
pedrobonamin Dec 19, 2023
8d07a9c
fix(tests): fix studio.spec test
pedrobonamin Dec 19, 2023
cf7e133
fix(comments): update spacing for SpacerAvatar
pedrobonamin Dec 19, 2023
cc14d7d
fix(tests): remove studio.components.logo test
pedrobonamin Dec 19, 2023
9865dc7
fix(test-studio): remove i18n.loadNamespaces function
pedrobonamin Dec 19, 2023
373dd95
fix(core): newDocumentButton filter not working in mobile
pedrobonamin Dec 19, 2023
6f0a688
fix(core): update corsOriginErroScreen
pedrobonamin Dec 19, 2023
52e64bb
chore(cleanup): clean pr changes
pedrobonamin Dec 19, 2023
434c239
chore(i18n): restore removed keys
pedrobonamin Dec 19, 2023
e914c84
fix(i18n): translate DocumentStatus
pedrobonamin Dec 19, 2023
eb4a242
fix(tests): add react reference to fix broken test
pedrobonamin Dec 19, 2023
a0df360
fix(core): update changes inspector revert confirmation popovers (#5398)
pedrobonamin Dec 19, 2023
20e617e
chore(deps): update sanity/presentation package
pedrobonamin Dec 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const config = {
{
ignores: {
componentPatterns: ['motion$'],
attributes: ['animate', 'closed', 'exit', 'fill', 'full', 'initial', 'size'],
},
},
],
Expand Down Expand Up @@ -231,6 +232,43 @@ const config = {
'@sanity/i18n/no-attribute-template-literals': 'off',
},
},

// Prefer local components vs certain @sanity/ui imports (in sanity package)
{
files: ['packages/sanity/**'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@sanity/ui',
importNames: [
'Button',
'ButtonProps',
'Dialog',
'DialogProps',
'MenuButton',
'MenuButtonProps',
'MenuGroup',
'MenuGroupProps',
'MenuItem',
'MenuItemProps',
'Popover',
'PopoverProps',
'Tab',
'TabProps',
'Tooltip',
'TooltipProps',
],
message:
'Please use the (more opinionated) exported components in sanity/src/ui-components instead.',
},
],
},
],
},
},
],
}

Expand Down
4 changes: 2 additions & 2 deletions dev/design-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"start": "../.bin/sanity start --port 4000"
},
"dependencies": {
"@sanity/icons": "^2.6.0",
"@sanity/ui": "^1.9.3",
"@sanity/icons": "^2.8.0",
"@sanity/ui": "2.0.0-beta.13",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sanity": "3.22.1",
Expand Down
2 changes: 1 addition & 1 deletion dev/embedded-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "vite preview"
},
"dependencies": {
"@sanity/ui": "1.9.3",
"@sanity/ui": "2.0.0-beta.13",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sanity": "3.22.1",
Expand Down
2 changes: 0 additions & 2 deletions dev/studio-e2e-testing/components-api/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const childComponents = definePlugin({
studio: {
components: {
layout: (props) => <StudioLayout {...props} testId="child-parent-config-studio-layout" />,
logo: (props) => <StudioLogo {...props} testId="child-parent-config-studio-logo" />,
navbar: (props) => <StudioNavbar {...props} testId="child-parent-config-studio-navbar" />,
toolMenu: (props) => (
<StudioToolMenu {...props} testId="child-parent-config-studio-tool-menu" />
Expand Down Expand Up @@ -58,7 +57,6 @@ export const customComponents = definePlugin({
studio: {
components: {
layout: (props) => <StudioLayout {...props} testId="parent-config-studio-layout" />,
logo: (props) => <StudioLogo {...props} testId="parent-config-studio-logo" />,
navbar: (props) => <StudioNavbar {...props} testId="parent-config-studio-navbar" />,
toolMenu: (props) => <StudioToolMenu {...props} testId="parent-config-studio-tool-menu" />,
},
Expand Down
4 changes: 2 additions & 2 deletions dev/studio-e2e-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"dependencies": {
"@sanity/google-maps-input": "^3.0.1",
"@sanity/icons": "^2.4.0",
"@sanity/ui": "^1.9.3",
"@sanity/icons": "^2.8.0",
"@sanity/ui": "2.0.0-beta.13",
"@sanity/vision": "3.22.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
12 changes: 0 additions & 12 deletions dev/test-studio/components/Branding.tsx

This file was deleted.

10 changes: 7 additions & 3 deletions dev/test-studio/components/documentViews/jsonPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import {Card, Code} from '@sanity/ui'
import {Box, Card, Code} from '@sanity/ui'
import React from 'react'

export function JSONPreviewDocumentView(props: any) {
return (
<Card padding={4} sizing="border" style={{minHeight: '100%'}} tone="transparent">
<Code language="json">{JSON.stringify(props.document.displayed, null, 2)}</Code>
<Card overflow="auto" style={{minHeight: '100%'}} tone="transparent">
<Box padding={4}>
<Code language="json" size={1}>
{JSON.stringify(props.document.displayed, null, 2)}
</Code>
</Box>
</Card>
)
}
7 changes: 7 additions & 0 deletions dev/test-studio/components/formComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ export function Preview(props: PreviewProps) {
)
}

export function CustomBadge() {
return {
label: 'Hello world',
title: 'Hello I am a custom document badge',
}
}

export const formComponentsPlugin = definePlugin({
name: 'form-components-plugin',
form: {
Expand Down
24 changes: 14 additions & 10 deletions dev/test-studio/components/panes/debug/DebugPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ export const DebugPane: UserComponent = function DebugPane(props) {

return (
<Box height="fill">
<Card padding={3} tone="transparent">
<Stack space={2}>
<Text textOverflow="ellipsis">
<Box padding={4} paddingTop={0}>
<Stack space={3}>
<Text muted size={1} textOverflow="ellipsis">
Random ID: <code>{randomId}</code>
</Text>
<Text textOverflow="ellipsis" size={1} muted>
Assigned on pane component mount
</Text>
</Stack>
</Card>
</Box>

<Card borderBottom padding={2}>
<Stack space={1}>
Expand All @@ -74,15 +74,17 @@ export const DebugPane: UserComponent = function DebugPane(props) {
>
<Flex>
<Box>
<Text>
<Text size={1}>
<LinkIcon />
</Text>
</Box>
<Box flex={1} marginLeft={3}>
<Text textOverflow="ellipsis">ChildLink</Text>
<Text size={1} textOverflow="ellipsis">
ChildLink
</Text>
</Box>
<Box>
<Text>
<Text size={1}>
<ChevronRightIcon />
</Text>
</Box>
Expand All @@ -98,15 +100,17 @@ export const DebugPane: UserComponent = function DebugPane(props) {
>
<Flex>
<Box>
<Text>
<Text size={1}>
<ControlsIcon />
</Text>
</Box>
<Box flex={1} marginLeft={3}>
<Text textOverflow="ellipsis">ParameterizedLink</Text>
<Text size={1} textOverflow="ellipsis">
ParameterizedLink
</Text>
</Box>
<Box>
<Text>
<Text size={1}>
<ChevronDownIcon />
</Text>
</Box>
Expand Down
2 changes: 0 additions & 2 deletions dev/test-studio/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {defineLocaleResourceBundle} from 'sanity'
export const testStudioLocaleNamespace = 'testStudio' as const

const enUSStrings = {
'studio.logo.title': 'English logo',
'structure.root.title': 'Content 🇺🇸',
'translate.example':
'<Icon/> Your search for "<Red>{{keyword}}</Red>" took <Bold>{{duration}}ms</Bold>',
Expand All @@ -20,7 +19,6 @@ const nbNO = defineLocaleResourceBundle({
locale: 'nb-NO',
namespace: testStudioLocaleNamespace,
resources: {
'studio.logo.title': 'Norsk logo',
'structure.root.title': 'Innhold 🇳🇴',
'translate.example':
'<Icon/> Ditt søk på "<Red>{{keyword}}</Red>" tok <Bold>{{duration}}</Bold> millisekunder',
Expand Down
7 changes: 4 additions & 3 deletions dev/test-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@
"@sanity/assist": "^1.0.8",
"@sanity/block-tools": "3.22.1",
"@sanity/client": "^6.10.0",
"@sanity/color": "^2.1.20",
"@sanity/color": "3.0.0-beta.9",
"@sanity/google-maps-input": "^3.0.1",
"@sanity/icons": "^2.6.0",
"@sanity/icons": "^2.8.0",
"@sanity/image-url": "^1.0.2",
"@sanity/locale-ko-kr": "^1.0.0",
"@sanity/locale-nb-no": "^1.0.0",
"@sanity/locale-nn-no": "^1.0.0",
"@sanity/locale-pt-pt": "^1.0.0",
"@sanity/locale-sv-se": "^1.0.0",
"@sanity/logos": "^2.0.2",
"@sanity/portable-text-editor": "3.22.1",
"@sanity/tsdoc": "1.0.0-alpha.38",
"@sanity/types": "3.22.1",
"@sanity/ui": "^1.9.3",
"@sanity/ui": "2.0.0-beta.13",
"@sanity/ui-workshop": "^1.0.0",
"@sanity/util": "3.22.1",
"@sanity/uuid": "^3.0.1",
Expand Down
10 changes: 4 additions & 6 deletions dev/test-studio/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {BookIcon} from '@sanity/icons'
import {SanityMonogram} from '@sanity/logos'
import {visionTool} from '@sanity/vision'
import {defineConfig, definePlugin} from 'sanity'
import {deskTool} from 'sanity/desk'
Expand All @@ -13,7 +14,6 @@ import {ptPTLocale} from '@sanity/locale-pt-pt'
import {svSELocale} from '@sanity/locale-sv-se'
import {theme as tailwindTheme} from './sanity.theme.mjs'
import {imageAssetSource} from './assetSources'
import {Branding} from './components/Branding'
import {resolveDocumentActions as documentActions} from './documentActions'
import {resolveInitialValueTemplates} from './initialValueTemplates'
import {languageFilter} from './plugins/language-filter'
Expand All @@ -31,6 +31,7 @@ import {
import {
Annotation,
Block,
CustomBadge,
Field,
formComponentsPlugin,
InlineBlock,
Expand Down Expand Up @@ -62,11 +63,6 @@ const sharedSettings = definePlugin({
assetSources: [imageAssetSource],
},
},
studio: {
components: {
logo: Branding,
},
},

i18n: {
bundles: testStudioLocaleBundles,
Expand All @@ -93,6 +89,7 @@ const sharedSettings = definePlugin({
unstable_comments: {
enabled: true,
},
badges: (prev, context) => (context.schemaType === 'author' ? [CustomBadge, ...prev] : prev),
},
plugins: [
// ...localePlugins,
Expand Down Expand Up @@ -148,6 +145,7 @@ export default defineConfig([
dataset: 'test',
plugins: [sharedSettings()],
basePath: '/test',
icon: SanityMonogram,
},
{
name: 'tsdoc',
Expand Down
12 changes: 12 additions & 0 deletions dev/test-studio/schema/book.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ export default {
},
],
},
{
name: 'genre',
title: 'Genre',
type: 'string',
options: {
list: [
{title: 'Fiction', value: 'fiction'},
{title: 'Non Fiction', value: 'nonfiction'},
{title: 'Poetry', value: 'poetry'},
],
},
},
],
orderings: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/ecommerce-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@sanity/cli": "3.22.1",
"@sanity/ui": "^1.9.3",
"@sanity/ui": "2.0.0-beta.13",
"react": "^18.2.0",
"react-barcode": "^1.4.1",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/portable-text-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@playwright/test": "^1.39.0",
"@portabletext/toolkit": "^2.0.10",
"@sanity/diff-match-patch": "^3.1.1",
"@sanity/ui": "^1.9.3",
"@sanity/ui": "2.0.0-beta.13",
"@testing-library/react": "^13.4.0",
"@types/debug": "^4.1.5",
"@types/express": "^4.16.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/@sanity/vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
"@lezer/highlight": "^1.0.0",
"@rexxars/react-json-inspector": "^8.0.1",
"@rexxars/react-split-pane": "^0.1.93",
"@sanity/color": "^2.1.20",
"@sanity/icons": "^2.6.0",
"@sanity/ui": "^1.9.3",
"@sanity/color": "3.0.0-beta.9",
"@sanity/icons": "^2.8.0",
"@sanity/ui": "2.0.0-beta.13",
"@uiw/react-codemirror": "^4.11.4",
"hashlru": "^2.3.0",
"is-hotkey": "^0.1.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled, {css} from 'styled-components'
import {Button, Card, Box, Flex, Label, Theme, rem} from '@sanity/ui'
import {Card, Box, Flex, Label, rem} from '@sanity/ui'

export const Root = styled(Flex)`
.sidebarPanes .Pane {
Expand Down Expand Up @@ -154,7 +154,3 @@ export const TimingsTextContainer = styled(Flex)`
export const ControlsContainer = styled(Box)`
border-top: 1px solid var(--card-border-color);
`

export const ButtonFullWidth = styled(Button)`
width: 100%;
`
Loading
Loading