Adding set icon/numbers to cards in deck comparison #663
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.
Hello there! First time contributor here. Got into Netrunner recently and just starting to get familiar with NetrunnerDB (and GitHub itself :P), so please bear with me.
When playing around with decklists I found the 'Compare' functions in the My Decks page. I thought it was pretty cool and useful to quickly see what needs to be replaced in order to turn a physical deck into a different version of it, except that for a new player like me it's kinda hard to know where I might be able to find a particular card without knowing what its set and number is. I saw in some other parts of the site that this info is sometime displayed on card lists when they're being sorted by set, so I thought I'd propose for them to be added here.
Aside from adding the icons and set numbers, I refactored the generation of these items into its own function in that same file, hopefully making any future changes here a little bit easier and more uniform.
I was not able to set up a proper local copy of the site, but I WAS able to run the modified JS code on the prod site directly through the Chrome dev console and these were the results:
![Screen Shot 2022-07-14 at 11 46 07 PM](https://user-images.githubusercontent.com/4691960/179168450-9708e6fc-7940-45ab-a725-c1a939f94114.png)
![Screen Shot 2022-07-14 at 11 45 39 PM](https://user-images.githubusercontent.com/4691960/179168456-bcc9cc9a-eb29-41d2-9610-f336b8f5d2ac.png)
![Screen Shot 2022-07-14 at 11 45 25 PM](https://user-images.githubusercontent.com/4691960/179168459-9e26c910-cb41-4c7c-b483-cf43291aee52.png)
![Screen Shot 2022-07-14 at 11 42 03 PM](https://user-images.githubusercontent.com/4691960/179168465-58a81b6c-2328-4881-a896-7922aec6459b.png)
I'd totally understand if this is something that might need more of a justification or more testing, but I thought it'd be cool to have.