#11769 improved the lexical version view diff component. This PR improves the rest of the version view. ## What changed - Column layout when selecting a version: - Previously: Selected version on the left, latest version on the left - Now: Previous version on the left, previous version on the right (mimics behavior of GitHub) - Locale selector now displayed in pill selector, rather than react-select - Smoother, more reliable locale, modifiedOnly and version selection. Now uses clean event callbacks rather than useEffects - React-diff-viewer-continued has been replaced with the html differ we use in lexical - Updated Design for all field diffs - Version columns now have a clearly defined separator line - Fixed collapsibles showing in version view despite having no modified fields if modifiedOnly is true - New, redesigned header ## Screenshots ### Before   ### After    
53 lines
1.5 KiB
TypeScript
53 lines
1.5 KiB
TypeScript
export const autosaveCollectionSlug = 'autosave-posts'
|
|
|
|
export const autosaveWithDraftButtonSlug = 'autosave-with-draft-button-posts'
|
|
|
|
export const autosaveWithValidateCollectionSlug = 'autosave-with-validate-posts'
|
|
|
|
export const customIDSlug = 'custom-ids'
|
|
|
|
export const draftCollectionSlug = 'draft-posts'
|
|
|
|
export const draftWithValidateCollectionSlug = 'draft-with-validate-posts'
|
|
export const draftWithMaxCollectionSlug = 'draft-with-max-posts'
|
|
|
|
export const postCollectionSlug = 'posts'
|
|
|
|
export const diffCollectionSlug = 'diff'
|
|
export const mediaCollectionSlug = 'media'
|
|
export const media2CollectionSlug = 'media2'
|
|
|
|
export const versionCollectionSlug = 'version-posts'
|
|
|
|
export const disablePublishSlug = 'disable-publish'
|
|
export const errorOnUnpublishSlug = 'error-on-unpublish'
|
|
|
|
export const disablePublishGlobalSlug = 'disable-publish-global'
|
|
|
|
export const textCollectionSlug = 'text'
|
|
|
|
export const collectionSlugs = [
|
|
autosaveCollectionSlug,
|
|
draftCollectionSlug,
|
|
postCollectionSlug,
|
|
diffCollectionSlug,
|
|
mediaCollectionSlug,
|
|
media2CollectionSlug,
|
|
versionCollectionSlug,
|
|
textCollectionSlug,
|
|
]
|
|
|
|
export const autoSaveGlobalSlug = 'autosave-global'
|
|
|
|
export const autosaveWithDraftButtonGlobal = 'autosave-with-draft-button-global'
|
|
|
|
export const draftGlobalSlug = 'draft-global'
|
|
|
|
export const draftWithMaxGlobalSlug = 'draft-with-max-global'
|
|
|
|
export const globalSlugs = [autoSaveGlobalSlug, draftGlobalSlug]
|
|
|
|
export const localizedCollectionSlug = 'localized-posts'
|
|
|
|
export const localizedGlobalSlug = 'localized-global'
|