Commit graph

503 commits

Author SHA1 Message Date
boatbomber
588424707d Use latest plugingui component 2023-09-18 17:56:31 -04:00
boatbomber
c9ca6bed74 Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api 2023-09-18 17:54:32 -04:00
boatbomber
840e9bedb2
Use GUIDs for ephemeral PluginWidgets (#784)
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.
2023-09-18 21:44:14 +00:00
boatbomber
d1d70521a3 Properly handle changing and removing permissions 2023-09-04 08:46:14 -07:00
boatbomber
955b143ced Change to a game.Rojo module instead of _G 2023-09-04 08:22:58 -07:00
boatbomber
b401b6db2f Use new setting input prop 2023-08-20 22:00:38 -07:00
boatbomber
4ab51e1906
Merge branch 'master' into headless-api 2023-08-20 21:58:03 -07:00
boatbomber
c43726bc75
Confirmation behaviors (#774) 2023-08-20 12:37:40 -07:00
Kenneth Loeffler
c9ab933a23
Update rbx_dom_lua to rojo-rbx/rbx-dom@7b03132 (#775)
Fixes a problem where the MaterialColors Lua encoder would return nothing
2023-08-16 16:47:04 -07:00
boatbomber
dda01ae9bb Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api 2023-08-15 06:14:54 -07:00
Micah
d748ea7e40
Update rbx_dom dependencies (#768) 2023-08-09 21:54:47 -07:00
boatbomber
a7a282078f
Update Highlighter submodule from 0.8.1 to 0.8.2 (#767)
Highlighter had an edge case with changed events racing, which has been
resolved in the 0.8.2 patch.
2023-08-09 06:40:35 +00:00
boatbomber
2fad3b588a
Fix theme (#763) 2023-08-03 00:47:03 +00:00
utrain
4cb5d4a9c5
Update Theme to use Color3.fromHex (#761) 2023-08-01 09:36:29 -07:00
Micah
5b22ef192e
Don't override initial state for source diff view (#760) 2023-08-01 09:33:06 -07:00
boatbomber
34024d8524
Fix PatchTree performance issues (#755)
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
2023-07-31 22:26:16 -07:00
boatbomber
ecc31dea15
View rich diffs for Source property changes (#748) 2023-07-26 23:50:29 -07:00
boatbomber
1220b5c0d6 Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api 2023-07-16 21:05:57 -07:00
boatbomber
4915477823
Expose reconciler hooks on servesession (#741) 2023-07-17 04:03:06 +00:00
boatbomber
8662d2227c
Improve Rojo sync reliability (#739)
Uses non-recursive main loop and avoids hanging promises
2023-07-16 14:59:30 -07:00
boatbomber
6e40993199
Rework patch visualizer with many fixes and improvements (#726)
- 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
2023-07-13 20:09:19 -07:00
boatbomber
9d48af2b50
Better settings control (#725)
- Lock some settings during sync
- Make experimental features more clearly labelled
2023-07-12 13:00:07 -07:00
boatbomber
28d48a76e3
Fix tooltips crashing on thread cancellation edge cases (#727) 2023-07-12 10:01:21 -07:00
boatbomber
623fa06d52
Improve tooltip behavior (#723) 2023-07-08 21:41:47 -07:00
boatbomber
7154113c13
Add buttons on connected page (#722) 2023-07-08 21:23:25 -07:00
boatbomber
0a932ff880
Show failed to apply in visualizer (#717)
Objects with failed changes will highlight, and the specific failed
changes in their list will highlight as well.
2023-07-08 19:31:26 -07:00
boatbomber
7ef4a1ff12
Select Instances from diff tree (#709) 2023-07-08 18:45:25 -07:00
boatbomber
a0b99317bc Fix editing permissions to use new request api 2023-07-08 15:39:54 -07:00
boatbomber
27357110b5
Handle strings and instances in patch removes for visualizer (#713)
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.
2023-07-08 14:37:42 -07:00
boatbomber
fde78738b6
Improve sync info (#692)
- 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
2023-07-05 21:38:11 +00:00
boatbomber
ce530e795a
Fix Rojo breaking when users undo/redo in Studio (#708) 2023-07-05 14:09:11 -07:00
boatbomber
dcfdf7fabd Prevent misuse of RequestAccess 2023-07-04 19:21:32 -07:00
boatbomber
91cba1b0e9 Return dismiss function from Notify 2023-07-04 15:09:11 -07:00
boatbomber
5c0e1d0ec4 Adjust the UI for third party notifications to include source 2023-07-04 14:34:38 -07:00
boatbomber
dd30b1686b Improve sanitization error messages 2023-07-04 14:34:15 -07:00
boatbomber
2f78d94370 Undo old notif changes 2023-07-04 13:56:48 -07:00
boatbomber
7d1ee6eb53 Support actions on third party notifs 2023-07-04 13:53:49 -07:00
boatbomber
a795e23c3c Fix typo in log 2023-07-04 13:46:31 -07:00
boatbomber
1ff018a2ce Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api 2023-07-04 13:45:36 -07:00
boatbomber
658d211779
Sync reminder notification & notification actions (#689)
Implements and closes #652.

---------

Co-authored-by: Chris Chang <51393127+chriscerie@users.noreply.github.com>
Co-authored-by: Micah <git@dekkonot.com>
2023-07-04 20:09:41 +00:00
boatbomber
66c1cd0d93
Add protection against syncing non place projects (#691)
Closes #113.

Does what it says on the tin. When you try to sync a non-place project,
it gives a clear message instead of crashing.
2023-06-30 13:44:42 -07:00
boatbomber
55ac231cec
Skip confirming patches that only contain a datamodel name change (#688)
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>
2023-06-30 11:21:36 -07:00
boatbomber
6542304340
Fix the diff visualizer of connected sessions (#674)
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.

![slowedDemo](https://github.com/rojo-rbx/rojo/assets/40185666/c9fc8489-72a9-47be-ae45-9c420e1535d4)
2023-06-03 22:46:16 -07:00
boatbomber
6b0f7f94b6
Fix disconnected session activity (#675)
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.
2023-06-01 08:18:04 -07:00
boatbomber
ba634d4778 Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api 2023-05-31 14:40:39 -04:00
Kenneth Loeffler
d87c76a23e
Switch plugin packages back to git submodules (#678)
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.
2023-05-26 10:26:21 -07:00
Miizzuu
4b62190aff
Fix wrong version of Rojo displaying in studio. (#669) 2023-05-06 01:00:45 -07:00
Lucien Greathouse
c0219922b2 Update dependencies 2023-04-22 15:44:49 -04:00
boatbomber
36ec55de52
Merge branch 'master' into headless-api 2023-04-02 02:59:26 -04:00
boatbomber
b5ed952d5c
Add visual diffs to syncing (#603)
* 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
2023-04-01 23:17:23 -04:00