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

Refactor the toggle slider in the package based on the comment #321

Open
vedhav opened this issue Oct 18, 2024 · 0 comments
Open

Refactor the toggle slider in the package based on the comment #321

vedhav opened this issue Oct 18, 2024 · 0 comments
Labels

Comments

@vedhav
Copy link
Contributor

vedhav commented Oct 18, 2024

          I think that `update_toggle_slider` should update only `state` and then `state` change should update slider and numeric inputs. I think there should be only one input rendered and `if (input$toggle %% 0)` should be placed in the `renderUI` - this would avoid a need to update two inputs in the same time.

Originally posted by @gogonzo in #319 (comment)

@vedhav vedhav added the core label Oct 18, 2024
vedhav added a commit that referenced this issue Oct 28, 2024
Closes #321 

Changes:
1. The `toggle_slider_ui` and `toggle_slider_server` can only be used to
create dichotomous slider now. There was no instance of single value
slider created. So, there is no need to create it and increase the
complexity.
2. Removal of the `keep_range_slider_updated` in favor of
`keep_slider_state_updated` to keep the states updated based on other
widget inputs.
3. Updated the modules that uses this widget. Note that the
`tm_g_gh_lineplot` does not use the `keep_slider_state_updated` and
directly updates the state reactiveValues.

Check all the modules that use the `toggle_slider` module:

- [ ] `tm_g_gh_boxplot`
- [ ] `tm_g_gh_correlationplot`
- [ ] `tm_g_gh_density_distribution_plot`
- [ ] `tm_g_gh_lineplot`
- [ ] `tm_g_gh_spaghettiplot`
- [ ] `tm_g_gh_scatterplot `(deprecate in favor of
`tm_g_gh_correlationplot`)

---------

Co-authored-by: go_gonzo <[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

1 participant