MLH-Fellowship / babel-sandbox

Babel repl-like codesandbox: check out link =>
https://codesandbox.io/s/github/babel/sandboxes
MIT License
6 stars 3 forks source link

Add JSON view for AST visualization #90

Closed barronwei closed 4 years ago

barronwei commented 4 years ago

This pull request adds a JSON view for the AST on the same pane as well as the option to hide the AST via the x and show the AST via the menu. If the AST is already being shown, the menu item is disabled.

barronwei commented 4 years ago

Will this PR also include saving states for switching between AST Explorer and JSON?

No, the AST visualization is shown by default.

wlawt commented 4 years ago

Will this PR also include saving states for switching between AST Explorer and JSON?

No, the AST visualization is shown by default.

As in, if I expanded the entire AST visualization then switched to JSON then switch back, it results back to default.

barronwei commented 4 years ago

Will this PR also include saving states for switching between AST Explorer and JSON?

No, the AST visualization is shown by default.

As in, if I expanded the entire AST visualization then switched to JSON then switch back, it results back to default.

Yeah, the two do not share any state, so upon rendering one, the state of the other is wiped.

wlawt commented 4 years ago

Will this PR also include saving states for switching between AST Explorer and JSON?

No, the AST visualization is shown by default.

As in, if I expanded the entire AST visualization then switched to JSON then switch back, it results back to default.

Yeah, the two do not share any state, so upon rendering one, the state of the other is wiped.

Should we consider saving it, so that someone can just come back to where they left off? Maybe we can save this for a future issue

ianjennings commented 4 years ago

Will this PR also include saving states for switching between AST Explorer and JSON?

No, the AST visualization is shown by default.

As in, if I expanded the entire AST visualization then switched to JSON then switch back, it results back to default.

Yeah, the two do not share any state, so upon rendering one, the state of the other is wiped.

Should we consider saving it, so that someone can just come back to where they left off? Maybe we can save this for a future issue

Sounds like an edge case, I say future.