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(sanity): content releases #7011

Draft
wants to merge 393 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
393 commits
Select commit Hold shift + click to select a range
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
327db99
Merge branch 'next' into corel
bjoerge Nov 6, 2024
2d3951a
test(core): fix reference e2e test (#7772)
RitaDias Nov 7, 2024
7146342
refactor(core): move some documentPerspective components from structu…
RitaDias Nov 7, 2024
264d4c9
refactor(core): rename dialogs (#7774)
RitaDias Nov 7, 2024
daede00
refactor(sanity): fix date formating, add locked chips and locked doc…
RitaDias Nov 7, 2024
a634563
chore(core): remove corel details screen top border
pedrobonamin Nov 8, 2024
1fe9d31
Merge branch 'next' into corel
bjoerge Nov 8, 2024
3e3e17c
fix(sanity): published references shown as drafts in reference inputs
RitaDias Nov 11, 2024
90331e6
Merge branch 'next' into corel
bjoerge Nov 11, 2024
b5ce373
fix(core): update releases table empty state
pedrobonamin Nov 11, 2024
fdea1cd
chore: [remove before merge]: tweak pnpm overrides
bjoerge Nov 11, 2024
79bc048
chore: regenerate lockfile
bjoerge Nov 11, 2024
e3e2a34
fix(sanity): fix issue where the input change wasn't impacting the ca…
RitaDias Nov 12, 2024
9a38017
refactor(sanity): add ability to change padding to dateTimeInput
RitaDias Nov 12, 2024
4ccbf7e
fix(core): update getPublishDateFromRelease, add ScheduledRelease typ…
pedrobonamin Nov 12, 2024
65673fa
fix: issue with the US formatting used by formatRelative when no loca…
jordanl17 Nov 13, 2024
78b8316
Merge branch 'next' into corel
bjoerge Nov 13, 2024
d46e8c9
feat(sanity): Add timezones to create release and to the release deta…
RitaDias Nov 13, 2024
e16fdfb
chore(sanity): only call getPublishDateFromRelease if the release typ…
RitaDias Nov 14, 2024
d830411
fix(sanity): issue with draft being selected when it shouldn't
RitaDias Nov 14, 2024
6b9fe6e
Merge branch 'next' into corel
bjoerge Nov 15, 2024
78c3214
refactor: move to system-only release documents (#7824)
bjoerge Nov 15, 2024
eea0283
fix(releases): fix broken query
bjoerge Nov 15, 2024
474bfba
feat(releases): adding correct confirmation dialog to archive release…
jordanl17 Nov 18, 2024
1a0c038
test(releases): turning on most of ReleasesOverview tests
jordanl17 Nov 18, 2024
8171a71
Merge branch 'corel' of github.com:sanity-io/sanity into corel
jordanl17 Nov 18, 2024
89137be
fix: skipping broken releasesOverview tests due to unknown issues
jordanl17 Nov 18, 2024
ca2bf71
test(releases): comprehensive testing on release nav (#7840)
jordanl17 Nov 19, 2024
ff28a57
test(releases): calendar tests for releases overview (#7850)
jordanl17 Nov 20, 2024
3a29f90
fix(core): update metadata property name, add delay after creation
pedrobonamin Nov 20, 2024
2cc67f8
fix(core): update slug validator to account for version documents
pedrobonamin Nov 20, 2024
a3dc693
test: resolving mismatch on snapshot for updated slugValidator (#7855)
jordanl17 Nov 21, 2024
0c715af
fix(sanity): add ability to search version documents from AddDocument…
RitaDias Nov 21, 2024
dbdee62
test(sanity): update and re-write unit tests (CreateReleaseDialog/use…
RitaDias Nov 21, 2024
4c753b3
test(sanity): re-add checkoutPair tests
RitaDias Nov 21, 2024
c893edc
test(sanity): update and activate corel tests (#7860)
RitaDias Nov 21, 2024
e78b029
fix(releases): can only add documents to active releases
jordanl17 Nov 21, 2024
20034ee
fix(releases): untitled releases have placeholder in breadcrumb
jordanl17 Nov 21, 2024
07c92c7
Merge branch 'corel' of github.com:sanity-io/sanity into corel
jordanl17 Nov 21, 2024
7a6ff5f
feat(releases): timezone selection updates filtering and dateTime dis…
jordanl17 Nov 21, 2024
237694b
fix: release tables can sort by strings and dates
jordanl17 Nov 22, 2024
465c105
fix: table styling on headers
jordanl17 Nov 22, 2024
e64ea96
fix: table styling on headers
jordanl17 Nov 22, 2024
41a63c8
fix(core): remove timeout and retry from releases store (#7866)
pedrobonamin Nov 22, 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
5 changes: 5 additions & 0 deletions dev/test-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@
"devDependencies": {
"chokidar": "^3.6.0",
"vite": "^4.5.5"
},
"overrides": {
"@sanity/preview-url-secret": "^2.0.1-release.4",
"@sanity/react-loader": "^1.10.15-release.4",
"@sanity/visual-editing": "2.4.3-release.4"
}
}
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
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
},
"overrides": {
"@npmcli/arborist": "^7.5.4",
"@sanity/ui@2": "$@sanity/ui",
"@sanity/client": "6.22.2-bundle-perspective-2",
"@sanity/icons": "3.5.0-corel.0",
"@sanity/insert-menu": "1.0.11-release.4",
"@sanity/presentation": "1.17.8-release.4",
"@sanity/ui": "2.10.0-corel.0",
"@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
1 change: 1 addition & 0 deletions packages/sanity/package.json
Original file line number Diff line number Diff line change
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>
)
}
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 @@ export const CommentsListItem = memo(function CommentsListItem(props: CommentsLi
}
}, [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
Loading