sanity icon indicating copy to clipboard operation
sanity copied to clipboard

[WIP] feat(structure): History UI updates

Open pedrobonamin opened this issue 5 months ago • 3 comments

Description

This PR introduces changes in how the history and revision panel is shown.

  • 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

https://github.com/user-attachments/assets/bdbf89c0-825f-4d47-a655-0df22c51fee1

What to review

Are the changes correct? Is something missing?

Testing

Notes for release

Updates to history inspector UI

pedrobonamin avatar Sep 04 '24 07:09 pedrobonamin