-
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
Colourful ModFill #501
Colourful ModFill #501
Conversation
…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
Sadly this PR is now showing 41 files changed, which cannot be right. I think it's because maybe Kate merged ui2 with #500 merged into this PR, rather than rebasing this onto ui2 after #500 went into ui2. Unfortunately it makes reviewing this PR very difficult. Would it be possible to adjust this PR, or scratch it and create a new one, that just has one or more commits limited to the files actually touched by this PR, on top of ui2 as it now stands? Thanks so much. |
Replaced by #505 because of gitfusion. |
By submitting this PR, I am indicating to the Numberscope maintainers that I have read and understood the contributing guidelines and that this PR follows those guidelines to the best of my knowledge. I have also read the pull request checklist and followed the instructions therein.
This is still marked draft but feedback is welcome. It adds several colouring abilities to ModFill:
Things to do: