Skip to content
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

EES-5542 Maps fetching/rendering boundaries for datasets #5423

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

bennettstuart
Copy link
Collaborator

@bennettstuart bennettstuart commented Nov 28, 2024

Setting map charts to fetch location geo JSON for data sets with boundary levels set.

This has been setup by:

  • drilling releaseId & dataBlockParentId props into MapBlock
  • setting up a useQuery to handle fetching location geo JSON based on data set input selection
    • useQuery cache is initialised with existing subject meta location data to avoid duplicate calls
    • geo JSON location cache is wholly handled by useQuery as it stands and is set to not refetch on alt-tab or stale data, as the response is extremely unlikely to change
  • Added testing to check mapBlock requests new geoJson, unable to test that returned boundary data is renderred due to EES-4902, also created a ticket to rectify this EES-5718
  • Removed feature flag, now surrounded work is completed and merged

@bennettstuart bennettstuart marked this pull request as ready for review December 4, 2024 15:34
@bennettstuart bennettstuart requested review from amyb-hiveit and ntsim and removed request for amyb-hiveit December 4, 2024 15:35
@bennettstuart bennettstuart force-pushed the EES-5542 branch 3 times, most recently from 3122129 to c0c6c08 Compare December 18, 2024 16:42
@bennettstuart bennettstuart requested a review from ntsim December 19, 2024 14:14
@bennettstuart bennettstuart force-pushed the EES-5542 branch 7 times, most recently from 8255bad to 8cd2437 Compare December 20, 2024 15:55
Copy link
Collaborator

@ntsim ntsim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some of your tests are failing as well. Seems like there's some errors around a missing intersection observer.

I've added the intersection-observer polyfill to fix this in the #5502 PR (which fixes the react-leaflet problem) that is targeting your branch.

@@ -361,6 +361,7 @@ describe('ChartBuilder', () => {

test('calls `onTableQueryUpdate` when change boundary level', async () => {
const testInitialChart: Chart = {
onBoundaryLevelChange: jest.fn(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onBoundaryLevelChange shouldn't be on the Chart type as it's just supposed to be the chart's JSON configuration from the API.

We should omit this from Chart using Omit (not OmitStrict) and remove this from all relevant places in this PR where it's been added so far.

@bennettstuart bennettstuart force-pushed the EES-5542 branch 2 times, most recently from a426f0f to 8a047c0 Compare January 17, 2025 12:35
@bennettstuart bennettstuart force-pushed the EES-5542 branch 2 times, most recently from 5292182 to 19506c4 Compare January 17, 2025 17:33
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