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: corel #7011

Draft
wants to merge 349 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
349 commits
Select commit Hold shift + click to select a range
12267df
feat(tasks): link tasks to the version documents
pedrobonamin Aug 26, 2024
9404d2b
refactor(sanity): add changes to allow for comments in version docume…
RitaDias Aug 27, 2024
0f46f32
fix(core): update how bundleSlug is obtained from the version ids (#7…
pedrobonamin Aug 28, 2024
9dfc7ca
feat: improve telemetry debugging
bjoerge Aug 28, 2024
d7683bc
fix(sanity): fix issue on useGetbundleSlug
RitaDias Aug 29, 2024
ef75e21
fix(core): remove bundle slugs in favor of bundle id (#7427)
bjoerge Aug 30, 2024
3957e82
fixup! fix(core): remove bundle slugs in favor of bundle id (#7427)
bjoerge Aug 30, 2024
c9dc8f0
fixup! fix(core): remove bundle slugs in favor of bundle id (#7427)
bjoerge Aug 30, 2024
7d070e3
fixup! fix(core): remove bundle slugs in favor of bundle id (#7427)
bjoerge Aug 30, 2024
04f9fc2
fix(core): version document's history was returning error (#7438)
jordanl17 Aug 30, 2024
9dd29a2
feat(sanity): add telemetry for versions (#7460)
RitaDias Sep 4, 2024
5d44e66
fix(core): update useReleaseHistory to fetch with the version documen…
pedrobonamin Sep 4, 2024
cb019df
feat(sanity): rename `newVersion` operation to `createVersion`
juice49 Sep 4, 2024
3c2b805
fix(core): update intent link for releases tool (#7468)
pedrobonamin Sep 5, 2024
2a08b00
feat(sanity): update document footer for versions (#7466)
RitaDias Sep 9, 2024
21b31c7
refactor(sanity, release): rename interface focused components from b…
RitaDias Sep 10, 2024
f3283b1
feat(sanity): #TEMPORARY use API vX
juice49 Aug 15, 2024
ff0d61f
feat: #TEMPORARY use `@sanity/client@bundle-perspective`
juice49 Sep 2, 2024
84ed316
feat(sanity): adopt `bundlePerspective` for listing documents
juice49 Aug 15, 2024
1956113
feat(sanity): move perspective resolution to `resolvePerspective` fun…
juice49 Sep 13, 2024
f30b97e
chore(releases): moving from bundles to releases directory (#7500)
jordanl17 Sep 20, 2024
177e88b
Revert "Revert "chore: support for sticky params in URL and intent op…
juice49 Oct 4, 2024
be62cd3
chore(sanity): remove unused import
juice49 Oct 15, 2024
ea825b6
chore(sanity): remove unused bindings
juice49 Oct 15, 2024
6e469b6
chore: merge next into corel
bjoerge Oct 16, 2024
553f124
test(sanity): migrate tests to vitest
bjoerge Oct 15, 2024
98775b4
chore: merge 'next' into corel
bjoerge Oct 16, 2024
c447904
fixup! chore: merge next into corel
bjoerge Oct 16, 2024
2d61ba3
fixup! chore: merge next into corel
bjoerge Oct 16, 2024
2824f70
fixup! chore: merge next into corel
bjoerge Oct 16, 2024
683ead0
fixup! chore: merge next into corel
bjoerge Oct 16, 2024
2647619
fixup! chore: merge next into corel
bjoerge Oct 16, 2024
ea3adca
feat(sanity): add release types (#7619)
RitaDias Oct 16, 2024
c3cb68f
test(sanity): update tests after merge
RitaDias Oct 17, 2024
9ab4674
fix: #TEMPORARY `@sanity/client@bundle-perspective` override
juice49 Oct 17, 2024
4eb28c0
fix(structure): add perspective to swr memo key
bjoerge Oct 17, 2024
32c2a40
chore(sanity): add release type const to utils
RitaDias Oct 18, 2024
f1b310f
fix(sanity): add check for when bundleid is published to set publishe…
RitaDias Oct 18, 2024
8aa9490
chore(corel): remove delete bundle action from releasesMenuButton
pedrobonamin Oct 14, 2024
944d67d
fix(core): add sanity/ui and sanity/icons local packages
pedrobonamin Oct 14, 2024
8a3cd00
feat(corel): update releases detail screen
pedrobonamin Oct 14, 2024
3048970
feat(sanity): enable full-bleed tables
juice49 Oct 16, 2024
61ac0d8
fix(sanity): use new release type strings
juice49 Oct 17, 2024
3fb444f
chore(sanity): #TEMPORARY expect TS errors while using `@sanity/ui` a…
juice49 Oct 17, 2024
c80e628
feat: global perspective picker facelift (#7629)
jordanl17 Oct 18, 2024
dfdf6a7
feat: tone of navbar derived from current selected release type (#7632)
jordanl17 Oct 18, 2024
93b4200
fix(sanity): ensure version is passed through document store methods
juice49 Oct 19, 2024
6e8af86
fix(sanity): include version events in pair listener
juice49 Oct 20, 2024
b85334d
feat(sanity): add document version chips and menus
RitaDias Oct 4, 2024
49c9025
chore(sanity): fix build issues
RitaDias Oct 21, 2024
2ac068a
chore(sanity): remove unneded type const
RitaDias Oct 21, 2024
caea3b4
refactor(sanity): reuse already existing componets for dots in docume…
RitaDias Oct 21, 2024
d56b2c1
fix(sanity): issue where release tone was not being set correctly
RitaDias Oct 21, 2024
9def8c9
fix(sanity): open release intent link from popover menu
RitaDias Oct 21, 2024
4761ef5
chore(sanity): rename and change structure for components related to …
RitaDias Oct 21, 2024
7d9abd3
style(sanity): update list to allow for scrolling
RitaDias Oct 21, 2024
3d65c04
refactor(sanity): add ability to disable context menu items
RitaDias Oct 21, 2024
6b1dace
chore(sanity): remove unused prop icon from VersionChip
RitaDias Oct 21, 2024
1600099
fix(sanity): issue where when creating new doc, opening context menu …
RitaDias Oct 21, 2024
09ae163
refactor(sanity): update the chip for the from version in the create …
RitaDias Oct 21, 2024
144b32a
fix(sanity): issue where create version from publishing wasn't workin…
RitaDias Oct 21, 2024
f9b2334
chore(sanity): update telemetry origin
RitaDias Oct 21, 2024
7bc0acc
chore(sanity): update import type to fix typechecks
RitaDias Oct 21, 2024
f0eb9ef
test(sanity): fix issues with existing tests
RitaDias Oct 21, 2024
2d3430b
test(sanity): add tests for versionContextMenuItem
RitaDias Oct 21, 2024
df9d187
fix(sanity): add version id to `editState` SWR key
juice49 Oct 20, 2024
9dbac15
feat(sanity): add dedicated, stable router context object for perspec…
juice49 Oct 21, 2024
64b8ef1
chore(bundles): fix ts interface casing
bjoerge Oct 21, 2024
530441a
refactor(core): rename bundle => release
bjoerge Oct 21, 2024
9ecc4f6
refactor(releases): rename release operation methods from bundle => r…
bjoerge Oct 21, 2024
a128db1
chore(test): update imports and exports (use from package sanity vs r…
RitaDias Oct 22, 2024
fefa414
refactor: rename BundleDocument => ReleaseDocument
bjoerge Oct 22, 2024
4cbb672
test(sanity): fix test for VersionContextMenuItem
RitaDias Oct 22, 2024
083174f
test(sanity): add initial VersionContextMenu tests
RitaDias Oct 22, 2024
a7c3dd6
chore(sanity): clean up for unused code in CreateReleaseDialog
RitaDias Oct 22, 2024
73b5181
refactor(sanity): update translations on chip banners
RitaDias Oct 22, 2024
6794c01
fix(sanity): fix issue where context menu wasn't closing when copying…
RitaDias Oct 22, 2024
82141f7
feat(sanity): add useVersionOperations, replace createVersion and dis…
RitaDias Oct 22, 2024
ed74a74
fix(sanity): issue where creating a new release + version based on dr…
RitaDias Oct 23, 2024
760900e
Merge branch 'next' into corel
bjoerge Oct 23, 2024
904c978
Merge branch 'next' into corel
bjoerge Oct 23, 2024
fdbdd43
test(sanity): update prop for DocumentHeaderTitle test
RitaDias Oct 23, 2024
1e3ecc1
{wip} saved 2024-10-23 12:28
bjoerge Oct 23, 2024
1e86fbc
chore(releases): fix data-test-id casing
bjoerge Oct 23, 2024
3b9d5a3
refactor: remove circular imports
bjoerge Oct 23, 2024
20ebc45
feat(sanity): add document banner to add to release
RitaDias Oct 23, 2024
e986334
fix(sanity): fix import issue in VersionChip
RitaDias Oct 23, 2024
60d9b4e
chore(sanity): remove eslint disable
RitaDias Oct 23, 2024
01ef7ed
test(sanity): update versioncontextmenu
RitaDias Oct 23, 2024
740b987
refactor(releases): simplify releases overview and rename bundle => r…
bjoerge Oct 23, 2024
64e9589
refactor(releases): rename various references from bundle => release
bjoerge Oct 23, 2024
693e334
fix(store): fix broken query
bjoerge Oct 22, 2024
310e9bc
refactor(core): move to system(ish) document for release metadata
bjoerge Oct 22, 2024
afed067
fixup! refactor(core): move to system(ish) document for release metadata
bjoerge Oct 23, 2024
8ce5192
feat: releases overview facelift and calendar added (#7657)
jordanl17 Oct 23, 2024
04ea9fa
fix(sanity): update draftUtils and useDocumentVersions to work with t…
RitaDias Oct 24, 2024
c889772
fix(sanity): fix rendering the scheduled releases in the list
RitaDias Oct 24, 2024
144c3f3
fix(sanity): remove releasePrefix from getVersionfromId and getVersionId
RitaDias Oct 24, 2024
eb6c430
fix(releases): fix various bugs introduced by changing id of release …
bjoerge Oct 24, 2024
221043f
fix(sanity): add create version
RitaDias Oct 24, 2024
451acb0
fix: perspective menu, metadata aggregator and overview list style dr…
jordanl17 Oct 24, 2024
1291f3f
Merge branch 'corel' of github.com:sanity-io/sanity into corel
jordanl17 Oct 24, 2024
1c7aebe
fix(releases): fix various issues with global perspectives and bundle…
bjoerge Oct 24, 2024
6310e13
fix(releases): fix footer not detecting a bundle
bjoerge Oct 24, 2024
0f54d6b
feat(releases): sort by type of release when sorting by release type …
jordanl17 Oct 24, 2024
f6d421b
fix(releases): fix broken link when navigating to current release
bjoerge Oct 24, 2024
a127c36
fix(releases): fix build error
bjoerge Oct 24, 2024
9b9bea2
feat(releases): docs in a release display their action (added or chan…
jordanl17 Oct 24, 2024
ded53e9
refactor: resolving typo; using setPerspectiveFromRelease for usePers…
jordanl17 Oct 24, 2024
643a191
feat(sanity): add release layering foundations
juice49 Oct 24, 2024
d5ee85c
fix(sanity): omit `RELEASE_DOCUMENTS_PATH` prefix
juice49 Oct 24, 2024
eb5c288
fix(sanity): release detail document preview
juice49 Oct 24, 2024
70f5b5e
test(sanity): mock `router.perspectiveState`
juice49 Oct 24, 2024
d49aa11
test(sanity): remove defunct test
juice49 Oct 24, 2024
d2ee705
fix: creating perspective reference to avoid recreating releases stor…
jordanl17 Oct 25, 2024
f73e7be
fix: always sorting asap releases to start
jordanl17 Oct 25, 2024
19a622b
feat: animating the releases nav, to spice things up
jordanl17 Oct 25, 2024
9579130
fix: correcting conditional logic around release dashboard footer for…
jordanl17 Oct 25, 2024
9aa7e40
feat: some more animations
jordanl17 Oct 25, 2024
6b874ef
fix: slight animation timing tweak; typo fix
jordanl17 Oct 25, 2024
39c8b44
refactor(sanity): rename DocumentPerspectiveMenu to DocumentPerspecti…
RitaDias Oct 25, 2024
f81ac44
refactor(sanity): useDocumentVersions has been updated to avoid needl…
RitaDias Oct 25, 2024
53bc648
refactor(releases): move releaseOperationStore init out of react land
bjoerge Oct 25, 2024
7df293d
test: resolving async issue with observable in useDocumentVersions test
jordanl17 Oct 25, 2024
55e989a
fix: reducer action to update perspective for stack (#7675)
jordanl17 Oct 25, 2024
95d14a3
feat(sanity): update footer for versions, published and draft
RitaDias Oct 25, 2024
a01d8e7
feat: published perspective sets navbar tone
jordanl17 Oct 25, 2024
6efaf50
refactor(releases): minor naming fixes
bjoerge Oct 25, 2024
fd69a76
refactor(releases): don't track deleted releases
bjoerge Oct 25, 2024
719b0d9
feat(releases): global perspective release type grouped menu (#7677)
jordanl17 Oct 28, 2024
e1c49d3
feat(releases): UI for hiding prespective layers (#7678)
jordanl17 Oct 28, 2024
c7d99dd
fix: resolving misalignment of hide perspective on published
jordanl17 Oct 28, 2024
d41df1d
fix(releases): adjusting length of indicator on published perspective…
jordanl17 Oct 28, 2024
042f648
fix(releases): correctly formatting release times in global perspecti…
jordanl17 Oct 28, 2024
4b81a4c
feat: published indicator hides when all indicators are scroll hidden
jordanl17 Oct 28, 2024
bb9a972
feat(releases): schedule and unschedule releases
bjoerge Oct 28, 2024
68a30f1
Merge branch 'next' into corel
bjoerge Oct 28, 2024
c70c221
fix(releases): fix non-compatible esm import
bjoerge Oct 28, 2024
a89128f
fix: can pin scheduled in future releases
jordanl17 Oct 28, 2024
b30828d
fix: can pin scheduled in future releases
jordanl17 Oct 28, 2024
32a0bb5
feat(sanity): add document to a release from the release summary
RitaDias Oct 28, 2024
df0e800
fix: scheduling state shows correctly in release overview
jordanl17 Oct 28, 2024
d4db504
Merge branch 'corel' of github.com:sanity-io/sanity into corel
jordanl17 Oct 28, 2024
81c5fc3
feat(core): move bundlesPerspective to usePerspective hook, sort rele…
pedrobonamin Oct 28, 2024
45d50f6
fix(core): remove releases menu (#7684)
pedrobonamin Oct 28, 2024
3c8e417
feat(releases): quick and dirty archiving
bjoerge Oct 28, 2024
8b27d44
feat: supporting toggling perspective layer visibility (#7685)
jordanl17 Oct 28, 2024
7c412f8
fix: removing additional padding space on release nav label
jordanl17 Oct 28, 2024
76894c1
fix(structure): issue where the document actions were showing discard…
RitaDias Oct 29, 2024
ccdb82f
feat(core): add versions to references and status icons (#7690)
pedrobonamin Oct 29, 2024
6c0948a
refactor(releases): add telemetry to addDocumentSearch and fix issue …
RitaDias Oct 29, 2024
2b68550
chore(core): sort documentPerspectiveList from releases
pedrobonamin Oct 29, 2024
bb5dba1
fix(core): update DocumentStatusIndicator dots
pedrobonamin Oct 29, 2024
18b1a3a
fix: style padding on published perspective when no other releases av…
jordanl17 Oct 29, 2024
f13b7e3
fix: style padding on published perspective
jordanl17 Oct 29, 2024
88e1df9
fix(releases): issue with version chip flickering
RitaDias Oct 29, 2024
ccee3c4
fix(core): change import path for createSwr in useDocumentVersions
pedrobonamin Oct 29, 2024
51f321a
chore(releases): remove hue/icon from releases metadata
bjoerge Oct 29, 2024
e3c49dd
fix(releases): remove createdBy/publishedBy/archivedAt/archivedBy fro…
bjoerge Oct 29, 2024
7ddea17
fix(releases): fix broken import
bjoerge Oct 29, 2024
19d8804
fix(core): remove duplicated import
pedrobonamin Oct 29, 2024
2c1dd21
fix: add no restricted-import for sanity in core
pedrobonamin Oct 29, 2024
d6901a7
chore(corel): export perspective from usePerspective hook
pedrobonamin Oct 29, 2024
e325582
test: resolving ReleaseDetailsDialog test fails due to intended
jordanl17 Oct 30, 2024
ee5e18d
test: fixing failures with DocumentPerspectiveList.test
jordanl17 Oct 30, 2024
cd0ce62
fix: resolving test failures in ReleaseForm.test
jordanl17 Oct 30, 2024
caa7fb1
feat: publish action used for immediate release publish (#7695)
jordanl17 Oct 30, 2024
d8bf21a
refactor: making published perspective not a ReleaseDocument (#7699)
jordanl17 Oct 30, 2024
eabf4e5
fix(releases): fix issue with archived release not found
bjoerge Oct 30, 2024
4733fc7
fix(releases): look for release in both data and archived
bjoerge Oct 30, 2024
0bda6ad
fix(releases): navigate to bundle id of release
bjoerge Oct 30, 2024
8b3777f
fix(releases): await createRelease promise
bjoerge Oct 30, 2024
1f75176
feat(releases): add support for unarchiving release
bjoerge Oct 30, 2024
5563400
fix(structure): render version document title in form view
pedrobonamin Oct 30, 2024
17fb750
fix(structure): issue where opening the release from chip was opening…
RitaDias Oct 30, 2024
26086e2
fix(structure): remove imports from core in structure
pedrobonamin Oct 30, 2024
2193c5d
chore(structure): remove perspective from paneRouter (#7700)
pedrobonamin Oct 30, 2024
23986d6
fix(structure): update perspective param when creating a document in …
pedrobonamin Oct 30, 2024
d41e502
fix(core): disable eslint sanity import check
pedrobonamin Oct 30, 2024
aaee200
fix(structure): update pane heder create button
pedrobonamin Oct 30, 2024
0740e43
fix: workspace picker menu always uses default tone
jordanl17 Oct 30, 2024
bab7f63
refactor: type guard for draft perspective accepts string
jordanl17 Oct 30, 2024
44d6db4
Merge branch 'corel' of github.com:sanity-io/sanity into corel
jordanl17 Oct 30, 2024
551f03b
fix: adding minor padding to the empty state on releasesOverview
jordanl17 Oct 30, 2024
3f62333
fix: replacing the table with the placeholder when no releases
jordanl17 Oct 30, 2024
143fc17
feat: label with releaseType on dashboard
jordanl17 Oct 30, 2024
32de536
fix(core): update eslintrc, add ignored files
pedrobonamin Oct 30, 2024
b649a2b
feat: validation errors match prototype
jordanl17 Oct 30, 2024
f684bde
Merge branch 'corel' of github.com:sanity-io/sanity into corel
jordanl17 Oct 30, 2024
631db4d
fix(structure): render published title when perspective is published
pedrobonamin Oct 30, 2024
db5bb13
fix: resolving state update look due to unmemoized sticky params in u…
jordanl17 Oct 31, 2024
c7df229
fix: overflow menu uses default tone
jordanl17 Oct 31, 2024
c30f16a
fix: all dialogs in navbar use default tone
jordanl17 Oct 31, 2024
e69826a
chore(Releases): using i18n for Published perspective labels
jordanl17 Oct 31, 2024
2555fae
fix(core): use realitve import for isPublishedPerspective
pedrobonamin Oct 31, 2024
985e50d
feat(sanity): update inputs 2 (#7704)
RitaDias Oct 31, 2024
0793fc4
refactor(sanity): update areas where untitlted releases would show empty
RitaDias Oct 31, 2024
a3406be
fix(sanity): remove setting perspective when creating new release
RitaDias Oct 31, 2024
90fa911
refactor(sanity): update styling for disabled chips
RitaDias Oct 31, 2024
c1ab90b
fix(sanity): edit draft when in a bundle where the version doesn't exist
RitaDias Oct 31, 2024
ea421a4
refactor(core): create new relase, update tab section
RitaDias Oct 31, 2024
42600e2
fix(core): fix ability to close create release dialog on clickoutside
RitaDias Oct 31, 2024
c20249c
fix(core): missing translate for navbar
RitaDias Oct 31, 2024
40a1e5c
feat(releass): scroll version chip to viewport
jordanl17 Oct 31, 2024
3a93101
fix(releases): cannot exclude published perspective
jordanl17 Oct 31, 2024
319f4e1
fix(core): update usePerspective exclude
pedrobonamin Oct 31, 2024
f57e164
fix(releases): avoid 'No releases' message if there are archived rele…
bjoerge Oct 31, 2024
e52f487
feat(core): add ability to change release type
RitaDias Oct 31, 2024
330aebd
refactor(sanity): update padding props
RitaDias Oct 31, 2024
6310fa9
fix(core): remove onClose for the discarddialog
RitaDias Oct 31, 2024
e948947
fix: updated releases publish action
jordanl17 Oct 31, 2024
dcb570c
fic(core): update sanity/client, use bundlePerspective[]
pedrobonamin Oct 31, 2024
af0beba
fix(releases): disable footer actions for documents not part of curre…
bjoerge Oct 31, 2024
c83435e
fixup! fix(releases): disable footer actions for documents not part o…
bjoerge Oct 31, 2024
bf5e526
fix(releases): stay in release after discarding a version
bjoerge Oct 31, 2024
f45aa89
feat(releases): supporting selecting a publish time on scheduled rele…
jordanl17 Oct 31, 2024
66776f0
chore(core): remove local sanity/ui and sanity/icons files, link with…
pedrobonamin Oct 31, 2024
855407d
refactor(releases): rename getBundleIdFromReleaseId => getBundleIdFro…
bjoerge Oct 31, 2024
aef9dcc
refactor(releases): use async/await instead of then/void
bjoerge Oct 31, 2024
ea93fea
Merge branch 'next' into corel
bjoerge Nov 1, 2024
b73f2d8
fix(deps): remove unused dependency
bjoerge Nov 1, 2024
f909a7e
chore(deps): update presentation dependencies
pedrobonamin Nov 1, 2024
6680455
feat: calendar filter can be disabled when no releases
jordanl17 Nov 1, 2024
28304f7
feat(releases): navigating to release detail when release created fro…
jordanl17 Nov 1, 2024
1390141
refactor(releases): use actions API for (most of) release and versions
bjoerge Oct 31, 2024
0c2bbb2
fix: fetch either draft of published when adding document to release
bjoerge Nov 1, 2024
dc9e628
fix(test-studio): disable actions api for document operarations in te…
bjoerge Nov 1, 2024
af5370d
feat(core): add duplicate action to the versions
RitaDias Nov 4, 2024
df8bf4d
fix(core): issue displaying the footer actions when document doesn't …
RitaDias Nov 4, 2024
fe87c5a
fix(sanity): fix issue where creating version from version was breaking
RitaDias Nov 4, 2024
d308098
fix(sanity): prevent adding versions to scheduled / scheduling releases
RitaDias Nov 4, 2024
55997fb
refactor(releases): move releases store into core/releases
bjoerge Nov 1, 2024
dc16512
fix(releases): fix mock paths
bjoerge Nov 1, 2024
4b870e1
refactor(releases): move useReleasesStore out of legacy
bjoerge Nov 1, 2024
ee198ab
chore(ci): revert unintentional edits from merge
bjoerge Nov 1, 2024
ebfc5c3
chore(releases): remove _version field from documents
bjoerge Nov 1, 2024
5fc8720
chore(releases): remove unused import
bjoerge Nov 1, 2024
2199dae
fix(sanity): prevent adding versions to scheduled / scheduling releas…
RitaDias Nov 4, 2024
f50524d
fix(sanity): fix chip select state when adding banners
RitaDias Nov 4, 2024
ed1169a
chore(deps): update visual-editing to latest
pedrobonamin Nov 4, 2024
5174074
fix(structure): move banners position
pedrobonamin Nov 4, 2024
15045d4
chore(deps): update visual-editing to latest
pedrobonamin Nov 4, 2024
daca134
chore(deps): update visual-editing to latest again
pedrobonamin Nov 4, 2024
b223327
chore(router): remove perspective state from router (#7749)
pedrobonamin Nov 5, 2024
49310e8
Merge branch 'next' into corel
bjoerge Nov 5, 2024
d670fe9
fix(ci): avoid literal as const package exports due to etl error
bjoerge Nov 5, 2024
9745162
Merge branch 'next' into corel
bjoerge Nov 5, 2024
90ca666
refactor(sanity): update date format
RitaDias Nov 6, 2024
10dea69
fix(sanity): issue where the scheduled for banner was appearing in re…
RitaDias Nov 6, 2024
b5fc349
fix(sanity): update header paddings to reduce document switch flickering
RitaDias Nov 6, 2024
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
  •  
  •  
  •  
98 changes: 61 additions & 37 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,45 @@
'use strict'

const extensions = ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx']
const sanityNoRestrictedImportsPaths = [
{
name: '@sanity/ui',
importNames: [
'Button',
'ButtonProps',
'Dialog',
'DialogProps',
'ErrorBoundary',
'MenuButton',
'MenuButtonProps',
'MenuGroup',
'MenuGroupProps',
'MenuItem',
'MenuItemProps',
'Popover',
'PopoverProps',
'Tab',
'TabProps',
'Tooltip',
'TooltipProps',
'TooltipDelayGroupProvider',
'TooltipDelayGroupProviderProps',
],
message:
'Please use the (more opinionated) exported components in sanity/src/ui-components instead.',
},
{
name: 'styled-components',
importNames: ['default'],
message: 'Please use `import {styled} from "styled-components"` instead.',
},
{
name: 'react',
importNames: ['default', 'createContext'],
message:
'Please use named imports, e.g. `import {useEffect, useMemo, type ComponentType} from "react"` instead.\nPlease place "context" in _singletons',
},
]

/** @type {import('eslint').Linter.Config} */
const config = {
Expand Down Expand Up @@ -92,6 +131,7 @@ const config = {
'sortOrder',
'status',
'group',
'textWeight',
],
},
},
Expand Down Expand Up @@ -180,48 +220,32 @@ const config = {
'packages/sanity/src/_singletons/**',
'packages/sanity/src/_createContext/**',
],
rules: {
'no-restricted-imports': [
'error',
{
paths: sanityNoRestrictedImportsPaths,
},
],
},
},
{
files: ['packages/sanity/src/core/**'],
excludedFiles: [
'**/__workshop__/**',
'packages/sanity/src/_singletons/**',
'packages/sanity/src/_createContext/**',
],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: '@sanity/ui',
importNames: [
'Button',
'ButtonProps',
'Dialog',
'DialogProps',
'ErrorBoundary',
'MenuButton',
'MenuButtonProps',
'MenuGroup',
'MenuGroupProps',
'MenuItem',
'MenuItemProps',
'Popover',
'PopoverProps',
'Tab',
'TabProps',
'Tooltip',
'TooltipProps',
'TooltipDelayGroupProvider',
'TooltipDelayGroupProviderProps',
],
message:
'Please use the (more opinionated) exported components in sanity/src/ui-components instead.',
},
{
name: 'styled-components',
importNames: ['default'],
message: 'Please use `import {styled} from "styled-components"` instead.',
},
{
name: 'react',
importNames: ['default', 'createContext'],
message:
'Please use named imports, e.g. `import {useEffect, useMemo, type ComponentType} from "react"` instead.\nPlease place "context" in _singletons',
},
// {
// name: 'sanity',
// message: 'Please import from the relative path instead of the `sanity` package',
// },
...sanityNoRestrictedImportsPaths,
],
},
],
Expand Down
6 changes: 3 additions & 3 deletions dev/test-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
"@sanity/locale-sv-se": "^1.0.1",
"@sanity/logos": "^2.1.2",
"@sanity/migrate": "workspace:*",
"@sanity/preview-url-secret": "^2.0.0",
"@sanity/react-loader": "^1.8.3",
"@sanity/preview-url-secret": "^2.0.1-release.4",
"@sanity/react-loader": "^1.10.15-release.4",
"@sanity/tsdoc": "1.0.122",
"@sanity/types": "workspace:*",
"@sanity/ui": "^2.8.19",
"@sanity/ui-workshop": "^1.0.0",
"@sanity/util": "workspace:*",
"@sanity/uuid": "^3.0.1",
"@sanity/vision": "workspace:*",
"@sanity/visual-editing": "2.4.3",
"@sanity/visual-editing": "2.4.3-release.4",
"@turf/helpers": "^6.0.1",
"@turf/points-within-polygon": "^5.1.5",
"@vercel/stega": "0.1.2",
Expand Down
5 changes: 3 additions & 2 deletions dev/test-studio/sanity.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ const defaultWorkspace = {
icon: SanityMonogram,
// eslint-disable-next-line camelcase
__internal_serverDocumentActions: {
enabled: true,
// TODO: Switched off because Actions API doesn't support versions (yet).
enabled: false,
},
scheduledPublishing: {
enabled: true,
Expand Down Expand Up @@ -353,7 +354,7 @@ export default defineConfig([
preview: '/preview/index.html',
},
}),
assist(),
// assist(),
sharedSettings(),
],
basePath: '/presentation',
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@
"@repo/package.config": "workspace:*",
"@repo/test-config": "workspace:*",
"@repo/tsconfig": "workspace:*",
"@sanity/client": "^6.22.2",
"@sanity/client": "6.22.2-bundle-perspective-2",
"@sanity/eslint-config-i18n": "1.0.0",
"@sanity/eslint-config-studio": "^4.0.0",
"@sanity/mutate": "^0.10.1",
"@sanity/pkg-utils": "6.11.8",
"@sanity/prettier-config": "^1.0.3",
"@sanity/test": "0.0.1-alpha.1",
"@sanity/tsdoc": "1.0.122",
"@sanity/ui": "^2.8.19",
"@sanity/ui": "2.10.0-corel.0",
"@sanity/uuid": "^3.0.2",
"@types/glob": "^7.2.0",
"@types/lodash": "^4.17.7",
Expand Down Expand Up @@ -188,6 +188,9 @@
},
"overrides": {
"@npmcli/arborist": "^7.5.4",
"@sanity/client": "6.22.2-bundle-perspective-2",
"@sanity/icons": "3.5.0-corel.0",
"@sanity/ui": "2.10.0-corel.0",
"@sanity/ui@2": "$@sanity/ui",
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser": "$@typescript-eslint/parser"
Expand Down
3 changes: 3 additions & 0 deletions packages/@sanity/types/src/schema/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export interface PrepareViewOptions {

/** @public */
export interface PreviewValue {
_id?: string
_createdAt?: string
_updatedAt?: string
title?: string
subtitle?: string
description?: string
Expand Down
5 changes: 3 additions & 2 deletions packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@
"@sanity/icons": "^3.4.0",
"@sanity/image-url": "^1.0.2",
"@sanity/import": "^3.37.3",
"@sanity/insert-menu": "1.0.10",
"@sanity/insert-menu": "1.0.11-release.4",
"@sanity/logos": "^2.1.4",
"@sanity/migrate": "3.63.0",
"@sanity/mutator": "3.63.0",
"@sanity/presentation": "1.17.8",
"@sanity/presentation": "1.17.8-release.4",
"@sanity/schema": "3.63.0",
"@sanity/telemetry": "^0.7.7",
"@sanity/types": "3.63.0",
Expand Down Expand Up @@ -252,6 +252,7 @@
"rimraf": "^3.0.2",
"rxjs": "^7.8.0",
"rxjs-exhaustmap-with-trailing": "^2.1.1",
"rxjs-mergemap-array": "^0.1.0",
"sanity-diff-patch": "^4.0.0",
"scroll-into-view-if-needed": "^3.0.3",
"semver": "^7.3.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {type SanityClient} from '@sanity/client'
import {Card, LayerProvider, ThemeProvider, ToastProvider} from '@sanity/ui'
import {buildTheme, type RootTheme} from '@sanity/ui/theme'
import {noop} from 'lodash'
import {type ReactNode, Suspense, useEffect, useState} from 'react'
import {
ChangeConnectorRoot,
Expand All @@ -18,6 +19,8 @@ import {
import {Pane, PaneContent, PaneLayout} from 'sanity/structure'
import {styled} from 'styled-components'

import {route} from '../../../../src/router'
import {RouterProvider} from '../../../../src/router/RouterProvider'
import {createMockSanityClient} from '../../../../test/mocks/mockSanityClient'
import {getMockWorkspace} from '../../../../test/testUtils/getMockWorkspaceFromConfig'

Expand All @@ -36,6 +39,8 @@ const StyledChangeConnectorRoot = styled(ChangeConnectorRoot)`
min-width: 0;
`

const router = route.create('/')

/**
* @description This component is used to wrap all tests in the providers it needs to be able to run successfully.
* It provides a mock Sanity client and a mock workspace.
Expand Down Expand Up @@ -72,37 +77,39 @@ export const TestWrapper = (props: TestWrapperProps): JSX.Element | null => {

return (
<Suspense fallback={null}>
<ThemeProvider theme={studioThemeConfig}>
<ToastProvider>
<LayerProvider>
<WorkspaceProvider workspace={mockWorkspace}>
<ResourceCacheProvider>
<SourceProvider source={mockWorkspace.unstable_sources[0]}>
<CopyPasteProvider>
<ColorSchemeProvider>
<UserColorManagerProvider>
<StyledChangeConnectorRoot
isReviewChangesOpen={false}
onOpenReviewChanges={() => {}}
onSetFocus={() => {}}
>
<PaneLayout height="fill">
<Pane id="test-pane">
<PaneContent>
<Card padding={3}>{children}</Card>
</PaneContent>
</Pane>
</PaneLayout>
</StyledChangeConnectorRoot>
</UserColorManagerProvider>
</ColorSchemeProvider>
</CopyPasteProvider>
</SourceProvider>
</ResourceCacheProvider>
</WorkspaceProvider>
</LayerProvider>
</ToastProvider>
</ThemeProvider>
<RouterProvider router={router} state={{}} onNavigate={noop}>
<ThemeProvider theme={studioThemeConfig}>
<ToastProvider>
<LayerProvider>
<WorkspaceProvider workspace={mockWorkspace}>
<ResourceCacheProvider>
<SourceProvider source={mockWorkspace.unstable_sources[0]}>
<CopyPasteProvider>
<ColorSchemeProvider>
<UserColorManagerProvider>
<StyledChangeConnectorRoot
isReviewChangesOpen={false}
onOpenReviewChanges={() => {}}
onSetFocus={() => {}}
>
<PaneLayout height="fill">
<Pane id="test-pane">
<PaneContent>
<Card padding={3}>{children}</Card>
</PaneContent>
</Pane>
</PaneLayout>
</StyledChangeConnectorRoot>
</UserColorManagerProvider>
</ColorSchemeProvider>
</CopyPasteProvider>
</SourceProvider>
</ResourceCacheProvider>
</WorkspaceProvider>
</LayerProvider>
</ToastProvider>
</ThemeProvider>
</RouterProvider>
</Suspense>
)
}
12 changes: 12 additions & 0 deletions packages/sanity/src/_singletons/context/ReleasesMetadataContext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {createContext} from 'sanity/_createContext'

import type {ReleasesMetadataContextValue} from '../../core/releases/contexts/ReleasesMetadataProvider'

/**
* @internal
* @hidden
*/
export const ReleasesMetadataContext = createContext<ReleasesMetadataContextValue | null>(
'sanity/_singletons/context/releases-metadata',
null,
)
11 changes: 11 additions & 0 deletions packages/sanity/src/_singletons/context/ReleasesTableContext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {createContext} from 'sanity/_createContext'

import type {TableContextValue} from '../../core/releases/tool/components/Table/TableProvider'

/**
* @internal
*/
export const TableContext = createContext<TableContextValue | null>(
'sanity/_singletons/context/releases-table',
null,
)
2 changes: 2 additions & 0 deletions packages/sanity/src/_singletons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export * from './context/PresenceTrackerContexts'
export * from './context/PreviewCardContext'
export * from './context/ReferenceInputOptionsContext'
export * from './context/ReferenceItemRefContext'
export * from './context/ReleasesMetadataContext'
export * from './context/ReleasesTableContext'
export * from './context/ResourceCacheContext'
export * from './context/ReviewChangesContext'
export * from './context/RouterContext'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@
}
}, [replies])

/* TODO - once we understand how to set up with "finished" releases
we need to add a condition to the readOnly prop in this component */

const renderedReplies = useMemo(
() =>
splicedReplies.map((reply) => (
Expand Down Expand Up @@ -356,7 +359,7 @@
/>
</Stack>

{showCollapseButton && !didExpand.current && (

Check warning on line 362 in packages/sanity/src/core/comments/components/list/CommentsListItem.tsx

View workflow job for this annotation

GitHub Actions / lint

Ref values (the `current` property) may not be accessed during render. (https://react.dev/reference/react/useRef)
<Flex gap={1} paddingY={1} sizing="border">
<SpacerAvatar />

Expand Down
Loading
Loading