Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Display nested data structures #177

Closed
jtpio opened this issue Nov 13, 2019 · 2 comments
Closed

Display nested data structures #177

jtpio opened this issue Nov 13, 2019 · 2 comments
Milestone

Comments

@jtpio
Copy link
Member

jtpio commented Nov 13, 2019

Now that #125 has been merged, we can request more variables when expanding a tree node.

However we don't support nested data structures yet, such as a dict in a dict:

image

But it looks like we could do some further refactoring, and end up having:

  • The current scopes and variables, as returned by the DAP, stored in memory in the model
  • A mapper that transforms the data from the DAP, and maintains a JSON-like data structure that represents the variables as the state
  • The react view that consumes the JSON-like state and renders the tree as is
  • The tree view component should also support events when a node is expanded
  • On expand, a request is sent to the kernel to retrieve more information for the variable using the variableReference

There is already some of this logic in the current implementation, but we should try to separate the state management, rendering and event handling even more.

Also we should check whether or not the current variableExpanded signal is needed in the model. Or if we can make the request for more variables via the service directly:

get variableExpanded(): ISignal<this, IVariable> {
return this._variableExpanded;
}

@jtpio
Copy link
Member Author

jtpio commented Nov 13, 2019

At the moment, there is a short period of time where we see the previous content:

image

As a workaround we could check if it's possible to override the empty dict when the node is collapsed.

This was introduced in dbead19

@jtpio jtpio added this to the Future milestone Nov 13, 2019
@jtpio jtpio modified the milestones: Future, 0.2.0 Dec 12, 2019
@KsavinN
Copy link
Collaborator

KsavinN commented Feb 7, 2020

#347

@KsavinN KsavinN closed this as completed Feb 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants