Skip to content

[WV-4556] WeConnect: Add the ability to delete a profile--Support person disappears from the interface [TEAM REVIEW] - #190

Merged
DaleMcGrew merged 2 commits into
wevote:developfrom
pravingv:WV4556_delete_profile
Jun 24, 2026
Merged

DaleMcGrew merged 2 commits into
wevote:developfrom
pravingv:WV4556_delete_profile

Conversation

@pravingv

@pravingv pravingv commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What github.com/wevote/weconnect/issues does this fix?

WV-4556WeConnect: Add the ability to delete a profile

Changes included this pull request?

src/js/react-query/mutations.jsx

  • Updated the UI so that a person is removed from the interface immediately after a successful response is received from weconnect-server.
  • Replaced queryClient.invalidateQueries() for person-list-retrieve and team-list-retrieve with a combination of:
     queryClient.removeQueries()
     queryClient.refetchQueries()
  • This change addresses an issue caused by maintaining both a local context cache (apiDataCache.allPeopleCache) and the React Query cache. Simply invalidating queries could temporarily display outdated data ("stale data flashing") before fresh data was loaded.
  • Removing the cached queries before refetching ensures stale data is not rendered and keeps the UI in sync with the latest server state.

@DaleMcGrew

Copy link
Copy Markdown
Member

👍 Hi @pravingv this looks like a good improvement.

@DaleMcGrew
DaleMcGrew merged commit 5d79829 into wevote:develop Jun 24, 2026
2 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