Svelte conversion - deck registration finishing touches#826
Merged
rlankin merged 12 commits intoJun 27, 2026
Conversation
…he deck registration page
…r to make editing easier
plural
approved these changes
Jun 27, 2026
plural
left a comment
Contributor
There was a problem hiding this comment.
i patched this in and it works really nicely!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These should be the last changes needed to consider the deck registration conversion "complete", at least for the time being:
Autocomplete
Previously, the entire set of printings were loaded up front and searched when card name fields were changed. This had the restriction of only succeeding for single card matches and failing if multiple matches were found. Now, no printings are loaded and the NRDB API is searched by Svelecte as the user types into a card name field. This also provides the user with a list of all possible matches for them to pick from. Most of the ugly TS diffs in
DeckDisplayare removing all of the manual printing searching code and things are actually a bit cleaner now in the final file.The API searching is done using the
fetchandfetchCallbackprops of the Svelecte component. The only downside (that I've found so far) to using these is that Svelecte will automatically perform a search when the field is pre-populated, meaning that Svelecte will trigger a ton of unnecessary API calls when the user clicks the "Edit decks in place" button and all of the components are created. To get around this, I added an edit button to each card row so the Svelecte components are created one at a time (and I don't pre-populate the component here since I assume it should be clear what they are editing if they click the button). I don't think that this should be too much of a hassle for the user, but I'm open to discussion here (side note: I wonder if it's actually worth making the user click the "Edit decks in place" button in the first place or whether the page should just always be in that mode). I created theEditableCardcomponent to encapsulate some of this.Otherwise, I'm really happy with how the autocomplete is working here.
Diffs
I moved the diffs table below the deck list instead of above it since that disrupts the page layout less and hopefully reduces scrolling back and forth, especially when adding cards. I also added a second Save button to the bottom of the page when editing decks for convenience. All of this can be moved/removed if anybody feels strongly about it.