mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
d016f93de8
* wip: commit current progress on usePaginatedQuery * chore: add cacheTime to users query * chore: update cache logic for UsersPage usersQuery * wip: commit progress on Pagination * chore: add function overloads to prepareQuery * wip: commit progress on usePaginatedQuery * docs: add clarifying comment about implementation * chore: remove optional prefetch property from query options * chore: redefine queryKey * refactor: consolidate how queryKey/queryFn are called * refactor: clean up pagination code more * fix: remove redundant properties * refactor: clean up code * wip: commit progress on usePaginatedQuery * wip: commit current pagination progress * docs: clean up comments for clarity * wip: get type signatures compatible (breaks runtime logic slightly) * refactor: clean up type definitions * chore: add support for custom onInvalidPage functions * refactor: clean up type definitions more for clarity reasons * chore: delete Pagination component (separate PR) * chore: remove cacheTime fixes (to be resolved in future PR) * docs: add clarifying/intellisense comments for DX * refactor: link users queries to same queryKey implementation * docs: remove misleading comment * docs: more comments * chore: update onInvalidPage params for more flexibility * fix: remove explicit any * refactor: clean up type definitions * refactor: rename query params for consistency * refactor: clean up input validation for page changes * refactor/fix: update hook to be aware of async data * chore: add contravariance to dictionary * refactor: increase type-safety of usePaginatedQuery * docs: more comments * chore: move usePaginatedQuery file * fix: add back cacheTime * chore: swap in usePaginatedQuery for users table * chore: add goToFirstPage to usePaginatedQuery * fix: make page redirects work properly * refactor: clean up clamp logic * chore: swap in usePaginatedQuery for Audits table * refactor: move dependencies around * fix: remove deprecated properties from hook * refactor: clean up code more * docs: add todo comment * chore: update testing fixtures * wip: commit current progress for tests * fix: update useEffectEvent to sync via layout effects * wip: commit more progress on tests * wip: stub out all expected test cases * wip: more test progress * wip: more test progress * wip: commit more test progress * wip: AHHHHHHHH * chore: finish two more test cases * wip: add in all tests (still need to investigate prefetching * refactor: clean up code slightly * fix: remove math bugs when calculating pages * fix: wrap up all testing and clean up cases * docs: update comments for clarity * fix: update error-handling for invalid page handling * fix: apply suggestions