Skip to content

MAB-620: Bug - link to site profiles on country details page broken#248

Closed
Joselgc1 wants to merge 6 commits intounesco-mabfrom
MAB-620
Closed

MAB-620: Bug - link to site profiles on country details page broken#248
Joselgc1 wants to merge 6 commits intounesco-mabfrom
MAB-620

Conversation

@Joselgc1
Copy link
Copy Markdown

@Joselgc1 Joselgc1 commented Feb 5, 2026

Description

Built on top of Ronny's implementation.

The core problem was a bunch of race conditions in the dashboard filter. URL params, defaults, custom filters, and auto-select were all stepping on each other, so after selecting a BR, it could silently get swapped for a stale or wrong value. If the country changed and the current BR wasn't valid anymore, the component would still hang on to it or auto-pick something else, leading to blank pages, wrong profiles, or the map jumping to a completely unrelated region.

The fix straightens out the whole selection flow. URL params now seed the survey once up front and don't re-fire. Resource questions that depend on a custom filter skip it on the very first load so the param record actually shows up in the list. When a BR loads from a param, its parent fields (like country) are synced back from the record data so everything stays consistent. A request counter throws away stale fetch results, and emitting filter values to widgets is held off until pending record lookups finish. Manual picks are always respected, defaults kick in in a clear order, and the map zoom subscription stays wired up early enough to catch the first filter change instead of missing it.

There are still some issues with map zooming in...

Useful links

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (refactor or addition to existing functionality)

Checklist:

( * == Mandatory )

  • * 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

ronnyCapriles and others added 6 commits January 22, 2026 13:58
…e to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…e to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
@Joselgc1 Joselgc1 marked this pull request as ready for review February 20, 2026 11:53
@AntoineRelief AntoineRelief deleted the MAB-620 branch March 9, 2026 09:27
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.

3 participants