From 666b3879b3e51c612c2d160b397a39731a52bafb Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 19 Apr 2026 09:37:09 -0400 Subject: [PATCH] feat: Document history design (#12112) * refactor * refactor * design --- .../DefaultCollectionInputSelect.tsx | 2 +- .../InputMemberPermissionSelect.tsx | 2 +- app/components/InputSelect.tsx | 10 +- app/components/InputSelectPermission.tsx | 2 +- .../Notifications/Notifications.tsx | 2 +- .../Sharing/Collection/AccessControlList.tsx | 2 +- .../components/Comments/CommentSortMenu.tsx | 2 +- .../components/History}/EventListItem.tsx | 2 +- .../History/HighlightChangesControl.tsx | 129 ++++++++++++++++++ .../components/{ => History}/History.tsx | 102 ++------------ .../History}/PaginatedEventList.tsx | 0 .../components/History}/RevisionListItem.tsx | 59 ++++---- .../Document/components/History/utils.ts | 23 ++++ .../Document/hooks/useDocumentSidebar.tsx | 2 +- app/scenes/Settings/Application.tsx | 2 +- app/scenes/Settings/Details.tsx | 2 +- app/scenes/Settings/Preferences.tsx | 6 +- app/scenes/Settings/Security.tsx | 4 +- shared/i18n/locales/en_US/translation.json | 32 ++--- 19 files changed, 234 insertions(+), 151 deletions(-) rename app/{components => scenes/Document/components/History}/EventListItem.tsx (98%) create mode 100644 app/scenes/Document/components/History/HighlightChangesControl.tsx rename app/scenes/Document/components/{ => History}/History.tsx (75%) rename app/{components => scenes/Document/components/History}/PaginatedEventList.tsx (100%) rename app/{components => scenes/Document/components/History}/RevisionListItem.tsx (82%) create mode 100644 app/scenes/Document/components/History/utils.ts diff --git a/app/components/DefaultCollectionInputSelect.tsx b/app/components/DefaultCollectionInputSelect.tsx index f3c6bff9c7..e46edac00a 100644 --- a/app/components/DefaultCollectionInputSelect.tsx +++ b/app/components/DefaultCollectionInputSelect.tsx @@ -120,7 +120,7 @@ const DefaultCollectionInputSelect = observer( value={defaultCollectionId ?? "home"} onChange={onSelectCollection} label={t("Start view")} - hideLabel + labelHidden short /> ); diff --git a/app/components/InputMemberPermissionSelect.tsx b/app/components/InputMemberPermissionSelect.tsx index 2666425173..d0b576ccac 100644 --- a/app/components/InputMemberPermissionSelect.tsx +++ b/app/components/InputMemberPermissionSelect.tsx @@ -39,7 +39,7 @@ export default function InputMemberPermissionSelect( value={value || EmptySelectValue} onChange={onChange} label={t("Permissions")} - hideLabel + labelHidden nude {...rest} /> diff --git a/app/components/InputSelect.tsx b/app/components/InputSelect.tsx index b6b1c8e411..586bdb7bef 100644 --- a/app/components/InputSelect.tsx +++ b/app/components/InputSelect.tsx @@ -60,7 +60,7 @@ type Props = Omit, "onChange"> & { /* Label for the select menu. */ label: string; /* When true, label is hidden in an accessible manner. */ - hideLabel?: boolean; + labelHidden?: boolean; /* When true, menu is disabled. */ disabled?: boolean; /* When true, width of the menu trigger is restricted. Otherwise, takes up the full width of parent. */ @@ -76,7 +76,7 @@ export const InputSelect = React.forwardRef( value, onChange, label, - hideLabel, + labelHidden, short, help, ...triggerProps @@ -149,7 +149,7 @@ export const InputSelect = React.forwardRef( return ( -