Skip to content

WV-2664: Persist heart like/dislike icon and keep support tally in sync#4859

Merged
DaleMcGrew merged 1 commit into
wevote:developfrom
ric0de:WV-2664LikeDislikeIconPersist
Jul 9, 2026
Merged

WV-2664: Persist heart like/dislike icon and keep support tally in sync#4859
DaleMcGrew merged 1 commit into
wevote:developfrom
ric0de:WV-2664LikeDislikeIconPersist

Conversation

@ric0de

@ric0de ric0de commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

TL;DR: The heart (like/dislike) and the Choose/Oppose position are now independent soclicking one no longer secretly flips the other. Support counts stay accurate and update live, and a batch of loading-race glitches are gone: phantom +1 counts, a heart stuck in the wrong state, and a frozen "complete your profile" popup.

  • OrganizationStore optimistically mirrors the server's first-action-wins coupling, and organizationsFollowedRetrieve now rebuilds the politician follow/dislike lists from server truth so stale optimistic entries get reconciled (not just appended).
  • ItemActionBar optimistically bumps the campaign tally only on a genuine clean-slate first action, gated on the follow lists being hydrated to avoid over-counting an already-hearted voter.
  • HeartFavoriteToggleLive syncs counts live, floors them at 0, no-ops redundant actions, and no longer leaves the complete-your-profile modal stuck open.
  • CampaignSupportThermometer reads the voter's current stance from SupportStore; CampaignStore preserves an explicit 0 supporters/opposers count.

- OrganizationStore optimistically mirrors the server's first-action-wins coupling,
  and organizationsFollowedRetrieve now rebuilds the politician follow/dislike lists
  from server truth so stale optimistic entries get reconciled (not just appended).
- ItemActionBar optimistically bumps the campaign tally only on a genuine clean-slate
  first action, gated on the follow lists being hydrated to avoid over-counting an
  already-hearted voter.
- HeartFavoriteToggleLive syncs counts live, floors them at 0, no-ops redundant
  actions, and no longer leaves the complete-your-profile modal stuck open.
- CampaignSupportThermometer reads the voter's current stance from SupportStore;
  CampaignStore preserves an explicit 0 supporters/opposers count.
@DaleMcGrew

Copy link
Copy Markdown
Member

👍

@DaleMcGrew DaleMcGrew merged commit 65b922e into wevote:develop Jul 9, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants