diff --git a/TODO.txt b/TODO.txt index 0db1c29a..1bc4c5bd 100644 --- a/TODO.txt +++ b/TODO.txt @@ -339,9 +339,6 @@ We need to investigate Tree reconciliation, make sure it's parallel, etc. I'd really like to just reconcile specific paths that were modified - but i'm not sure if that just defeats the purpose.. need to explore this topic later. Worst case - we reconcile only on connect, but do so in mega-parallel -[change visualizer] -we should support right-click to unselect the bubble (atlas/studio/skip) - [auto select issue] when you commit changes on git, it's considered unchanged. we should send like the last git hash too, like prior to head, too. diff --git a/plugin/src/App/Components/PatchVisualizer/DomLabel.lua b/plugin/src/App/Components/PatchVisualizer/DomLabel.lua index 268e1c0d..b10c1fc7 100644 --- a/plugin/src/App/Components/PatchVisualizer/DomLabel.lua +++ b/plugin/src/App/Components/PatchVisualizer/DomLabel.lua @@ -243,6 +243,17 @@ function SelectionOption:render() end end end, + [Roact.Event.MouseButton2Click] = function() + if isParentOnly or (isSelected and hasChildren) then + if props.onSubtreeRightClick then + props.onSubtreeRightClick() + end + else + if props.onRightClick then + props.onRightClick() + end + end + end, }, { Corner = e("UICorner", { CornerRadius = UDim.new(0, 3), @@ -295,6 +306,16 @@ local function SelectionRadio(props) props.onSubtreeSelectionChange(props.nodeId, "pull") end end, + onRightClick = function() + if props.onSelectionChange then + props.onSelectionChange(props.nodeId, nil) + end + end, + onSubtreeRightClick = function() + if props.onSubtreeSelectionChange then + props.onSubtreeSelectionChange(props.nodeId, nil) + end + end, }), Skip = e(SelectionOption, { text = "Skip", @@ -316,6 +337,16 @@ local function SelectionRadio(props) props.onSubtreeSelectionChange(props.nodeId, "ignore") end end, + onRightClick = function() + if props.onSelectionChange then + props.onSelectionChange(props.nodeId, nil) + end + end, + onSubtreeRightClick = function() + if props.onSubtreeSelectionChange then + props.onSubtreeSelectionChange(props.nodeId, nil) + end + end, }), Atlas = e(SelectionOption, { text = "Atlas", @@ -337,6 +368,16 @@ local function SelectionRadio(props) props.onSubtreeSelectionChange(props.nodeId, "push") end end, + onRightClick = function() + if props.onSelectionChange then + props.onSelectionChange(props.nodeId, nil) + end + end, + onSubtreeRightClick = function() + if props.onSubtreeSelectionChange then + props.onSubtreeSelectionChange(props.nodeId, nil) + end + end, }), }) end