Skip to content
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

ChoiceFilterState improve init #183

Closed
nikolas-burkoff opened this issue Feb 1, 2023 · 1 comment
Closed

ChoiceFilterState improve init #183

nikolas-burkoff opened this issue Feb 1, 2023 · 1 comment
Assignees
Labels

Comments

@nikolas-burkoff
Copy link
Contributor

nikolas-burkoff commented Feb 1, 2023

I think these get_choices_label functions are too complicated. I think we can simplify and tidy up the way how we obtain counts. In the init of choicesFilterState there is private$histogram_data which isn't used at all. Having private$choices where value is a factor level and name is a count is also not elegant. I think we can introduce

private$choices # factor levels
private$choices_count # unfiltered count
private$f_choices_count # reactive
private$calculate_choices_count(x) 

That is just a proposition, I think it would be nice if we tidy up these initialize methods and how we preserve counts.

Originally posted by @gogonzo in #180 (comment)

@donyunardi
Copy link
Contributor

Acceptance Criteria:

  • Simplify the property/attributes of the class
  • Update the class' methods

BLAZEWIM added a commit that referenced this issue Feb 15, 2023
# Pull Request

Fixes
#[183](#183)

---------

Signed-off-by: Marek Blazewicz <[email protected]>
Co-authored-by: Mahmoud Hallal <[email protected]>
Co-authored-by: Dawid Kałędkowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants