Add banner to draft and upcoming testdays #128
No reviewers
Labels
No labels
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
easyfix
enhancement
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/testdays-web!128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/56-draft-event-banner"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #56
Assisted-by: Claude Code
WIP: Add banner to draft and upcoming testdaysto Add banner to draft and upcoming testdaysAI Code Review
📋 MR Summary
Adds warning banners to test day pages for events that are in 'draft' or 'upcoming' states.
testdays/controllers/main.pyto calculate theevent_state(draft, upcoming, live) based on the test day's draft status and start date.testdays/components/Testday.jinjato display Bulma-style message banners depending on the calculatedevent_state.tests/functional/test_main.pyto ensure proper behavior across all event states.Detailed Code Review
The implementation correctly identifies the event's lifecycle state and adds clear, user-friendly banners to warn against premature test submissions. The functional tests are well-structured and cover the expected edge cases (draft, upcoming, live, and past).
One potential issue to verify is whether
ZoneInfois properly imported intestdays/controllers/main.py, as it was added to the module's logic without a corresponding import visible in the diff. If it's missing, it will cause aNameErrorat runtime.📂 File Reviews
📄 `testdays/controllers/main.py` - Calculates `event_state` to be passed into the template.
ZoneInfoclass is used to fetch the timezone, but it is not imported in the visible diff. IfZoneInfois not already imported at the top of the file, this will throw aNameErrorwhen triggered.ZoneInfois imported from thezoneinfomodule.✅ Summary
ZoneInfomodule is imported to avoid runtime crashes.from zoneinfo import ZoneInfoimport intestdays/controllers/main.py.🤖 AI Code Review | Generated with ai-code-review | Model:
gemini-3.1-pro-preview⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.
Add banner to draft and upcoming testdaysto WIP: Add banner to draft and upcoming testdaysWIP: Add banner to draft and upcoming testdaysto Add banner to draft and upcoming testdaysLGTM 👍
This is great, thanks a lot!
My only nitpick is that "This Test Day Is Not Live Yet" is hard for me to read with all the words capitalized 🙂️ But English-native users are probably more used to this.
No, I agree, it's weird to a native speaker too. Please use regular sentence capitalization.
Pushed
60dfa4066cto address it.