-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix InitRxUI to account for order of passed registration namespaces #3887
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
Fix InitRxUI to account for order of passed registration namespaces #3887
Conversation
we'll discuss as a team if we want to keep this PR. If we bring it across would you be okay just adding some simple unit tests for it? |
Sure, I just was not sure what specifically needs to be tested here (or how, because the effect can vary in different setups), so would not mind an idea on what to write tests for. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3887 +/- ##
==========================================
+ Coverage 59.03% 67.82% +8.78%
==========================================
Files 160 138 -22
Lines 5847 4805 -1042
Branches 1031 777 -254
==========================================
- Hits 3452 3259 -193
+ Misses 2007 1344 -663
+ Partials 388 202 -186 ☔ View full report in Codecov by Sentry. |
I think I had the same issue. When loading data async and trying to update the properties I got a I managed to fix this by setting
Looks like an ugly workaround but it works for me... |
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.
Pull Request Overview
This PR fixes a bug in the InitializeReactiveUI
method where registration namespaces were being processed in the wrong order. The fix ensures that when multiple namespaces are passed for registration, they are processed in the order specified by the caller rather than in the order they appear in the internal dictionary.
Key Changes
- Changed the enumeration source from
possibleNamespaces
dictionary toregistrationNamespaces
array - Updated the filtering logic to preserve the original order of namespaces
- Modified the selection logic to lookup namespace values from the dictionary
What kind of change does this PR introduce?
Bug fix?
What is the current behavior?
Originally the
InitializeReactiveUI
function didn't account for order of passed registration, because the allowed namespace dictionary was enumerated instead of the array (which is kind of backwards if you think about it).What is the new behavior?
Order of the namespaces is preserved when registering.
What might this PR break?
Multi-platform projects that rely on current non-determinant order may break because of different order of registrations.
Please check if the PR fulfills these requirements
Other information:
Not sure on what kind of tests/docs are expected, so I am leaving it as draft for now, feel free to undraft if you feel this is OK.