Fix vote list update popup on first vote entry
This commit is contained in:
1
SPEC.md
1
SPEC.md
@@ -26,6 +26,7 @@ Help a small Discord group (4–8 players) pick a co-op game via phased flow:
|
|||||||
- Players see only their own votes; can finalize/unfinalize their ballot
|
- Players see only their own votes; can finalize/unfinalize their ballot
|
||||||
- **Linked games**: admins can link duplicates; linked games share a vote group. Moving a slider on one updates all linked siblings.
|
- **Linked games**: admins can link duplicates; linked games share a vote group. Moving a slider on one updates all linked siblings.
|
||||||
- Linking or unlinking games clears votes for the linked group and unfinalizes **all** players so ballots can be reviewed again
|
- Linking or unlinking games clears votes for the linked group and unfinalizes **all** players so ballots can be reviewed again
|
||||||
|
- The “new/linked games” vote popup appears only when the vote list changes after the player has already seen that vote list
|
||||||
|
|
||||||
## Results Phase
|
## Results Phase
|
||||||
- Visible only after admin enables results; players auto-advance when opened
|
- Visible only after admin enables results; players auto-advance when opened
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ Mit **„Finalisieren"** werden deine Bewertungen gesperrt. Deaktiviere es, um e
|
|||||||
Wenn neue Spiele hinzugefügt oder Verknüpfungen geändert werden:
|
Wenn neue Spiele hinzugefügt oder Verknüpfungen geändert werden:
|
||||||
- Betroffene Stimmen werden gelöscht
|
- Betroffene Stimmen werden gelöscht
|
||||||
- Deine Abstimmung wird automatisch zurückgesetzt
|
- Deine Abstimmung wird automatisch zurückgesetzt
|
||||||
|
- Das Update-Popup erscheint nur, wenn sich deine bereits sichtbare Abstimmungsliste verändert
|
||||||
|
|
||||||
Überprüfe deine Liste und bewerte erneut, bevor du wieder finalisierst.
|
Überprüfe deine Liste und bewerte erneut, bevor du wieder finalisierst.
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ Finalize is only available during the Vote phase and will automatically reset if
|
|||||||
If new games are added or links are modified:
|
If new games are added or links are modified:
|
||||||
- Affected votes are cleared
|
- Affected votes are cleared
|
||||||
- You are automatically unfinalized
|
- You are automatically unfinalized
|
||||||
|
- The update popup appears only when your already-visible Vote list changes
|
||||||
|
|
||||||
Review your list and rescore before finalizing again.
|
Review your list and rescore before finalizing again.
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,12 @@ export async function loadSuggestionsData() {
|
|||||||
const latest = await api.allSuggestions();
|
const latest = await api.allSuggestions();
|
||||||
const latestSig = signatureSuggestions(latest);
|
const latestSig = signatureSuggestions(latest);
|
||||||
const changed = latestSig !== state.allSuggestionsSig;
|
const changed = latestSig !== state.allSuggestionsSig;
|
||||||
if (changed && state.phase === "Vote" && state.allSuggestionsSig) {
|
if (
|
||||||
|
changed &&
|
||||||
|
state.phase === "Vote" &&
|
||||||
|
state.votesRendered &&
|
||||||
|
state.allSuggestionsSig
|
||||||
|
) {
|
||||||
const added = latest
|
const added = latest
|
||||||
.filter((s) => !prevById[s.id])
|
.filter((s) => !prevById[s.id])
|
||||||
.map((s) => s.name);
|
.map((s) => s.name);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export function clearUserState() {
|
|||||||
state.counts = null;
|
state.counts = null;
|
||||||
state.mySuggestions = [];
|
state.mySuggestions = [];
|
||||||
state.allSuggestions = [];
|
state.allSuggestions = [];
|
||||||
|
state.allSuggestionsSig = null;
|
||||||
state.myVotes = [];
|
state.myVotes = [];
|
||||||
state.results = [];
|
state.results = [];
|
||||||
state.votesRendered = false;
|
state.votesRendered = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user