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

Rework patch visualizer with many fixes and improvements #726

Merged
merged 20 commits into from
Jul 14, 2023

Conversation

boatbomber
Copy link
Member

@boatbomber boatbomber commented Jul 10, 2023

Closes #714.

The patch visualizer logic had a serious flaw: it was given a patch but the state of the world may be before or after that patch was applied, making it potentially impossible to build a tree from the patch data.

This PR totally reworks that, and makes some other improvements while we're at it.

  • Reconciler now has precommit and postcommit hooks for patch applying
    • This is used to compute a patch tree snapshot precommit and update the tree metadata postcommit
    • Could be useful for more things down the line! Maybe patch preprocessing middleware? Who knows
  • PatchVisualizer can now display Removes that happened during sync
    • It was previously missing because the removed objects no longer existed so it couldn't get any info on them (This is resolved because the info is gotten in precommit, before the instance was removed)
  • PatchVisualizer now shows Old and New values instead of just Incoming during sync
    • (Still displays Current and Incoming during confirmation)
    • This is much more useful, since you now see what the changes were and not just which things were changed
  • PatchVisualizer displays clarifying message when initial sync has no changes instead of just showing a blank box
  • Objects in the tree UI no longer get stuck expanded when the next patch has the same instance but different info on it
  • Objects in the tree UI correctly become selectable after their instance is added and unclickable when removed during sync

@boatbomber boatbomber marked this pull request as ready for review July 10, 2023 08:20
@boatbomber boatbomber changed the title Patch visualizer rework Rework patch visualizer with many fixes and improvements Jul 10, 2023
@boatbomber boatbomber requested a review from Dekkonot July 10, 2023 08:22
Copy link
Contributor

@chriscerie chriscerie left a comment

Choose a reason for hiding this comment

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

Good work!

plugin/src/App/init.lua Outdated Show resolved Hide resolved
plugin/src/App/StatusPages/Connected.lua Outdated Show resolved Hide resolved
@boatbomber boatbomber enabled auto-merge (squash) July 10, 2023 17:19
Copy link
Member

@Dekkonot Dekkonot left a comment

Choose a reason for hiding this comment

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

While this looks good, I'd like more comments. It might be obvious right now what is going on in PatchTree but if someone else comes along, they'd have to spend a little bit of time to figure out how to work with it and what it's used for. A few comments at the top of the file and above the methods describing their function would go a long way.

@boatbomber
Copy link
Member Author

True! I'll document this tonight.

@boatbomber boatbomber requested a review from Dekkonot July 13, 2023 03:05
plugin/src/PatchTree.lua Outdated Show resolved Hide resolved
plugin/src/PatchTree.lua Outdated Show resolved Hide resolved
plugin/src/PatchTree.lua Outdated Show resolved Hide resolved
plugin/src/PatchTree.lua Outdated Show resolved Hide resolved
Copy link
Member

@Dekkonot Dekkonot left a comment

Choose a reason for hiding this comment

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

This changelog is getting out of hand, we're gonna have to condense it at release!

@boatbomber boatbomber merged commit 6e40993 into rojo-rbx:master Jul 14, 2023
4 checks passed
@boatbomber boatbomber deleted the patch-visualizer-precommit branch July 14, 2023 03:23
Dekkonot pushed a commit to UpliftGames/rojo that referenced this pull request Jan 11, 2024
- Reconciler now has precommit and postcommit hooks for patch applying
  - This is used to compute a patch tree snapshot precommit and update the
tree metadata postcommit
- PatchVisualizer can now display Removes that happened during sync
  - It was previously missing because the removed objects no longer
existed so it couldn't get any info on them (This is resolved because
the info is gotten in precommit, before the instance was removed)
- PatchVisualizer now shows Old and New values instead of just Incoming
during sync
  - (Still displays Current and Incoming during confirmation)
  - This is much more useful, since you now see what the changes were and
not just which things were changed
- PatchVisualizer displays clarifying message when initial sync has no
changes instead of just showing a blank box
- Objects in the tree UI no longer get stuck expanded when the next
patch has the same instance but different info on it
- Objects in the tree UI correctly become selectable after their
instance is added and unclickable when removed during sync
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.

Patch visualizer cannot show Instances that were removed during sync
3 participants