codepod icon indicating copy to clipboard operation
codepod copied to clipboard

[UI][RFC] SelectiveView

Open senwang86 opened this issue 1 year ago • 3 comments

Summary

A prototype of SelectiveView via multi-select items in ToC

  • The Canvas only displays selected pods.
  • The Edit mode is not affected.

However

  • The current implementation renders a deep copy of the selected pods from nodesMap in updateView(), thus ALL operations that engage with nodesMap need to be properly synced, e.g., moving a pod, creating a new pod, changing the size of a pod, etc. I am not exactly sure if it's the best approach and ask for some comments here.

Test

selective_view

senwang86 avatar Aug 26 '23 02:08 senwang86

  • The current implementation renders a deep copy of the selected pods from nodesMap in updateView()

I didn't see "a deep copy". I think you are doing the right thing here, to compute a subset of nodes and set({nodes}).

However, I don't quite understand the gif/code:

  1. Your gif doesn't show a "partial view" of the canvas. All pods seem to be shown.
  2. The sidebar ToC should be "togglable" into three states (selected, hidden, blocked), something like this:

image

lihebi avatar Aug 26 '23 03:08 lihebi

  1. Your gif doesn't show a "partial view" of the canvas. All pods seem to be shown.

It's due to the native multi-selection of tree-view, instead of checkbox-based selection, the selective view happens when there're more than 1 items selected in ToC.

senwang86 avatar Aug 26 '23 03:08 senwang86

the selective view happens when there're more than 1 items selected in ToC.

Oh, I see.

lihebi avatar Aug 26 '23 03:08 lihebi