Due to the rewrite of the plugin's core sync loop and the change for the
Notify backend on MacOS, along with all the other changes in 7.4.0, it
makes sense for us to use a release candidate before actually cutting a
proper `7.4.0` release.
This modifies Rojo's build script to throw a fit if we're building a
plugin with a semver incompatible version. In the process, it moves the
version of the plugin to a file named `Version.txt` that's parsed at
runtime. This should be minimally invasive but it's technically worse
for performance than the hardcoded table and string we had before.
This feels better than a CI check or just manually verifying because it
makes it physically impossible for us to forget since Rojo won't build
with it being wrong.
Because Roact will destroy and recreate a plugin widget if it unmounts
and remounts, Studio will complain about making a new widget with the
same ID as the old one.
The simplest solution is to just use GUIDs so we never have to worry
about this again. The ID is used internally for storing the widget's
dock state and other internal details, so we don't want *all* our
widgets to use GUIDs, only the ephemeral popup ones.
When building the tree, I've implemented a few improvements:
- We no longer traverse the full ancestry for every leaf node- we exit
early when we find a node that already exists
- We no longer search the entire tree to see if a node id exists before
creating one with that id, we just check if is in the map
- 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
When an object is deleted in a patch, it is either represented with an
ID or an Instance. On initial sync, removals are instances since the map
does not contain those instances. Later removals of managed objects use
an ID. The patch visualizer only handled instances, so this fixes that.
Closes#710.
- Fixed an edge case where disconnecting and then reconnecting would
retain outdated info
- Fixed an issue where new patches wouldn't immediately update the
change info text
- Removed extraneous changes count info, as it was not useful and could
be checked in the visualizer anyway
- Added warning info for when some changes fail to apply
- Updates timestamp of last sync even if patch was empty, to have a more
accurate signal on Rojo's uptime
Closes#672.
Skips the user confirmation if the patch contains only a datamodel name
change.
I decided to build generic PatchSet utility functions in case we need to
use similar logic in the future, in addition to maintaining clear
division of duties. The app code shouldn't be too dependent upon patch
internal structure when we can avoid it.
---------
Co-authored-by: Kenneth Loeffler <kenloef@gmail.com>
Clicking on the "X changes X ago" message opens up a handy diff
visualizer to see what those changes were. However, it had quite a few
issues that needed fixing.
- Disconnecting a session with it expanded caused an error as it tried
to read the serveSession that no longer exists during the page fade
transition. (#671)
- Resolved by converting to stateful component and holding the
serveSession during the lifetime to ensure it can render the last known
changes during the fade transition
- Leaving it open while new changes are synced did not update the
visualizer
- The patch data was piggybacking on an existing binding, which meant
that new patches did not trigger rerender.
- Resolved by converting to state
- Also made some improvements to that old binding
- Moved from app to connected page for better organization and
separation of duties
- No more useless updates causing rerenders with no real change
- Scroll window child component wouldn't actually display the updated
visuals
- Resolved by making major improvements to VirtualScroller
- Made more robust against edge case states
- Made smarter about knowing when it needs to refresh
As you can see in this slow motion GIF, it works now.

When a session is disconnected, the apiContext long-polling for messages
continues until resolved/rejected. This means that even after a session
is disconnected, a message can be received and handled.
This leads to bad behavior, as the session was already cleaned up and
the message cannot be handled correctly. The instance map was cleaned up
upon disconnect, so it will warn about unapplied changes to unknown
instances. (Like #512)
It's very easy to repro:
Connect a session, disconnect it, then save a change.
https://github.com/rojo-rbx/rojo/assets/40185666/846a7269-7043-4727-9f9c-b3ac55a18a3a
-----------
This PR fixes that neatly by tracking all active requests in a map, and
cancelling their promises when we disconnect.
Alright, so I hate to be the one to do this, but #584 broke crates.io
publishing and also caused librojo to be unusable. I see that there was
some discussion on Discord shortly after the problem was realized, but
there was no action taken.
I think keeping librojo and publishing working far, far outweigh any
convenience added by Wally.
I've kept the same `Packages` naming convention to keep the diff
minimal.
* 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
* Add the devsetting config options into settings
* Create dropdown component and add setting controls
* Static dropdwon width and spin arrow
* Improve dropdown option contrast and border
* Forgot to make the settings page respect the static spacing, oops
* Smaller arrow
* Vert padding
* Reset option for settings
* Hide reset button when on default
* Respect the logLevel setting
* Portal settings out to external typechecking module
* Implement new configs using the new singleton Settings
* Remove DevSettings
* Update test runner to use new settings
* More helpful test failure output
* Support non-plugin environment
* Migrate dropdown to new packages system
* Clean up components a tad
* Rough prototype of patch info display
* Remove extra newline
* Switch to binding
* Update slower for older timestamps
* Batch patches within a second of each other
* Fix indentation
* Less wasteful refresh hz
* More apt variable name
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
* Switch git submodules to Wally packages
* Update build snapshot
* Add wally to foreman and use latest versions
* Install packages in CI runners
* Fix indents
* Install packages in the correct directory
* Install packages in correct dir of release action too
* Remove submodules from ci checkout
* Remove submodules from release checkout
* Update selene with latest fix
* Fix whitespace
Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
* Use singleton settings outside the Roact tree
* Cleanup listener on unmount
* Refactor setting page components
* Fix willUnmount being added to the wrong table
* Remove bindings in favor of state