-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make internals accessible #1
base: master
Are you sure you want to change the base?
Conversation
in order to programatically control the json view a number of currently private fields need to be public so that e.g. it is possible to control the layout of the tree and know where/how the user is interacting with the view also handle cases where user preferences are not set
can now install via raco pkg install --name json-view racket-json-view/ and then (require json-view)
Hi, This should be split in multiple PR (one for the pref fix, one for the info.rkt, etc.). |
I'll split them into separate requests. An example of the use case for exposing the internals is that I want to have certain nodes opened by default so that a user doesn't have to click on them to open every time, and the other is to make it possible to sort the hierlist according to some criteria. Another example would be that I need to implement a button that toggles the expansion of all nodes the same way the firefox json viewer does. |
When loading large json files building the hierlist takes a extremely long time, locking the interface. This commmit modifies how the hlist is built so that nested json objects are only loaded as hierlists when they are opened. This significantly improves performance. One optimization that has not beend implemented is to remove rendered objects from the unexpanded cache once they have been rendered.
also provied json-hierlist% so that it can be subclassed to customize
this fails if someone modifies or extends a configuration file so handle that case
vector-ref does not like receiving #f as an argument, as a failover we set 14, otherwise it seems to default to 1 or some absurdly small number
in order to programatically control the json view a number of
currently private fields need to be public so that e.g. it is possible
to control the layout of the tree and know where/how the user is
interacting with the view
also handle cases where user preferences are not set