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 177 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
28eccf4
feat(sanity): add `perspective` sticky parameter
juice49 Sep 3, 2024
06f7219
feat(preview): add `unstable_observeDocument(s)` to preview store (#7…
bjoerge Jul 22, 2024
92e6163
feat(preview): add support for live document id sets (#7253)
bjoerge Jul 26, 2024
9b1f27d
feat(sanity): add 'perspective' dropdown
bjoerge May 6, 2024
5d72b8c
feat(sanity): include `_version` field in search results
juice49 Jun 21, 2024
4ec4c69
feat(types): add `_version` field to `SanityDocument` and `SanityDocu…
juice49 Jun 21, 2024
55ec5e9
fix(sanity): global perspective state restoration
juice49 Jun 24, 2024
e937af9
feat(sanity): hardcode `summerDrop` and `autumnDrop` bundles
juice49 Jun 24, 2024
aa542ca
wip: allow pairs to include multiple drafts
juice49 May 22, 2024
11148b6
feat(sanity): support versioned document ids in `getPublishedId` func…
juice49 Jun 24, 2024
22db127
feat(sanity): add `_version` field to preview observation
juice49 Jun 26, 2024
d376e79
feat(sanity): reflect checked out bundle in document lists and list p…
juice49 Jun 26, 2024
344671e
debug(sanity): add version debug output to list previews
juice49 Jun 26, 2024
ca7b93c
feat(sanity): add action to create new version based on an doc id
RitaDias Jun 25, 2024
4621a8c
feat(sanity): update document title + version popover - add new and f…
RitaDias Jun 26, 2024
f6fb3d6
chore(sanity): move versions menu to versions folder
RitaDias Jun 26, 2024
9369186
chore(sanity): update check for checking version
RitaDias Jun 26, 2024
496d333
fix(sanity): ability to add new versions to doc
RitaDias Jun 26, 2024
44a9dd1
feat(sanity): add dumb bundle and version data, add icons and hues
RitaDias Jun 26, 2024
64f8e3a
feat(sanity): update styles and don't rely on random
RitaDias Jun 26, 2024
49345e4
docs(sanity): update comments
RitaDias Jun 26, 2024
8e140e9
feat(sanity): add "latest version" menu button
RitaDias Jun 26, 2024
960d7ab
refactor(sanity): update comments
RitaDias Jun 26, 2024
af11c39
chore(sanity): remove import from format date. will use something else
RitaDias Jun 26, 2024
5cb7b5b
fix(sanity): allow uppercase characters in version identifiers
juice49 Jun 26, 2024
124f794
feat(sanity): add tag to list document versions request
juice49 Jun 27, 2024
034ab4a
feat(corel): integrate bundles store (#7040)
pedrobonamin Jul 1, 2024
1f79630
feat(corel): doc and structure updates (#7039)
RitaDias Jul 1, 2024
3abad23
feat(releases): initialising releases plugin (#7048)
jordanl17 Jul 2, 2024
4c6a409
refactor(releases): removing shortRelativeDate (#7051)
jordanl17 Jul 2, 2024
a5b1709
chore(corel): add bundles provider (#7054)
pedrobonamin Jul 3, 2024
00bb78a
feat(COREL): update types to bundle + add create bundle functionality…
RitaDias Jul 5, 2024
af171cd
refactor(COREL): refactor version context & renaming (#7071)
RitaDias Jul 5, 2024
96080cd
fix(corel): update uses of collate, add typeguard for bundles and add…
pedrobonamin Jul 8, 2024
85e13b9
feat(releases): archive and unarchive releases (#7072)
jordanl17 Jul 8, 2024
042c436
refactor(sanity): move bundle metadata store to resource cache
juice49 Jul 7, 2024
5564562
feat(corel): remove version documents when deleting bundle (#7107)
pedrobonamin Jul 11, 2024
841a9cb
feat(corel): releases details screen. (#7092)
pedrobonamin Jul 11, 2024
38f9ccf
test(COREL): add core tests (#7119)
RitaDias Jul 12, 2024
ed148f1
feat(sanity): #TEMPORARY #DELETE handle versions in `DocumentPaneProv…
juice49 Jul 14, 2024
4650583
fix(sanity): avoid fetching in a loop
juice49 Jul 14, 2024
6a832fc
fix(corel): refactor version history to fetch all release documents (…
pedrobonamin Jul 15, 2024
2dbb602
refactor(COREL): update title & date validation (#7148)
RitaDias Jul 15, 2024
ad55f8d
chore: hide publish date (#7162)
RitaDias Jul 16, 2024
73c182d
feat(releases): last edited and document count in bundle (#7124)
jordanl17 Jul 16, 2024
59d6d51
feat(corel): Add review changes screen (#7155)
pedrobonamin Jul 16, 2024
e49d115
chore(corel): rename bundle.name to bundle.slug (#7171)
pedrobonamin Jul 17, 2024
a0609fe
refactor: update document badge logic and navigation (#7175)
RitaDias Jul 17, 2024
e64d059
fix(structure): fixing issue with mock for sanity in DocumentPerspect…
jordanl17 Jul 18, 2024
0682fa7
feat(releases): sorting release overview table (#7159)
jordanl17 Jul 18, 2024
fa69c3d
fix(corel): update getAllVersionsOfDocument dummy getter function (#7…
pedrobonamin Jul 18, 2024
efcf4cd
feat(sanity): supporting editing bundle metadata (#7180)
jordanl17 Jul 18, 2024
da7dae6
fix: move createWrapper to test package, update name -> slug (#7177)
RitaDias Jul 19, 2024
7aa05b6
test: remove old CreateBundleDialog test
RitaDias Jul 19, 2024
0dc78ed
feat(corel): add search input to release review screen (#7213)
pedrobonamin Jul 22, 2024
39ca830
feat: add documents validation (#7207)
pedrobonamin Jul 22, 2024
0bb8c09
refactor: update GROQ query for document versions (#7208)
RitaDias Jul 23, 2024
3aeb4ea
fix(core): update useDocumentVersions to restore breaking tests (#7235)
pedrobonamin Jul 24, 2024
7c82dc8
test(releases): testing release detail/summary screen (#7230)
jordanl17 Jul 24, 2024
c34bb6d
fix(structure): update PaneItemPreview to reflect when a document is …
pedrobonamin Jul 24, 2024
00b484a
fix(core): fix lint warning in WithAddonDatasetProvider (#7240)
pedrobonamin Jul 25, 2024
976b701
feat(releases): publish all documents in a bundle (#7194)
jordanl17 Jul 25, 2024
84de2c5
chore(structure): move useDocumentVersions to PaneProvider (#7237)
pedrobonamin Jul 25, 2024
8cca670
fix(structure): update DocumentPerspective menu test (#7254)
pedrobonamin Jul 26, 2024
ea45af6
feat(releases): default sorting version documents in release (#7242)
jordanl17 Jul 26, 2024
cadfd22
chore(core): refactor useDocumentVersion to use ListenQuery (#7241)
pedrobonamin Jul 29, 2024
ce0ec66
fix(core): unify items to render in BundlesMenu (#7262)
pedrobonamin Jul 29, 2024
bd209d0
fix: releases default sort order in wrong direction (#7264)
jordanl17 Jul 29, 2024
a61fd1b
refactor(releases): use live id sets for release document list
bjoerge Jul 26, 2024
319990a
refactor: simplify data fetching and validation for bundle documents
bjoerge Jul 26, 2024
22c5388
refactor(bundles): use observeDocumentIdSet for useDocumentVersions
bjoerge Jul 26, 2024
91e6a14
fix(test): update bundles/releases tests
bjoerge Jul 29, 2024
bc0ece9
feat(core): fix infinite loading in releases and create addon dataset…
pedrobonamin Jul 30, 2024
69154d4
fix(core): update corel contexts to match new lint rules (#7332)
pedrobonamin Aug 7, 2024
1e33383
feat(corel): virtualize content releases plugin lists (#7301)
pedrobonamin Aug 8, 2024
a13af5d
refactor(sanity, release): Add translation keys (#7339)
RitaDias Aug 9, 2024
1e6387c
temp(preview): enable full document preview for now
bjoerge Jul 26, 2024
72d0aae
fix(preview): remove full document preview support
bjoerge Aug 2, 2024
f3d28d2
feat(test-studio): switch off Actions API integration; versions not c…
juice49 Jul 23, 2024
a6e655e
Revert "wip: allow pairs to include multiple drafts"
juice49 Jul 18, 2024
853b6e8
Revert "feat(sanity): #TEMPORARY #DELETE handle versions in `Document…
juice49 Jul 18, 2024
46a1b4c
feat(sanity): support viewing and editing document versions
juice49 Jul 22, 2024
6b331ef
feat(core): document diff review for new documents (#7356)
pedrobonamin Aug 13, 2024
9aa4c6d
feat(releases, core): supporting remotely deleted bundles (#7342)
jordanl17 Aug 13, 2024
46694bb
fix(structure): update document status to display the version documen…
pedrobonamin Aug 13, 2024
2d98c7d
feat: support version documents creation from document list (#7280)
pedrobonamin Aug 14, 2024
82cb2d6
fix(core): update cache dependencys for useBundlesStore (#7372)
pedrobonamin Aug 14, 2024
406b6b6
feat(releases): suffix to bundle slug (#7374)
jordanl17 Aug 15, 2024
919e0db
refactor(sanity): update version id to match `versions.[bundle].[id]`…
RitaDias Aug 16, 2024
265d274
fix(sanity): fix typo in groq query for deleting bundle
RitaDias Aug 19, 2024
da9542a
feat(releases, core): supporting banner display for remote deleted bu…
jordanl17 Aug 19, 2024
762f6ab
fix(sanity): update the title to be ellipsed when the text is too lon…
RitaDias Aug 20, 2024
d785f1c
chore(core): remove useListener hook (#7392)
pedrobonamin Aug 20, 2024
1578585
refactor(sanity): re-add sanity::versionOf (#7413)
RitaDias Aug 23, 2024
deea91a
refactor(sanity): remove commented publishat input (#7412)
RitaDias Aug 26, 2024
ff78001
refactor(sanity): allow for editing publish data on bundle form
RitaDias Aug 26, 2024
acf2415
refactor(sanity): Add toast when discarding version and for deleting …
RitaDias Aug 26, 2024
1391a34
refactor(sanity): add prop to bundleform (#7420)
RitaDias Aug 26, 2024
46f884f
chore(core): rename and move getBundleSlug to getVersionFromId
pedrobonamin Aug 26, 2024
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
fe2a777
refactor(sanity): add useVersionOperations, replace createVersion on …
RitaDias Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const config = {
'sortOrder',
'status',
'group',
'textWeight',
],
},
},
Expand Down
71 changes: 9 additions & 62 deletions .github/workflows/efps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@ on:
default: false

jobs:
efps-test:
efps:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
strategy:
fail-fast: false
matrix:
# Add more shards here if needed
shardIndex: [1, 2, 3]
shardTotal: [3]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -90,65 +84,18 @@ jobs:
REFERENCE_TAG: ${{ github.event.inputs.reference_tag || 'latest' }}
ENABLE_PROFILER: ${{ github.event.inputs.enable_profiler || false }}
RECORD_VIDEO: ${{ github.event.inputs.record_video || false }}
run: pnpm efps:test -- -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: efps-report
path: ${{ github.workspace }}/perf/efps/results/
retention-days: 30

merge-reports:
if: always()
needs: [efps-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
v1-${{ runner.os }}-pnpm-store-${{ env.cache-name }}-
v1-${{ runner.os }}-pnpm-store-
v1-${{ runner.os }}-
- name: Install project dependencies
run: pnpm install

- name: Download blob reports from Github Actions Artifacts
uses: actions/download-artifact@v3
with:
name: efps-report
path: perf/efps/results

- name: Write report
run: pnpm efps:write:report
run: pnpm efps:test

- name: PR comment with report
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2
if: ${{ github.event_name == 'pull_request' }}
with:
comment_tag: "efps-report"
filePath: ${{ github.workspace }}/perf/efps/results/benchmark-results.md

- uses: actions/upload-artifact@v3
if: always()
with:
name: efps-report
path: perf/efps/results
retention-days: 30
3 changes: 2 additions & 1 deletion 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
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"e2e:start": "pnpm --filter studio-e2e-testing preview",
"etl": "node -r dotenv-flow/config -r esbuild-register scripts/etl",
"efps:test": "cd perf/efps && pnpm test",
"efps:write:report": "cd perf/efps && pnpm write:report",
"example:blog-studio": "cd examples/blog-studio && pnpm start",
"example:clean-studio": "cd examples/blog-studio && pnpm start",
"example:ecommerce-studio": "cd examples/blog-studio && pnpm start",
Expand Down Expand Up @@ -108,15 +107,15 @@
"@repo/package.config": "workspace:*",
"@repo/test-config": "workspace:*",
"@repo/tsconfig": "workspace:*",
"@sanity/client": "^6.22.1",
"@sanity/client": "6.22.1-bundle-perspective",
"@sanity/eslint-config-i18n": "1.0.0",
"@sanity/eslint-config-studio": "^4.0.0",
"@sanity/mutate": "^0.10.0",
"@sanity/pkg-utils": "6.11.2",
"@sanity/prettier-config": "^1.0.2",
"@sanity/test": "0.0.1-alpha.1",
"@sanity/tsdoc": "1.0.105",
"@sanity/ui": "^2.8.9",
"@sanity/ui": "file:registry/sanity-ui-2.8.9.tgz",
"@sanity/uuid": "^3.0.2",
"@types/glob": "^7.2.0",
"@types/lodash": "^4.17.7",
Expand Down Expand Up @@ -162,7 +161,6 @@
"npm-run-all2": "^6.2.3",
"ora": "^8.0.1",
"prettier": "^3.3.3",
"read-package-up": "^11.0.0",
"rimraf": "^3.0.2",
"rxjs": "^7.8.1",
"sanity": "workspace:*",
Expand All @@ -188,6 +186,9 @@
},
"overrides": {
"@npmcli/arborist": "^7.5.4",
"@sanity/client": "6.22.1-bundle-perspective",
"@sanity/icons": "file:registry/sanity-icons-3.4.0.tgz",
"@sanity/ui": "file:registry/sanity-ui-2.8.9.tgz",
"@sanity/ui@2": "$@sanity/ui",
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser": "$@typescript-eslint/parser"
Expand Down
2 changes: 2 additions & 0 deletions packages/@sanity/types/src/documents/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface SanityDocument {
_createdAt: string
_updatedAt: string
_rev: string
_version?: Record<string, never>
[key: string]: unknown
}

Expand All @@ -21,6 +22,7 @@ export interface SanityDocumentLike {
_createdAt?: string
_updatedAt?: string
_rev?: string
_version?: Record<string, never>
[key: string]: unknown
}

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": "^3.0.2",
"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
Loading