Merged
Conversation
…nto audience display
… and state management
… voting experience
…nce and voting display with animation and layout improvements
…udience display page
…ackground styling
…nd add AudienceRoundDisplay component for improved DX
…city with seamless scrolling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new audience-facing display with real-time WebSocket updates and associated controls, plus related type, schema, and API enhancements.
- Introduces an “Audience Display” role, pages, and components for live views of rounds, presence, and voting
- Implements WebSocket events and handlers for pushing presence and audience-display changes
- Adds new hooks (
useWindowSize,useKeyboardShortcut) and refactors APIs/UI for better validation, styling, and error handling
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libs/types/src/lib/websocket.ts | Define new WS events for presence and audience display |
| libs/types/src/lib/schemas/election-state.ts | Simplify ElectionState and add audienceDisplay field |
| libs/types/src/lib/roles.ts | Include audience-display in allowed RoleTypes |
| libs/types/src/lib/constants.ts | List valid AudienceDisplayScreenTypes |
| apps/frontend/pages/mtes/election-manager.tsx | Hook up AudienceControl UI and presence WS handling |
| apps/frontend/pages/mtes/audience-display.tsx | Implement audience-facing page with live updates |
| apps/frontend/localization/roles.ts | Add Hebrew label for audience-display role |
| apps/frontend/localization/displays.ts | Localize audience display view names |
| apps/frontend/hooks/use-window-size.ts | New hook to get viewport size for scaling |
| apps/frontend/hooks/use-keyboard-shortcut.ts | New hook to register keyboard shortcuts |
| apps/frontend/components/mtes/waiting-state.tsx | Restyle waiting placeholder as a Paper |
| apps/frontend/components/mtes/readonly-voting-stands-grid.tsx | New read-only grid for voting stands status |
| apps/frontend/components/mtes/readonly-stand-status-card.tsx | New card for stand status with hover styles |
| apps/frontend/components/mtes/members-grid.tsx | Add audianceDisplay prop, marquee scroll for overflow |
| apps/frontend/components/mtes/members-column.tsx | Add simple column layout for member cards |
| apps/frontend/components/mtes/member-presence.tsx | Remove Tooltip wrapper around presence buttons |
| apps/frontend/components/mtes/member-display.tsx | Update styling, use Paper variant, reflect isPresent state |
| apps/frontend/components/mtes/member-card.tsx | Add audianceDisplay prop, conditionally hide signature button |
| apps/frontend/components/mtes/city-grouped-members-grid.tsx | Scrollable city-grouped member grid with marquee effect |
| apps/frontend/components/mtes/audience/audience-voting-display.tsx | Layout for audience voting view |
| apps/frontend/components/mtes/audience/audience-round-display.tsx | Layout for audience round info |
| apps/frontend/components/mtes/audience/audience-presence.tsx | Layout for audience presence view |
| apps/frontend/components/mtes/audience/audience-display-container.tsx | Full-screen scaling container for audience displays |
| apps/frontend/components/mtes/audience/audience-control.tsx | Control panel to switch views, emit WS events |
| apps/backend/src/websocket/index.ts | Register WS handlers for presence and audience control |
| apps/backend/src/websocket/handlers.ts | Implement handlers for presence and audience display updates |
| apps/backend/src/routers/api/events/mm-members.ts | Improve validation and error handling for MM-members API |
| apps/backend/src/routers/api/admin/events/index.ts | Initialize audienceDisplay in new event state |
| apps/backend/src/lib/schedule/voting-stands-users.ts | Include audience-display user in scheduled stand assignments |
Comments suppressed due to low confidence (3)
apps/frontend/components/mtes/members-grid.tsx:16
- The prop name "audianceDisplay" is misspelled. Rename it to "audienceDisplay" to match the domain concept and maintain consistency.
audianceDisplay?: boolean; // Optional prop for audience display
apps/frontend/components/mtes/member-card.tsx:27
- Fix the spelling of the prop: change "audianceDisplay" to "audienceDisplay" so it aligns with other components and typings.
audianceDisplay?: boolean;
apps/backend/src/websocket/index.ts:19
- The handler calls
handleUpdateMemberPresence(namespace, ...)butnamespaceis not defined. You likely need to passsocket.nspor another valid namespace reference.
socket.on('updateMemberPresence', (...args) => {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
✨ New Audience Display & Real-time Updates ✨
This PR introduces a dedicated audience display interface with real-time updates and new functionalities for election managers:
Audience Display:
progress to the audience.
active rounds.
audience.
Member Presence Management:
Code Enhancements:
mm-membersAPI for better validation and error handling.useKeyboardShortcutanduseWindowSizehooks for improved UX.MemberCard,MemberDisplay,WaitingState) for bettervisuals and audience display compatibility.
This makes the election process more transparent and engaging for the audience!