-
Notifications
You must be signed in to change notification settings - Fork 185
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
Add visual diffs to syncing #603
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phenomenal work as always |
love the icons and ui |
LPGhatguy
approved these changes
Apr 2, 2023
Dekkonot
pushed a commit
to UpliftGames/rojo
that referenced
this pull request
Jan 11, 2024
* Add user confirmation to initial sync * Use "Accept" instead of "Confirm" * Draw tree alphabetically for determinism * Add diff table dropdown * Add diff table to newly added objects * Unblock keybind workflow * Only show reject button when two way is enabled * Try to patch back to the files when changes are rejected * Improve text spacing of the prop diff table * Skip user confirmation of perfect syncs * Give instances names for debugging UI * Optimize tree building * Efficiency: dynamic virtual scrolling & lazy rendering * Simplify virtual scroller logic and avoid wasteful rerenders * Remove debug print * Consistent naming * Move new patch applied callback into accept * Pcall archivable * Keybinds open popup diff window * Theme rows in diff * Remove relic of prototype * Color value visuals and better component name * changeBatcher is not needed when no sync is active * Simplify popup roact entrypoint * Alphabetical prop lists and refactor * Add a stroke to color blot for contrast * Make color blots animate transparency with the rest of the page * StyLua formatting on newly added files * Remove wasteful table * Fix diffing custom properties * Display tables more meaningfully * Allow children in the button components * Create a rough tooltip component * Add tooltips to buttons * Use provider+trigger schema to avoid tooltip ZIndex issues * Add triangle point to tooltip * Tooltip underneath instead of covering * Cancel hovers when unmounting * Allow multiple canvases from one provider * Display above or below depending on available space * Move patch equality to PatchSet.isEqual * Use Container * Remove old submodules * Reduce false positives in diff * Add debug log * Fuzzy equals CFrame in diffs to avoid floating point in * Fix decodeValue usage * Support the .changedName patches * Fix content overlapping border * Fix tooltip tail alignment * Fix tooltip text fit * Whoops, fix it properly * Move PatchVisualizer to Components * Provide Connected info with full patch data * Avoid implicit nil return * Add patch visualizer to connected page * Make Current column invisible when visualizing applied patches * Avoid floating point diffs in a numbers and vectors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
scope: plugin
Relevant to the Roblox Studio plugin
size: medium
status: needs review
This work is mostly done, but just needs work to integrate and merge it.
type: enhancement
Feature or improvement that should potentially happen
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When you initially connect to a serve, it displays a visual diff of all the changes it brings and asks the user to choose how to handle it. This helps prevent accidentally syncing the wrong place, and smooths the path towards proper two-way syncing.
You may choose "Accept" to bring in these changes or "Abort" to cancel and do nothing. For low friction, if the sync is perfect (no differences) it'll just auto accept and finish connecting. When two way sync is enabled there's a third option, "Reject", which syncs your Studio DOM back to your filesystem before connecting. (This is obviously pretty incomplete as two way sync is not quite there yet, but this PR ensures we have the infrastructure and some TODO comments in the right places.)
If your Rojo UI is not open (ie: syncing via keybind without Rojo actually open, or by closing Rojo before accepting/rejecting) it will open the diff in a popup window instead. This will toggle if you toggle the widget in middle so you never need more than one Rojo window open, reducing clutter.
Clicking on an edited instance in the diff will open a dropdown of specific property differences. Color3 values will show a blot of color along with their RGB values, and there is infrastructure to display other datatypes in special ways as well if we find others worth showing as more than text.
For further utility, the "Synced X changes T ago" text on the Connected page can now be clicked to view a visual diff of what those synced changes are. This makes Rojo less opaque and can additionally aid with diagnosing issues.