AREPL-vscode icon indicating copy to clipboard operation
AREPL-vscode copied to clipboard

remember expanded choices in variable display

Open Almenon opened this issue 6 years ago • 2 comments

It's annoying to have to constantly re-expand a variable if it is hidden deep into the layers of nested JSON.

I have a default expand setting but it is for the entire JSON, which is way too broad.

The user should be able to expand & unexpand and have his/her/ choice's remembered next run

Almenon avatar Jul 01 '18 00:07 Almenon

When someone close a list in AREPL, pick its name and store it in a txt file or json file. The txt file or json file will contain:

  1. the python file name (the doc on which the real-time evaluation is happening)
  2. The variable names that user has collapsed to shorten the view.

When previewing the AREPL json output, AREPL will TRY to find names in the txt/json file. If it exists then it will show collapsed. If not, expanded.

When user expands it again, the txt/json will be updated each time. If error occurs, users will have an option to "clear variable view states" command, which will delete/empty the txt/json file. ☺️

I'm newbie in python. You guys will have better ideas than me, but i jst wanted to share a way.

vfxturjo avatar Feb 04 '22 11:02 vfxturjo

Thanks for the thoughts! That's pretty much what could happen, except there's no need to store the data in a file when you could store it in a variable. Reading and writing to a variable is much faster than file system I/O. You would want to write to an external service or file when the data you're writing is so large that it would use up too much of your program's memory, or if you wanted the data to remain after the end of the program.

Almenon avatar Feb 05 '22 21:02 Almenon