-
Notifications
You must be signed in to change notification settings - Fork 182
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
Select Instances from diff tree #709
Conversation
Great change. It's not immediately obvious that right click selects the instance. Especially when the behavior allows selection for left click without a changes table, I would just think that selecting is only possible for instances without changes. I'd suggest either:
|
Thanks for the feedback!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selecting instances probably shouldn't also trigger dropdown expansion. Otherwise if a user already has it expanded and want to select the instance, they'd need to select it and open changes back up.
The delay here can be up to debate. Microsoft has 500ms as the default, but I find 200-300ms to be sufficient for this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, as a miner pet peeve, I've noticed that it this seems to only work for the top-level of a change's tree.
As an example, if a patch like this is present:
you could double click on Common
to select it in the explorer but not Hello
.
My expected behavior would be that it would work for both. Is that something that can be easily fixed?
@Dekkonot Is this for connecting to rojo? It’s only able to select it in the explorer if it exists. It looks like you’re adding the script than modifying it (assuming green + is instance addition) |
This is on initial sync into a new place file and then I'm clicking through the patch visualizer after confirming that sync. I was surprised it worked with |
That's odd. If the instance exists (and the instanceMap is aware), it should be clickable. |
It looks like instance isn't being passed to addition nodes. Passing the instance here should fix it. rojo/plugin/src/App/Components/PatchVisualizer/init.lua Lines 341 to 342 in be2109c
- for _, change in patch.added do
+ for id, change in patch.added do
...
tree:addNode(change.Parent, {
id = change.Id,
patchType = "Add",
className = change.ClassName,
name = change.Name,
hint = hint,
changeList = changeList,
+ instance = instanceMap.fromIds[id],
})
end |
Good catch, thanks guys! |
Closes #707.
Double clicking selects the Instance, if the Instance exists. Single clicking opens the changes list, if changes exist.
Tooltips indicate which actions are available for the underlying DOM element.
2023-07-04.12-52-46.mp4