codepod-io / codepod

Codepod IDE: Scalable Interactive Coding
https://codepod.io
MIT License
74 stars 15 forks source link

[UI][RFC] SelectiveView #471

Open senwang86 opened 1 year ago

senwang86 commented 1 year ago

Summary

A prototype of SelectiveView via multi-select items in ToC

However

Test

selective_view

lihebi commented 1 year ago
  • 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

senwang86 commented 1 year ago
  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.

lihebi commented 1 year ago

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

Oh, I see.