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(structure): History UI updates #7462

Open
wants to merge 16 commits into
base: next
Choose a base branch
from
Open

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Sep 4, 2024

Description

This PR introduces UI changes into the history and revision panel.

  • Chunks are squashed together on publish.
  • Moves the revision selector to the history panel.
  • Timeline item are updated with new looks.
  • Footer shown when seeing a revision is updated with new looks.
  • The inspector panel now includes two tabs the user can navigate history and review changes

What does "chunks are squashed together on publish" means?

Once the draft changes are published all the draft edits done before that publish will be squashed and shown as 1 change, that could be expanded, showing also the collaborators for that published.
This means:
If we have the following mutations:
[draftEdit, publish, draftEdit, draftEdit, create]
it will be shown as
[draftEdit, publish (expandable), create]
On expand, it will show the two collapsed draftEdit actions

The changes are not removed from the history, they are only visually squashed for easier navigation in the UI.

This is achieved by creating a relation between parents publish action and children draftEdit actions, in the addChunksMetadata function.

Collapsed Expanded
Screenshot 2024-09-03 at 11 11 33 Screenshot 2024-09-03 at 11 11 50
Collapsable.history.items.mov

What to review

Are the changes correct? Is something missing?

Testing

Notes for release

Updates to history inspector UI, edits are now collapsed into the Published Event. From and To revision selectors are added into the inspector.

Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 7:58am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 7:58am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 7:58am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 7:58am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 7:58am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 7:58am

Copy link
Contributor

github-actions bot commented Sep 4, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Component Testing Report Updated Nov 18, 2024 7:55 AM (UTC)

❌ Failed Tests (2) -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 46s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 30s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ❌ Failed (Inspect) 58s 9 7 2
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 46s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 46s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 17s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 27s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 37s 12 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

@@ -1656,7 +1659,7 @@ export const studioLocaleStrings = defineLocalesResources('studio', {
* Label for determining since which version the changes for timeline menu dropdown are showing.
* Receives the time label as a parameter (`timestamp`).
*/
'timeline.since': 'Since: {{timestamp, datetime}}',
'timeline.since': '{{timestamp, datetime}}',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Is there any need for this now? I don't imagine the formatting here will be localized

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, actually I'm removing that in the changes I'm introducing for this in corel I think we can clear it there.

Copy link
Contributor

@RitaDias RitaDias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, I don't think that Jordan's suggestion is blocking for the approval but also a fair point to bring up. In any case ✅

RitaDias and others added 16 commits November 18, 2024 08:46
* feat(sanity): update restore button

* chore(sanity): update translations

* feat(sanity): add left side information on footer (revision status line)
…el (#7435)

* feat(structure): add history and review tabs to changes inspector panel

* fix(structure): move changes inspector navigation to paneRouter

* fix(structure): update isReviewChangesOpen check in ChangeConnectorRoot

* fix(structure): rename uses of version to revision

* chore(core): rename review changes action to history
…nks (#7449)

* feat(structure): update TimelineItem to match new UI, prepare for chunks

* chore(core): export getCalendarLabels to support DateTimeInput reusability
* feat(structure): add squashed chunks to timeline

* feat(structure): refactor expandable item, all items need to be rendered in the same virtual list

* feat(structure): expand elements on menu click

* chore(structure): clean timeline item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants