MAB-620: Bug - link to site profiles on country details page broken#248
Closed
Joselgc1 wants to merge 6 commits intounesco-mabfrom
Closed
MAB-620: Bug - link to site profiles on country details page broken#248Joselgc1 wants to merge 6 commits intounesco-mabfrom
Joselgc1 wants to merge 6 commits intounesco-mabfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Checklist:
( * == Mandatory )