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

Flat changelog items #32

Merged
merged 25 commits into from
Feb 28, 2024
Merged

Flat changelog items #32

merged 25 commits into from
Feb 28, 2024

Conversation

geoffreylitt
Copy link
Collaborator

This is a major refactor of the ReviewSidebar timeline view.

Previously we were rendering a list of ChangeGroups, and some had associated markers. This led to very messy UI structure and difficulty handling things like selection state.

This PR reworks the data structures so that we have a flat list of ChangelogItems which each represent a change group, a milestone, a branch creation, a branch merge, a comment, etc. Selection is handled in a much cleaner way; it's just a linear selection in that list.

Every ChangelogItem has a unique id, a doc heads, a list of users associated w/ that item, and a timestamp. This lets us uniformly render common elements across entries in the log.

export type ChangelogItem = {
  id: string;
  heads: Heads;
  users: AutomergeUrl[];
  time: number;
} & ({ type: "changeGroup"; changeGroup: ChangeGroup } | HeadsMarker);
CleanShot 2024-02-28 at 18 01 59@2x

Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for tee-production ready!

Name Link
🔨 Latest commit 77b448d
🔍 Latest deploy log https://app.netlify.com/sites/tee-production/deploys/65dfbc42755d410008f1e610
😎 Deploy Preview https://deploy-preview-32--tee-production.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@geoffreylitt geoffreylitt merged commit a92ad3e into patchwork Feb 28, 2024
4 checks passed
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.

None yet

2 participants