EES-5848 Remove default / auto-select filter option from public API #5605
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.
This PR removes the
IsAutoSelect
from the public API'sFilterMetaViewModel
so this information is no longer directly available to consumers (for now).It should be noted that the 'auto-select' option (referenced as
FilterMeta.AutoSelectLabel
) is still stored in the database, but it has been renamed to the more consumer-agnosticFilterMeta.DefaultFilterOptionId
(not directly tied to table tool).We have made
DefaultFilterOptionId
an ID that references theFilterOptionMeta
table to gain referential integrity and allow for faster lookup of the default option in the future.Changes to
AssertDeepEqualTo
The
AssertDeepEqualTo
extension was previously performing unnecessary inequality checks after checking for deep equality. This was quite awkward as it was causing various failures inImportMetadataFunctionTests
that would have been hard to resolve without their removal.We have now removed the inequality checks from
AssertDeepEqualTo
and renamednotEqualProperties
toignoreProperties
to make this distinction clearer.If you want to be certain that the object you're checking has specific properties that are unequal, the recommended approach is to just add those checks in yourself after the
AssertDeepEqualTo
. A good example is in release content cloning tests where we check that the cloned objects have newCreated
dates.As part of this, we've also switched any usages of
AssertExtensions.Except
forignoreProperties
to much terser C# 8 collection expressions.Other changes
EES4735_RenameIsAggregateToIsAutoSelect
migration. We don't typically roll back migrations, but it irked me that this wasn't correctly implemented in case we ever needed to.