Repository navigation
Add svelte-query - #752
Add svelte-query#752
svelte-query#752Conversation
9bb80fb to
0cbf55a
Compare
|
Here's some suggestions for naming – so we can start aligning with the
I think we can remove this old file:
I ran into these errors in
Let's use |
|
And as mentioned, to make it easier to review, let's split out this backend PR from each of the frontend PRs:
|
|
Updated the names. Splitting this PR would duplicated the changes to add the endpoint. I feel we should have a PR with outline of the backend here and the UI changes will come in later PRs. We cannot remove MetricsExplorerActions until everything has been moved to use the new endpoints. This will come after the final PR has been merged. I have added api/v1. But i feel using view name instead of ID doesnt make sense. We can change the minute details in later PRs. The errors you got were probably because of cached type definitions. Open the classes where they are defined and it will get fixed. They work without issues for me and also compiles without issues. |
|
Regarding the PR split, that's what I meant – keep this as the backend PR, and do the frontend work in different PRs. Using |
* Create `lib/svelte-query/queries` directory * Add `svelte-query` `QueryClient` * Bugfix * Call `/meta` via `svelte-query` (WIP) * Change query key format * Refactor `LeaderboardDisplay` to use `/meta` API * Avoid "missing queryFn" error log * Use vanilla fetch * Remove log * Use `/meta` for list of measures * Update `esbuild` * Use new type name * Remove client-side validation (tmp bugfix) * Call `svelte-query` for valid measures and dimensions * Add `TODO` for OpenAPI client code generation * Update comment
* Create `lib/svelte-query/queries` directory * Add `svelte-query` `QueryClient` * Bugfix * Add query key and function for `/timeseries` API * Call `/meta` via `svelte-query` (WIP) * Change query key format * Refactor `LeaderboardDisplay` to use `/meta` API * Avoid "missing queryFn" error log * Use vanilla fetch * Remove log * Remove unused code * Use `/meta` for list of measures * Update `esbuild` * Add query to `timeseries` endpoint * Call `timeseries` endpoint via `svelte-query` * Use new type name * Remove client-side validation (tmp bugfix) * Call `svelte-query` for valid measures and dimensions * Add `TODO` for OpenAPI client code generation * Update comment * Use updated type names * Clean up * Invalidate `/timeseries` query when time controls change * updating og:image (#760) * Revert "Merge branch 'main' into svelte-query-timeseries" This reverts commit 2b68e54, reversing changes made to a13c8d6. Co-authored-by: Mike Godwin <1851282+godzig@users.noreply.github.com> Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com>
|
TODOs:
|
* Moving big number to svelte-query * Adding timeseries to invalidation
* Moving to svelte store for explorer * Changing the svelte store usage pattern * Fixing a few issues * Updating names
f0575e5 to
25b8fc6
Compare
* Use explicit `svelte-query` for leaderboards * refactors back toward basic svelte query usage * renames the top list query to useTopListQuery * Better naming * Refactor `useTotalsQuery` * updates Totals query; removes unneeded usage of invalidateMetricViewData * Remove `queriesRepository` layer from `useMetaQuery` * Set better `refetchOnX` values * Remove `queriesRepository` layer from `useTimeSeriesQuery` * Remove `QueriesRepository.ts` * Set `refetchOnReconnect` and `refetchOnWindowFocus` back to `true` * Fix `WHERE` clause generation * Adding optional query profile emitting (#819) * Adding optional query profile emitting * Addressing PR comments * Fixing quick metrics modal missing buttons (#859) * enables negative timeseries (#850) Co-authored-by: Dhiraj Barnwal <sumankumaribarnwal@gmail.com> * adds calendar icon; fixes spacing in dashboard header (#856) * adds calendar icon; fixes spacing in dashboard header * tightens up dashboard header * re-instates spacing for dashboard CTA Co-authored-by: Marissa Gorlick <magorlick@gmail.com> * Fixing edge cases with modifying models Co-authored-by: Hamilton Ulmer <hamilton.ulmer@gmail.com> Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com> Co-authored-by: Dhiraj Barnwal <sumankumaribarnwal@gmail.com> Co-authored-by: Marissa Gorlick <magorlick@gmail.com>
…xisting dashboard
* Adding svelte-query * Adding reactive query update * Adding backend APIs based on new specs * Removing dev routes * Renaming * Fix endpoint paths * Adding validation to /meta endpoint * Renaming and fixing sqlName * Renaming filter * Query the `/meta` API via `svelte-query` (#801) * Create `lib/svelte-query/queries` directory * Add `svelte-query` `QueryClient` * Bugfix * Call `/meta` via `svelte-query` (WIP) * Change query key format * Refactor `LeaderboardDisplay` to use `/meta` API * Avoid "missing queryFn" error log * Use vanilla fetch * Remove log * Use `/meta` for list of measures * Update `esbuild` * Use new type name * Remove client-side validation (tmp bugfix) * Call `svelte-query` for valid measures and dimensions * Add `TODO` for OpenAPI client code generation * Update comment * Query the `/timeseries` API via `svelte-query` (#803) * Create `lib/svelte-query/queries` directory * Add `svelte-query` `QueryClient` * Bugfix * Add query key and function for `/timeseries` API * Call `/meta` via `svelte-query` (WIP) * Change query key format * Refactor `LeaderboardDisplay` to use `/meta` API * Avoid "missing queryFn" error log * Use vanilla fetch * Remove log * Remove unused code * Use `/meta` for list of measures * Update `esbuild` * Add query to `timeseries` endpoint * Call `timeseries` endpoint via `svelte-query` * Use new type name * Remove client-side validation (tmp bugfix) * Call `svelte-query` for valid measures and dimensions * Add `TODO` for OpenAPI client code generation * Update comment * Use updated type names * Clean up * Invalidate `/timeseries` query when time controls change * updating og:image (#760) * Revert "Merge branch 'main' into svelte-query-timeseries" This reverts commit 2b68e54, reversing changes made to a13c8d6. Co-authored-by: Mike Godwin <1851282+godzig@users.noreply.github.com> Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com> * Adding svelte-query to leaderboards (#806) * Move time range logic from Redux to components (WIP) * Moving big number to svelte-query (#817) * Moving big number to svelte-query * Adding timeseries to invalidation * Use a Svelte store for the metrics explorer (#820) * Moving to svelte store for explorer * Changing the svelte store usage pattern * Fixing a few issues * Updating names * Merge `main` into `svelte-query` * Update package.json * Update `package-lock.json` * Revert regressions in docs * Move function into the file it's used in * Fix lint errors * Fix linechart jank (#823) * Moving to svelte store for explorer * Add guard to prevent re-renders * Ensure we only make valid time ranges Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com> * Remove old Redux code (#825) Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com> * Remove explore redux (#826) * Removing remaining explore redux code * Fix import * Removing unnecessary fields from explore Co-authored-by: greenep12 <ericpgreen2@gmail.com> * Fix API bugs and tests (#836) * Fixing API bugs and tests * Remove TODO Co-authored-by: greenep12 <ericpgreen2@gmail.com> * Bugfix * Create concise custom query hooks (#829) * Removing remaining explore redux code * Fix import * Use `metricView` terminology * Refactor `svelte-query` call to `/meta` * Refactor `svelte-query` call to `/timeseries` * Refactor `svelte-query` call to `/toplist` * Refactor `svelte-query` call to `/totals` * Ensure queries don't run with undefined parameters * Mini refactor * Add request parameters to query keys (recommended in docs) * Fix error message * Fix animation bug * Avoid error when `metricsExplorer` is undefined * Ensure `offset == 0` doesn't disable the query * Various fixes * Fixing a few issues with reactivity * Remove buggy animation * Handling case where dimension is deleted Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com> * Fix time controls state when switching dashboards * Fix lint * Fix time control state (take 2) * Add `TODO` * Refine the loading animation for leaderboards (#848) * refines the loading animation for leaderboards * replaces data only after fetch is complete * Gray the leaderboard numbers during loading Co-authored-by: greenep12 <ericpgreen2@gmail.com> * Fix key for self-managed query cache * Restore types to custom query hooks * Fixing null totals values * Fixing reactive statement for reference values * Fixing null values not being marked as active * Fixing humanise values * Fixing reference value being undefined during query * Fixing reference value being undefined during query * Fixing build * Use `refetchOnMount: true` globally * Remove `QueriesRepository.ts` layer (#857) * Use explicit `svelte-query` for leaderboards * refactors back toward basic svelte query usage * renames the top list query to useTopListQuery * Better naming * Refactor `useTotalsQuery` * updates Totals query; removes unneeded usage of invalidateMetricViewData * Remove `queriesRepository` layer from `useMetaQuery` * Set better `refetchOnX` values * Remove `queriesRepository` layer from `useTimeSeriesQuery` * Remove `QueriesRepository.ts` * Set `refetchOnReconnect` and `refetchOnWindowFocus` back to `true` * Fix `WHERE` clause generation * Adding optional query profile emitting (#819) * Adding optional query profile emitting * Addressing PR comments * Fixing quick metrics modal missing buttons (#859) * enables negative timeseries (#850) Co-authored-by: Dhiraj Barnwal <sumankumaribarnwal@gmail.com> * adds calendar icon; fixes spacing in dashboard header (#856) * adds calendar icon; fixes spacing in dashboard header * tightens up dashboard header * re-instates spacing for dashboard CTA Co-authored-by: Marissa Gorlick <magorlick@gmail.com> * Fixing edge cases with modifying models Co-authored-by: Hamilton Ulmer <hamilton.ulmer@gmail.com> Co-authored-by: Aditya Hegde <adityahegderocks@gmail.com> Co-authored-by: Dhiraj Barnwal <sumankumaribarnwal@gmail.com> Co-authored-by: Marissa Gorlick <magorlick@gmail.com> * Fix bug where measure edits aren't reflected in Explore * Fix lint * Invalidate `/meta` when deleting measures and dimensions * Remove unused props * Remove unused prop * Use previous time controls when switching from a source/model to an existing dashboard Co-authored-by: greenep12 <ericpgreen2@gmail.com> Co-authored-by: Mike Godwin <1851282+godzig@users.noreply.github.com> Co-authored-by: Hamilton Ulmer <hamilton.ulmer@gmail.com> Co-authored-by: Dhiraj Barnwal <sumankumaribarnwal@gmail.com> Co-authored-by: Marissa Gorlick <magorlick@gmail.com>
No description provided.