numberscope / frontscope

Numberscope's front end and user interface: responsible for specifying sequences and defining and displaying visualizers
MIT License
7 stars 15 forks source link

FactorHistogram overhaul for alpha #449

Open gwhitney opened 2 months ago

gwhitney commented 2 months ago

This is one of a series of issues, one for each visualizer, to make sure they are "alpha-ready". The main aspects of this overhaul are:

Does the visualizer handle/request canvas size/aspect ratio gracefully and appropriately for the new ui?

Is the visualizer pushing as much validation down to the per-parameter checks as possible?

Is it doing the appropriate level of resetting/recomputation in presketch vs setup?

Is it using descriptions, warnings, and errors appropriately, and not changing the user's input out from under their keystrokes? (Note that if a human interaction entails a change in another parameter -- for example, if you were binning terms and there were 10K terms then setting bin size to 10 might change number of bins to 1000, while changing the number of bins to 100 would change the bin size to100 -- that's OK; we just don't want to seem to be ignoring or contradicting their immediate keystrokes; instead, we inform the person what's at issue with what they entered.

Is it sufficiently and appropriately responsive to events and input? Does it handle resizes as gracefully as can be in the current scheme?

In some cases, there are accumulated small previously-existing issues that should be addressed as well.

gwhitney commented 2 months ago

Consider resolving #296

gwhitney commented 2 months ago

Not sure what has gone wrong, but visualizing a Random sequence with FactorHistogram and changing the maximum value attainable is not redrawing the graph :( -- whereas it does with other visualizers like Turtle. Most likely this is some bug in the infrastructure, not with FactorHistogram itself, but it should be debugged and fixed along with this overhaul.

katestange commented 1 month ago

With PR #420 there will be some changes to the FactorHistogram, notably that it runs with webGL and has zoom/pan. There are still a few corner cases of resulting weirdness dubbed low priority, if we wish to revisit when overhauling.

gwhitney commented 1 month ago

visualizing a Random sequence with FactorHistogram and changing the maximum value attainable is not redrawing the graph

I think it is again working correctly in ui2 at the moment, but should definitely be checked in the overhaul. Except for Turtle in progress, these overhauls should probably be left to the end in terms of fixing issues for alpha release.

gwhitney commented 2 weeks ago

There is a problem in that when Histogram is rotated (e.g. by 90 degrees), the mouseovers no longer correspond to the bar positions. (This is from #404.) The solution we agreed on is to disable rolling the camera for Histogram -- it's not really useful for anything.