Skip to content
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

Hide some parameters in debug menu #775

Closed
popey456963 opened this issue Aug 12, 2020 · 5 comments · Fixed by #781
Closed

Hide some parameters in debug menu #775

popey456963 opened this issue Aug 12, 2020 · 5 comments · Fixed by #781

Comments

@popey456963
Copy link
Contributor

We pass some fairly large objects through the global state variable. Some items, such as the map, contain hundreds of entries. It would be useful to have a way to filter items seen through the debug menu.

@delucis
Copy link
Member

delucis commented Aug 12, 2020

There was some discussion of using something like svelte-json-tree to render G & ctx in the debug panel. Would that be helpful in this case too?

@popey456963
Copy link
Contributor Author

That would be perfect for our use case! 👍

@popey456963
Copy link
Contributor Author

I'm working on a PR for this.

@popey456963
Copy link
Contributor Author

On a branch that works but tests are failing: https://github.com/popey456963/boardgame.io/tree/feature/json-tree-in-debug-menu

@delucis
Copy link
Member

delucis commented Aug 19, 2020

One thing I think you need to do is to include svelte-json-tree in the list of node_modules that get transformed before being used by Jest here:

"node_modules/(?!(boardgame.io|flatted|svelte-icons)/)"

(This should address what you described on Gitter as “it's almost like the tests are trying to run on Svelte code and then failing when they realise it's svelte.”)

However, I also had a quick go with the plain svelte-json-tree package and got the build & examples working OK, but tests were producing errors despite changing that. (Producing TypeError: JSONNode is not a constructor errors.)

Feel free to open a work-in-progress PR so we can see the errors and try to figure things out there. Thanks for taking this on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants