-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LANDGRIF-1625] fixes calling /h3data endpoint wrongly when layer is raster #1235
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
2ae272b
to
072047d
Compare
072047d
to
bb3cf70
Compare
bb3cf70
to
3bd0814
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
U the man @agnlez thanks.
It works well, I haven't found my way to any weird behaviors, except this:
But this seems to be some internal react/next/whatever magic related to query key/caching or something that I don't understand. It does not seem to hit the backend so I leave up to your expertise what to do regarding this.
However, please, for the love of that's holy, add some tests before merging this. We can pair up to think about this. Meanwhile I will block it
@monro93 what are your thoughts? Are you up add some tests to this?
3bd0814
to
ec147a0
Compare
@alexeh those requests are done by the map (specifically the maplibre library) when fetches tiles. Sometimes, if the user moves quickly in the map, some requests are cancelled because they are not within the viewport anymore. This is an expected behavior, nothing harmful. (There might be other behaviors that might trigger this) |
ec147a0
to
364b184
Compare
This pull request includes several changes to improve the handling of contextual layers and their data fetching in the analysis visualization components. The most important changes include the addition of a new dependency, updates to the contextual layer components, and the refactoring of hooks for better performance and maintainability.
Dependency Addition:
@lukemorales/query-key-factory
toclient/package.json
to manage query keys more efficiently.Contextual Layer Components:
Loading
component incategory-layer/component.tsx
to include specific class names for better styling.preview-map/component.tsx
to use new hooks and handle contextual layers more effectively, including adding theMapboxRasterLayer
component and improving the status management of layers. [1] [2] [3]contextual-legend-item/component.tsx
to clean up the code. [1] [2] [3]Hook Refactoring:
contextual.ts
to remove theuseAllContextualLayersData
hook and update theuseH3ContextualData
hook to use the new query key store. [1] [2] [3] [4]index.ts
to align with the new query key store and improve data fetching logic. [1] [2]useContextualLayer
hook fromcontextual.ts
as it is no longer needed.Query Key Store:
querykey-store.ts
to manage query keys centrally and improve the consistency of data fetching across the application.Application Initialization:
_app.tsx
to use a centralized query client configuration by importinggetQueryClient
from the new query key store. [1] [2]