-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): adds events based history #7922
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
c1fbfb3
feat(core): add beta events api flag
pedrobonamin 7f71d3a
chore(structure): insert timeline through history provider, add suppo…
pedrobonamin a46511c
feat(core): wip implementation for events in publish view
pedrobonamin 2bcb573
fix: disable server action flag
pedrobonamin a628b1d
wip implementation for edit events in verision docs
pedrobonamin 1480f25
fix(events): add id and update events store for version documents
pedrobonamin 776e91f
feat(core): support remote mutations in version events
pedrobonamin cacb000
feat(core): handle edit events history in version docs
pedrobonamin 861a101
wip
pedrobonamin ee0dd64
feat(core): add DocumentVariantType to useEventsStore
pedrobonamin 44613dd
chore(core): add useRemoteTransactions hook
pedrobonamin 48f3f79
fix(structure): update document title to display correct version and …
pedrobonamin 2a05d37
feat(structure): disable selection of publish events when inspecting …
pedrobonamin eccb88c
fix(structure): reset history params when perspective changes
pedrobonamin 3057b0c
feat(core): update versions time traveling
pedrobonamin d62072b
feat(core): add loadMoreEvents acction to useEventsStore
pedrobonamin 4f4e7f6
fix(structure): translate PublishedEventMenu and add published - draf…
pedrobonamin baf3f5d
feat(structure): when sleecitng the lastest event remove the rev
pedrobonamin dabf05b
feat(core): collapse create with publish events when applicable
pedrobonamin 2d73c63
feat(core): add option to expand draft events
pedrobonamin 295c7a2
fix(structure): update events ui and small fixes
pedrobonamin 0ae9160
feat(core): add support for live edit events
pedrobonamin 4401127
fix(core): remove fromTransactionId in edit event
pedrobonamin b19a1b7
chore(core): divide useEventsStore subscriptions
pedrobonamin ea7dc5d
fix(core): do not refetch transactions if to and from haven't changed
pedrobonamin b9adee0
feat(core): add createEventsStore
pedrobonamin ad0f63a
feat(structure): update inspector ui
pedrobonamin 3e5f537
feat(structure): refactor documentPaneProvider to extract timeline store
pedrobonamin 6650c6f
fix(core): update types to internal
pedrobonamin 8e0dd86
fix(structure): remove unused imports DocumentPanelHeader
pedrobonamin f67a422
fix(core): update getEditEvents tests
pedrobonamin cb1e76d
feat(core): add tests for when it's a live edit event
pedrobonamin ddaf58d
fix(core): update tags
pedrobonamin b0eb2c3
fix(core): update return tye of useEventsStore
pedrobonamin a6008b7
fix: various fixes after PR review
pedrobonamin d9e6e65
fix(core): only return changesList if both documents exist
pedrobonamin 043caf3
chore(core): add events readme
pedrobonamin bb1efbd
fix(core): enable events api when using releases plugin
pedrobonamin 7e44a1d
fix(structure): fix bug with draft events not showing the expand button
pedrobonamin 123d2aa
fix(structure): automatically expand parent event if children is sele…
pedrobonamin 08c939f
fix(structure): infinite re render
pedrobonamin 9341615
fix: update PR with review suggestions
pedrobonamin 702eded
fix(core): add documentPaneProviderWrapper
pedrobonamin 25a452c
fix(structure): updates after rebase
pedrobonamin c6d99c9
fix(test-studio): add _strengthenOnPublish to author
pedrobonamin f5caab6
fix(structure): update dcoumentPaneProvider after rebase
pedrobonamin e29d6dc
fix(structure): update DocumentPaneProvider props
pedrobonamin 6bc57cf
fix(structure): rename onExpand for fetchEventChildren
pedrobonamin 6aad3bb
fix(core): update configResolver for events api error message
pedrobonamin a920056
fix(core): make revisionId required in getDocumentAtRevision
pedrobonamin 2761dbb
fix(core): update getDocumentAtRevision cache
pedrobonamin a0acceb
fix(core): rename getEffectState return value
pedrobonamin 2842a1b
chore(core): do not enable by default the new events api
pedrobonamin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,7 @@ const config = { | |
'status', | ||
'group', | ||
'textWeight', | ||
'showChangesBy', | ||
], | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {createContext} from 'sanity/_createContext' | ||
|
||
import type {EventsStore} from '../../core/store/events/types' | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const EventsContext = createContext<EventsStore | null>( | ||
'sanity/_singletons/context/events', | ||
null, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/sanity/src/core/field/diff/components/ChangesError.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Card, Stack, Text} from '@sanity/ui' | ||
|
||
import {useTranslation} from '../../../i18n' | ||
|
||
/** | ||
* @internal | ||
* */ | ||
export function ChangesError() { | ||
const {t} = useTranslation() | ||
return ( | ||
<Card tone="caution" padding={3}> | ||
<Stack space={3}> | ||
<Text size={1} weight="medium" as="h3"> | ||
{t('changes.error-title')} | ||
</Text> | ||
<Text as="p" size={1} muted> | ||
{t('changes.error-description')} | ||
</Text> | ||
</Stack> | ||
</Card> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already part of other packages installed with sanity, like
@sanity/ui
,portable-text
etc.