Context handler that respects position in Domain #6740
Draft
+211
−107
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.
Issue
Resolves #6721
Description of changes
Added a new context handler that respects context settings' attributes
exclude_attributes
,exclude_metas
andexclude_class_vars
. This context handler avoids storing the whole domain into settings and thus perfect matches do not work.I searched for possible instances of #6721 in this repo and found only 3 cases where a limited
DomainModel
was used for a context settings, out of which only 1 was problematic:feature_model
: not a problem, because it is applied to a processed data set where every possible feature is moved into.attributes
.feature_model
(for CV by Feature): not the same problem, because it usesPerfectDomainHandler
.row_side_color_model
: finally, a bug. It this case, because of heavy customization, there were no crashes but UI was in an inconsistent state.In Heat Map, a combo box for choosing row annotation color is limited to metas and class vars, and thus, when a selected feature was moved from metas to attributes, an incompatible context would match. That did not trigger any crashes because the combo box was updated through special functions, but it did leave the UI in an inconsistent state: an element with index of -1 was selected in the combo (""), and, the saved color was still shown in the map. Fixed by using the proposed ContextHandler.
Includes