Support multi-Pokémon and unannounced events, honour written years - #3
Merged
Merged
Conversation
Three problems surfaced by real schedules that the bulk importer could not
express.
A written year was ignored and then overridden: "July 4, 2026" pasted in
August 2026 silently became 2027-07-04. An explicit year now always wins, so
a past date is reported as past instead of quietly moving a year. A year is
still implied when none is written, rolling forward only if that month has
already been and gone.
An unannounced Raid Hour rendered "Raid Hour Raid Hour" with an empty
"CP - / WB - " line, both of which shipped into public posts. An event with
no Pokemon now names just the event type, and the CP line appears only once
there is a CP to show.
Events regularly feature several Pokemon -- "Articuno, Zapdos & Moltres Raid
Hour", "Magby and Smoochum Hatch Day". Names listed with commas, &, and or or
are now split for CP and artwork lookups while the title keeps its original
wording, so a themed name that is not really a list ("Fire and Ice Hatch Day")
still reads correctly and simply resolves nothing. Each featured Pokemon gets
its own labelled CP line; a single one keeps the existing unlabelled format.
Artwork stacks into one square tile, three arranging as a pyramid.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ Deploy Preview for sundance-dgen ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Three problems real schedules hit that the bulk importer couldn't express.
Written years were ignored — and overridden
July 4, 2026pasted in August 2026 silently became 2027-07-04. The year in the text was never read; only month and day were, then a rollover heuristic pushed any past month into next year.An explicit year now always wins, so a past date is reported as past rather than quietly moved. A year is still implied when none is written, rolling forward only when that month has already been and gone — so a January schedule pasted in December still lands correctly.
Unannounced events rendered broken
Some Raid Hours land every Wednesday before a boss is announced. A bare
Raid Hourrow produced:Duplicated title, empty CP line — both shipping into public posts. Now:
The CP line appears only once there's a CP to show.
Multi-Pokémon events
Events regularly feature several —
Articuno, Zapdos & Moltres Raid Hour,Magby and Smoochum Hatch Day. Names listed with commas,&,andororare now split for CP and artwork lookups, while the title keeps its original wording. That last part matters: a themed name that isn't really a list (Fire and Ice Hatch Day) still reads correctly and simply resolves nothing, rather than being rewritten.Each featured Pokémon gets a labelled CP line; a single one keeps the existing unlabelled format, so nothing about current output changes.
Artwork stacks into one square tile — two side by side, three as a pyramid, four in a grid — so cards keep their shape however many are featured. The no-artwork placeholder was resized to match, since it was 96px against the tiles' 108px.
Verification
68 tests (up from 62), including regressions for each of the three. Exercised in a browser across all five shapes: three-Pokémon pyramid, two side by side, single, unannounced, and a themed non-list name.
🤖 Generated with Claude Code