Open gwhitney opened 3 months ago
In looking at this since filing it, my sense has increased that the controls for what part of a sequence should be processed belong on the Sequence side. After all, the starting and ending indices are already attributes of a Sequence object, and Visualizers already respond to those. The Sequence object naturally has all of the information as to what indices are possible, so it can easily validate and provide feedback on requests to start/end at particular indices or have a certain number of terms. Finally, it seems to me it will facilitate the switch to a system where there can be multiple sequences -- it would seem awkward to me for a multi-sequence visualizer to have separate controls for the extent of each sequence, but natural for each sequence to have its own controls governing start/end indices and/or number of terms.
I just wanted to chime in that I agree.
Almost all visualizers need to deal with the first and last entries of the sequence they are viewing in some way. Differences has an "n" parameter, Chaos has a first and last that won't go beyond the boundaries, ModFill had a hardcoded limit of 1000 terms, etc., etc. It feels a bit idiosyncratic for the person making visualizations.
Is there a common structure that we can adopt for all visualizers that will do this in a uniform way? And have a common part of the UI for handling it? Should it perhaps even be controlled in the Sequence part, and then we just build into all Visualizers that they are expected to display the Sequence from first to last index? Or, if that turns out not to make sense, is there common handling of start and end indices we could put in (say) P5Visualizer base class?