Skip to content

AB#82962: The data for map popouts should be loaded on demand, not upfront - #1269

Open
Joselgc1 wants to merge 1 commit into
nextfrom
AB#82962
Open

AB#82962: The data for map popouts should be loaded on demand, not upfront#1269
Joselgc1 wants to merge 1 commit into
nextfrom
AB#82962

Conversation

@Joselgc1

Copy link
Copy Markdown
Contributor

Description

Improves map popup performance by loading popup data on demand instead of including it in the initial map-layer response.

The backend now caches the complete generated feature layer in Redis for 15 minutes and returns compact features containing only display data and an internal popup reference. When a user clicks a marker or cluster, the frontend requests only that feature's configured popup fields from the cache. Cache entries are scoped to the authenticated user. The implementation also preserves admin geometry mappings, supports popup template placeholders, and ignores stale popup responses from rapid consecutive clicks.

Useful links

Type of change

  • Improvement (refactor or addition to existing functionality)

How Has This Been Tested?

  • Backend build and lint

    • Run npm run build in ems-backend.
    • Run npx eslint "src/routes/gis/index.ts" in ems-backend.
  • Frontend lint and unit tests

    • Run npx nx run shared:lint --output-style=static in ems-frontend.
    • Run npx nx run shared:test --configuration=ci --runInBand in ems-frontend.
    • Result: 24 test suites and 343 tests passed.
  • Manual Front Office verification

    1. Open /{applicationId}/dashboard/{dashboardId} for Health Emergencies Management Suite – TEST.
    2. Load the Dashboard map and inspect POST /gis/feature.
    3. Confirm the initial response includes only compact features and __oortPopup, without popup fields.
    4. Click a marker or cluster.
    5. Confirm POST /gis/feature/popup is sent.
    6. Confirm the popup displays the fields returned by the popup request.
    7. Confirm the initial GIS layer request is not repeated when opening popups.

Screenshots

Not applicable. This is a performance and network-payload improvement with no intended visual change.

Checklist:

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Joselgc1 Joselgc1 changed the title AB#82962: The data for map popouts should be loaded on demand, not up… AB#82962: The data for map popouts should be loaded on demand, not upfront Aug 26, 2026
@Joselgc1
Joselgc1 marked this pull request as ready for review August 26, 2026 17:11
@Joselgc1
Joselgc1 requested a review from AntoineRelief August 26, 2026 17:11
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.

1 participant