-
Notifications
You must be signed in to change notification settings - Fork 1
Implement winner absence functionality and improve container management #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request implements functionality to mark winners as absent and to manage container operations by adding a stop command. Key changes include:
- New CSS styling for absent winners.
- Introduction of st.session_state.absent_participants and a new mark_winner_absent function to handle winner replacement.
- Updated UI rendering that displays updated winner statistics and provides a "mark as absent" button.
Files not reviewed (1)
- Makefile: Language not supported
…rize assignment logic
…tter maintainability
|
This pull request introduces several enhancements to the Enhancements to participant and winner management:
Code readability and maintainability:
UI and statistics improvements:
Minor improvements:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements absent winner management in the raffle application and improves container management for development.
- Introduces a new session state variable (absent_participants) and a function (mark_winner_absent) to handle and replace absent winners.
- Updates winner display and prize assignment logic to clearly differentiate between original, absent, and replacement winners.
- Enhances the Makefile to ensure reliable container management.
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app.py | Implements absent winner tracking, replacement drawing, prize assignment, and UI updates. |
| Makefile | Updates the run target to stop any existing container before starting a new one. |
Files not reviewed (1)
- Makefile: Language not supported
This pull request introduces functionality to handle absent winners in a raffle application, enhancing the user experience and improving clarity in winner management. The changes include tracking absent participants, marking winners as absent, redrawing replacements, and updating the UI to reflect these updates.
New Features for Absent Winner Handling:
absent_participants, to track emails of absent winners. This is integrated into the session reset logic. (app.py: [1] [2]mark_winner_absentfunction to mark winners as absent, add them to the absent participants list, and redraw replacements if possible. Replacement winners are flagged and linked to the original absent winners. (app.py: app.pyR200-R249)Enhancements to Winner Display and Statistics:
app.py: app.pyL321-R446)app.py: app.pyL217-R297)Prize Assignment Improvements:
app.py: app.pyL351-R494)Minor Changes:
Makefileto ensure theruntarget stops any existing container before starting a new one, improving reliability during development. (Makefile: MakefileL9-R9)