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

Immutable.js state and diffs suddenly rendering horribly after 2.15.3 or 2.15.4 #581

Closed
vdh opened this issue Nov 20, 2018 · 3 comments
Closed

Comments

@vdh
Copy link

vdh commented Nov 20, 2018

I think this was caused by one of the recent releases, because this has only started happening today

The diffs are now completely unreadable:
screenshot 2018-11-20 17 36 54

The chart tab just dies with "error":
image

And that "Array of tuples" change from here in remotedev-serialize made it a nightmare trying to navigate through just a normal Map & List Immutable state. It's even worse than the similar Array-crazy pain that the React Dev tools inflicts upon us.

I mean look at this, it's a huge headache:
screenshot 2018-11-20 17 50 17
The distinction between List and Map data has been blurred horribly to the point that I can barely tell where I am in the tree anymore.

Compare with this extremely readable layout from immutable-object-formatter-extension (powered by immutable-devtools)
image

@zalmoxisus
Copy link
Owner

Thanks for the detailed report! I'm not using ImmutableJS myself and don't remember how the diffs were before. Could it be because of the same PR changing the way of showing Maps/Lists? Do you suggest to just revert that PR or have some ideas of how that could be improved? Would you like to work on a PR there to make it more readable?

@zalmoxisus
Copy link
Owner

Disregard the above. I looked into it. The problem is that PR fixes reconstructing the data, but breaks how it is displayed. We could implement ImmutableJS on extension part, but that would require every monitor to support it, so we are just showing what is sent. Transforming Immutable Map into an Object makes it easier for visualization (and diffs), but has the issue with non-string keys, which cannot be used for objects. A solution would be to transform it into ES6 Map as we added support for it. I tried it now, but there's an issue with jsan calling the reviver before data is reconstructed, so we're not getting the Map back. I'll look if that can be addressed, or will just revert that PR for now.

@zalmoxisus
Copy link
Owner

That would be a regression anyway as Chart monitor doesn't support ES6 Map. That should be implemented in map2tree.

For now I reverted zalmoxisus/remotedev-serialize#9 and published 2.15.5 on Chrome Store.

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

No branches or pull requests

2 participants