Repository navigation
fix(web): reload users list after mutations, guard pull-to-refresh inside dialogs - #153
Merged
Merged
Conversation
The users state was loaded in an effect depending on [isAdmin, refresh], but refresh is a stable callback that only bumps dataVersion in the store, so the effect never re-ran and the list stayed stale after creating or deleting a user until the view remounted. Depend on dataVersion like useData does. (#98)
The window-level touch listeners only checked window.scrollY, which stays 0 behind a modal, so scrolling or pulling inside a tall modal could reload the whole page once the drag passed the threshold. Skip arming when a modal is open or the gesture starts inside a [role=dialog] (covers the alerts panel too); pull-to-refresh keeps working normally on the page. (#64)
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.
Two backlog fixes.
[isAdmin, refresh], butrefreshis a stable callback that only bumpsdataVersionin the store, so the effect never re-ran and the list stayed stale after creating or deleting a user. It now depends ondataVersion, likeuseDatadoes everywhere else.window.scrollY <= 0; with a modal open the page behind stays at 0, so scrolling or pulling inside a tall modal reloaded the whole page. It no longer arms while a modal is open or when the gesture starts inside a[role=dialog](covers the alerts panel too); on the plain page it keeps working as before.Verification: Playwright E2E 8/8 on a local mock instance with real admin login - user create/delete reflected in the list without reload; a 140px pull gesture inside the tall "create pool" modal leaves the page and modal intact; the pull indicator still arms on the page at scrollY 0.
Closes #98, closes #64