insightsengineering / insightsengineering/teal.slice
Add examples to set_filter_state methods of `FilterStates` specializations
- Dominant language
- R
- Stars
- 12
- Forks
- 7
- Avg merge
- 3d 31m
- Merged PRs (30d)
- 1
Description
The `MAEFilterStates` and `SEFilterStates` have no documentation on how to use them, and the code is far from easy to understand (even if I understand the code, the why escapes me). I ended up in a position where I couldn't create a working example of `set_filter_state` for `SEFilterState` that included the `select` part of the state. It would also be nice to know what this `select` relates to because it's unclear. The mapping between the `state` argument and an `MAE` object is undefined and hard to guess. The problem is compounded by the fact that the `state` object must have a different structure for different specialisations of `FilterStates`, which is fine but makes any examples for one specialisation virtually useless for another. The description in the vignette is cryptic as well:

None of it explains the mapping, and since there's no working example, there's no way to observe the behaviour.
Objective:
* write examples for the method `set_filter_state` for all specializations of `FilterStates`
* (optionally) improve the vignette by explaining the mapping of `state` to an `MAE` object.
Contributor guide
Assessment
This issue has not been assessed yet.