empress icon indicating copy to clipboard operation
empress copied to clipboard

Reset UI elements on reloading the page

Open fedarko opened this issue 3 years ago • 1 comments

It's possible for the user to press "back" on an Empress visualization, then press "forward" to return to the visualization. Due to browsers attempting to be helpful, some of the UI elements may have settings in the returned-to visualization that differ from their default values: see, for example, the GIF below, where I need to un-check then re-check the feature metadata checkbox in order to open up most of the feature metadata panel.

funkybug

(The reason the internal f.m. stuff like colorscheme / line width are reset is because SidePanel._resetFeatureTab() is called when un-checking the feature metadata checkbox -- but that is an accidental safeguard. We can't assume all of the UI elements will be correctly reset.)

For what it's worth, this sort of issue came up with Qurro also. (I haven't addressed it yet there.)

I think a simple way to fix this would be adding some logic to Empress' HTML (maybe with a jQuery onready event, or whatever it's called) that resets all of Empress' UI elements to their default values. Not sure what would be best, though.

fedarko avatar Jul 18 '20 01:07 fedarko

FWIW, it looks like this currently breaks the interface because some code in the side panel assumes that the leaf sorting selector has already been assigned a value? Not sure exactly what is going wrong, but refreshing the Empress tab after pressing "forward" fixes the problem.

leafsortingbug

fedarko avatar Oct 08 '20 22:10 fedarko