dcaslin / d2-checklist

Source for www.d2checklist.com, written in Angular and using the Bungie API
https://www.d2checklist.com/
MIT License
91 stars 24 forks source link

Additional way to filter patterns by season #569

Open jchunkins opened 1 week ago

jchunkins commented 1 week ago

Feature Request

Under Triumph -> Patterns there's already a filter with items like Todo, Attune, etc. Could you add a secondary filter dropdown for season? It could have the following options (not going to list all of them but enough to get the idea):

All Current The Final Shape - season 1 - Episode: Echos Witch Queen - season 1 - Season of the Risen Witch Queen - season 2 - Season of the Haunted Witch Queen - season 3 - Season of the Season of Plunder Witch Queen - season 4 - Season of the Seraph etc...

I would expect the default to be All, and then I can choose one of the others as desired.

Reason

I struggle to find the weapon I want to choose for this weeks redbar purchase. I've got tons of older weapon patterns with partial progress since I never quite got around to getting all of their patterns. Basically I am looking for a way to whittle down the list to something manageable. My primary use case would be to select Current, and it might be useful to restrict to older seasons if Bungie decides to add new opportunities to purchase patterns from prior seasons.

dcaslin commented 1 week ago

Wow that list has gotten huge! Let me see what I can do!

dcaslin commented 5 days ago

Ok so bad news on the season filter. The triumphs have no link back to the inventoryItem. I use a simplistic name based search to find crafted and red border guns. So in order to do a season drop down I'd have to do a similar name search across the entire database, which I kinda hate (might be slow, might have misses where it selects the season 9 non craftable gun by mistake). To that end I'm gonna work on a wildcard filter instead.

dcaslin commented 5 days ago

Fixed by 24.3.1!

jchunkins commented 4 days ago

I get the limitations you're hitting, and appreciate the workaround. Given that filterPatternName is just a predicate function, perhaps as further enhancement to what you've done, maybe that function could parse a comma separated list so I can look up multiple items? Or a regex (this might be too complex for mortals)?

Thinking along the lines of this CSV for the current season of weapons at the H.E.L.M.

LOST SIGNAL,ILL OMEN,FAITH-KEEPER,TIMEWORN WAYFARER,VEILED THREAT,SIGHTLINE SURVEY
jchunkins commented 3 days ago

@dcaslin I've added a PR https://github.com/dcaslin/d2-checklist/pull/570 with some ideas on how we could improve the filtering. Open to suggestions / changes.