Events page: fix series placement, country filter, and date display - #187
Merged
Conversation
…ilter honest
Community feedback tore the events tab apart, and every complaint checked out
against production data:
- Series cards rendered at the top of the "Upcoming" section no matter when
their editions happen — 9 of 11 production series have no future edition, so
the page opened with a wall of "Last edition: months ago" cards. Series are
now split by their next-edition date: future editions under Upcoming, the
rest under Past, and the live filter shows none.
- Series cards ignored the country and online filters entirely, which is why
filtering for Poland returned events from Mexico and Slovenia. They now go
through the same filters as standalone events.
- The country filter compared codes case-sensitively while legacy imports
stored uppercase ISO codes ('ES', 'PL', ...). Queries now compare
case-insensitively, entities lowercase on write, and a migration lowercases
the existing rows.
- Cross-month ranges rendered as "01.-31.12." (looked like December); a shared
_event_date_range partial shows the month on both sides and the year when
the event is not in the current year.
- A 365-day placeholder range (how Bucharest ended up "live" all year) is now
rejected at submission: events longer than 30 days don't validate, and an
end date before the start date doesn't either.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVzv7QwEce8ek1YFMNvsmW
Custom buildViolation() messages are translated against the validators domain, but the forms.* keys lived in messages.*.yml — so users saw raw keys like "forms.finished_at_required_for_speed" instead of sentences. Moved the keys into validators.*.yml (keeping every locale's existing translation), converted the one hardcoded English violation to a key, and translated the new competition date validations into all six locales. Also filled the 10 message keys check-translations reported missing in de/es/fr/ja/cs (wjpf connect flow, unavailable-resource flashes) so the checker is back to zero. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVzv7QwEce8ek1YFMNvsmW
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.
Context
Community feedback (relayed by a user) called the events tab confusing on four counts. All four were confirmed against production data before touching code:
date_from=2026-01-01,date_to=2026-12-31(organizer placeholder for "sometime in 2026"), which makes it the only Live event and pins it on top of the page all year.PL, so theplfilter found nothing and left only the unfiltered foreign series cards on screen.Changes
EventsListingnow exposes upcoming/past series groups split by next-edition date (upcoming sorted soonest-first, past sorted most-recent-first, series with no editions last). The listing template renders explicit Live/Upcoming/Past sections instead of detecting status transitions mid-loop. The live filter shows no series; upcoming/past show only their group.GetCompetitionSeries::allApproved()/allUnapproved()acceptcountry+onlineOnly(existing callers unaffected — the admin approvals queue calls with defaults).strtolowernormalization on entity writes, and migrationVersion20260810205813lowercases existing rows (prod has ~50% uppercase from legacy imports)._event_date_range.html.twig— cross-month ranges show the month on both sides (01.01.-31.12.instead of the misleading01.-31.12.), and the year is appended for events outside the current year. Reused in the event card, my-competitions card, event detail and edition detail.CompetitionFormDatanow rejectsdateTo < dateFromand events longer than 30 days, so placeholder ranges like the Bucharest one can't be entered again.Tests
SERIES_PAST_ONLY(Berlin Puzzle Cup,de, single past edition) documented in.claude/fixtures.md.doctrine:schema:validate,cache:warmupall pass.Not in this PR (needs a decision)
UPDATE(null the placeholder dates or get real dates from the organizer,maryia_p@yahoo.com).forms.*violation keys (e.g.forms.finished_at_required_for_speed) are translated against thevalidatorsdomain but live inmessages.*.yml, so they render as raw keys. Left untouched here.🤖 Generated with Claude Code
https://claude.ai/code/session_01PVzv7QwEce8ek1YFMNvsmW