-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add ability to have "canned" Formula sequences. #430
Comments
Resolved on October 29 meeting: The frontscope will keep a list of all sequences visited (since the last browser cache clear). The most recent N will be displayed visually in the sequence switcher (along with the mandatory "stock" ones, which I think should include a couple of OEIS and a couple of Formula and a Random). At the bottom of the switcher will be "History" dropdown, which will show all of the rest in a text-only format, but with hyperlinks to go back to them. There will still be a trashcan on the user ones, which will eliminate it from the visual list and relegate it only to the text History section. Note that this feature will be uniform for all classes of Sequences. A Sequence is considered visited when (a) a new URL with it as the sequence specification is loaded, (b) a Specimen is saved with that Sequence, or (c) when it is the current sequence and a new URL is loaded with a different sequence. This eliminates saving all the little intermediate versions as you play with the parameters of a sequence or the details of a formula. Remaining questions @katestange @Vectornaut:
Thanks for letting me know your thoughts. |
I like the beatty sequence formula! in your bullet 1. I like the fourth option in your bullet 2. |
OK, I will be getting to this soon after the docsite overhaul lands, so @Vectornaut if you would like to weigh in befoer then please do, or if either of you think this should wait until after our next in-person meeting please add the "meeting" label back. Otherwise the beatty sequence formula will become the other canned sequence and I will go with the "fourth option" on sequence identity, which is that the extents of a sequence are not considered part of sequence's identity, but the most recent ones used are saved. |
This partially resolves numberscope#430; the only portion remaining is to have a limit on the number of sequences that will show as thumbnails (the rest will show as a table or something like that). Also, testing for this commit revealed that the p5.brush addon does not work properly with multiple different sketches all updating asynchronously. Therefore, this commit removes p5.brush and provides a simple hatchRect() method in P5Visualizer (since hatching is all that p5.brush was being used for anyway). The current sequence is saved/updated in the list of remembered sequences when (a) the Scope view is first loaded; (b) the Scope view is closed; (c) a sequence or visualizer is selected in the SwitcherModal; or (d) the current specimen is saved to the Gallery. This commit removes the former list of OEIS IDs that was being saved in browser localStorage, as it is superseded by this sequence-saving feature. That removal means that the frontscope no longer (pre-)fetches a collection of OEIS sequences immediately on startup; they are loaded only as used.
This partially resolves numberscope#430; the only portion remaining is to have a limit on the number of sequences that will show as thumbnails (the rest will show as a table or something like that). Also, testing for this commit revealed that the p5.brush addon does not work properly with multiple different sketches all updating asynchronously. Therefore, this commit removes p5.brush and provides a simple hatchRect() method in P5Visualizer (since hatching is all that p5.brush was being used for anyway). The current sequence is saved/updated in the list of remembered sequences when (a) the Scope view is first loaded; (b) the Scope view is closed; (c) a sequence or visualizer is selected in the SwitcherModal; or (d) the current specimen is saved to the Gallery. This commit removes the former list of OEIS IDs that was being saved in browser localStorage, as it is superseded by this sequence-saving feature. That removal means that the frontscope no longer (pre-)fetches a collection of OEIS sequences immediately on startup; they are loaded only as used.
* feat: Save a history of any kind of Sequences (not just OEIS) This partially resolves #430; the only portion remaining is to have a limit on the number of sequences that will show as thumbnails (the rest will show as a table or something like that). Also, testing for this commit revealed that the p5.brush addon does not work properly with multiple different sketches all updating asynchronously. Therefore, this commit removes p5.brush and provides a simple hatchRect() method in P5Visualizer (since hatching is all that p5.brush was being used for anyway). The current sequence is saved/updated in the list of remembered sequences when (a) the Scope view is first loaded; (b) the Scope view is closed; (c) a sequence or visualizer is selected in the SwitcherModal; or (d) the current specimen is saved to the Gallery. This commit removes the former list of OEIS IDs that was being saved in browser localStorage, as it is superseded by this sequence-saving feature. That removal means that the frontscope no longer (pre-)fetches a collection of OEIS sequences immediately on startup; they are loaded only as used. * fix: Improve circumstances under which sequence is saved to history Also save a sequence when the switcher is opened (so there is no need to save it when a new sequence is selected, since the switcher must have been opened in order for something else to be selected), and save the destination sequence any time a specimen card is selected. Also puts the mod information in the description of an OEIS sequence so that we don't end up with a bunch of identical-looking sequence cards. * feat: Add a list view to SpecimensGallery Also adds a simple toggle switch component for selecting how a given SpecimensGallery should be displayed. Makes the title and subtitle properties for a specimen card mandatory (as they are displayed in the table view). Adds the visualizer as well as the sequence to the subtitle for featured and saved specimens so that the table view would be more informative (and the extra information also shows up in the thumbnails view. This commit significantly reorganizes the HTML/CSS of a SpecimensGallery component to accomodate the toggling between the two views (not to mention the non-scrolling control to do that toggling). All of the same abilities (select a specimen, delete a specimen, link to OEIS) are present in the table view as in the thumbnails view. Canonicalizes the query string of a couple of the featured items, to prevent them from apparently creating duplicate saved sequences. * ui: several sequence history tweaks per discussion in #500 1) Renames table view to list view. 3) Remembers the last-used view in browser-local storage 4) Keeps undeleteable 'Formula: n' and 'Random from 0 to 9' at the head of the history list. Thereafter entries are in most- recently-used order. History defaults to the Beatty-sequence formula, OEIS primes, and OEIS VF numbers. 5) In the display toggle, both options are in numberscope grey, with the active one in the slightly heavier weight we use. The inactive one turns black on hover, indicating it can be clicked on. (As always, you can also click directly on the toggle switch.) * feat: MathML display for Formula sequences Adds an `htmlName` property (defaulting to `name`) to a Paramable objects. The idea is that the user interface is supposed to use the htmlName where possible to display the name of an element. Implements `htmlName` for Formula sequences, to contain the MathML rendering of their `formula` parameter. Adds a `v-safe-html` directive to Vue to facilitate using this generated MathML. Displays the `htmlName` using the new directive in the ParamEditor, SpecimenCard titles, and in the columns of the list view in a SpecimensGallery. Also adds the ability to tailor the heading of the first column in the list view, so that it reads "Visualizer" in the visualizer switcher, etc. * chore: dummy commit to grab CI snapshots * chore: New CI snapshots to reflect mathml formulas * ui: Try to improve switcher height calculation * ui: Always title the permanent Formula card 'Formula' * ui: Enable formula wrapping on chromium-based browsers * ui: Actually make any sequence with no query have special title * feat: Store preference for each gallery display style separately * fix: Attempt to head off non-rendering thumbnails * chore: fix comment typos
…scope#500) * feat: Save a history of any kind of Sequences (not just OEIS) This partially resolves numberscope#430; the only portion remaining is to have a limit on the number of sequences that will show as thumbnails (the rest will show as a table or something like that). Also, testing for this commit revealed that the p5.brush addon does not work properly with multiple different sketches all updating asynchronously. Therefore, this commit removes p5.brush and provides a simple hatchRect() method in P5Visualizer (since hatching is all that p5.brush was being used for anyway). The current sequence is saved/updated in the list of remembered sequences when (a) the Scope view is first loaded; (b) the Scope view is closed; (c) a sequence or visualizer is selected in the SwitcherModal; or (d) the current specimen is saved to the Gallery. This commit removes the former list of OEIS IDs that was being saved in browser localStorage, as it is superseded by this sequence-saving feature. That removal means that the frontscope no longer (pre-)fetches a collection of OEIS sequences immediately on startup; they are loaded only as used. * fix: Improve circumstances under which sequence is saved to history Also save a sequence when the switcher is opened (so there is no need to save it when a new sequence is selected, since the switcher must have been opened in order for something else to be selected), and save the destination sequence any time a specimen card is selected. Also puts the mod information in the description of an OEIS sequence so that we don't end up with a bunch of identical-looking sequence cards. * feat: Add a list view to SpecimensGallery Also adds a simple toggle switch component for selecting how a given SpecimensGallery should be displayed. Makes the title and subtitle properties for a specimen card mandatory (as they are displayed in the table view). Adds the visualizer as well as the sequence to the subtitle for featured and saved specimens so that the table view would be more informative (and the extra information also shows up in the thumbnails view. This commit significantly reorganizes the HTML/CSS of a SpecimensGallery component to accomodate the toggling between the two views (not to mention the non-scrolling control to do that toggling). All of the same abilities (select a specimen, delete a specimen, link to OEIS) are present in the table view as in the thumbnails view. Canonicalizes the query string of a couple of the featured items, to prevent them from apparently creating duplicate saved sequences. * ui: several sequence history tweaks per discussion in numberscope#500 1) Renames table view to list view. 3) Remembers the last-used view in browser-local storage 4) Keeps undeleteable 'Formula: n' and 'Random from 0 to 9' at the head of the history list. Thereafter entries are in most- recently-used order. History defaults to the Beatty-sequence formula, OEIS primes, and OEIS VF numbers. 5) In the display toggle, both options are in numberscope grey, with the active one in the slightly heavier weight we use. The inactive one turns black on hover, indicating it can be clicked on. (As always, you can also click directly on the toggle switch.) * feat: MathML display for Formula sequences Adds an `htmlName` property (defaulting to `name`) to a Paramable objects. The idea is that the user interface is supposed to use the htmlName where possible to display the name of an element. Implements `htmlName` for Formula sequences, to contain the MathML rendering of their `formula` parameter. Adds a `v-safe-html` directive to Vue to facilitate using this generated MathML. Displays the `htmlName` using the new directive in the ParamEditor, SpecimenCard titles, and in the columns of the list view in a SpecimensGallery. Also adds the ability to tailor the heading of the first column in the list view, so that it reads "Visualizer" in the visualizer switcher, etc. * chore: dummy commit to grab CI snapshots * chore: New CI snapshots to reflect mathml formulas * ui: Try to improve switcher height calculation * ui: Always title the permanent Formula card 'Formula' * ui: Enable formula wrapping on chromium-based browsers * ui: Actually make any sequence with no query have special title * feat: Store preference for each gallery display style separately * fix: Attempt to head off non-rendering thumbnails * chore: fix comment typos
OK, in ui2 we have an arbitrary history of Sequences shown in the Sequence Switcher, thanks to #500. Closing. |
* feat: Save a history of any kind of Sequences (not just OEIS) This partially resolves #430; the only portion remaining is to have a limit on the number of sequences that will show as thumbnails (the rest will show as a table or something like that). Also, testing for this commit revealed that the p5.brush addon does not work properly with multiple different sketches all updating asynchronously. Therefore, this commit removes p5.brush and provides a simple hatchRect() method in P5Visualizer (since hatching is all that p5.brush was being used for anyway). The current sequence is saved/updated in the list of remembered sequences when (a) the Scope view is first loaded; (b) the Scope view is closed; (c) a sequence or visualizer is selected in the SwitcherModal; or (d) the current specimen is saved to the Gallery. This commit removes the former list of OEIS IDs that was being saved in browser localStorage, as it is superseded by this sequence-saving feature. That removal means that the frontscope no longer (pre-)fetches a collection of OEIS sequences immediately on startup; they are loaded only as used. * fix: Improve circumstances under which sequence is saved to history Also save a sequence when the switcher is opened (so there is no need to save it when a new sequence is selected, since the switcher must have been opened in order for something else to be selected), and save the destination sequence any time a specimen card is selected. Also puts the mod information in the description of an OEIS sequence so that we don't end up with a bunch of identical-looking sequence cards. * feat: Add a list view to SpecimensGallery Also adds a simple toggle switch component for selecting how a given SpecimensGallery should be displayed. Makes the title and subtitle properties for a specimen card mandatory (as they are displayed in the table view). Adds the visualizer as well as the sequence to the subtitle for featured and saved specimens so that the table view would be more informative (and the extra information also shows up in the thumbnails view. This commit significantly reorganizes the HTML/CSS of a SpecimensGallery component to accomodate the toggling between the two views (not to mention the non-scrolling control to do that toggling). All of the same abilities (select a specimen, delete a specimen, link to OEIS) are present in the table view as in the thumbnails view. Canonicalizes the query string of a couple of the featured items, to prevent them from apparently creating duplicate saved sequences. * ui: several sequence history tweaks per discussion in #500 1) Renames table view to list view. 3) Remembers the last-used view in browser-local storage 4) Keeps undeleteable 'Formula: n' and 'Random from 0 to 9' at the head of the history list. Thereafter entries are in most- recently-used order. History defaults to the Beatty-sequence formula, OEIS primes, and OEIS VF numbers. 5) In the display toggle, both options are in numberscope grey, with the active one in the slightly heavier weight we use. The inactive one turns black on hover, indicating it can be clicked on. (As always, you can also click directly on the toggle switch.) * feat: MathML display for Formula sequences Adds an `htmlName` property (defaulting to `name`) to a Paramable objects. The idea is that the user interface is supposed to use the htmlName where possible to display the name of an element. Implements `htmlName` for Formula sequences, to contain the MathML rendering of their `formula` parameter. Adds a `v-safe-html` directive to Vue to facilitate using this generated MathML. Displays the `htmlName` using the new directive in the ParamEditor, SpecimenCard titles, and in the columns of the list view in a SpecimensGallery. Also adds the ability to tailor the heading of the first column in the list view, so that it reads "Visualizer" in the visualizer switcher, etc. * chore: dummy commit to grab CI snapshots * chore: New CI snapshots to reflect mathml formulas * ui: Try to improve switcher height calculation * ui: Always title the permanent Formula card 'Formula' * ui: Enable formula wrapping on chromium-based browsers * ui: Actually make any sequence with no query have special title * feat: Store preference for each gallery display style separately * fix: Attempt to head off non-rendering thumbnails * chore: fix comment typos
This will be much like the specific OEIS sequence cards in the switcher. We should have the ability to have cards in the sequence switcher that correspond to pre-filled Formulas, as well as a "New Formula" one for entering an arbitrary formula. When this is implemented, the Naturals sequence should be dropped altogether, and one of the canned formulas should be formula
n
producing the naturals.Some questions that need to be nailed down:
The text was updated successfully, but these errors were encountered: