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

Retain brush selection on plot resize #192

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

vedhav
Copy link
Contributor

@vedhav vedhav commented Sep 27, 2023

Closes #174

@vedhav vedhav requested a review from chlebowa September 27, 2023 07:24
@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2023

badge

Code Coverage Summary

Filename                   Stmts    Miss  Cover    Missing
-----------------------  -------  ------  -------  --------------------------------------------
R/basic_table_args.R          23       0  100.00%
R/draggable_buckets.R         82      82  0.00%    57-152
R/get_dt_rows.R               13      13  0.00%    27-39
R/ggplot2_args.R              49       0  100.00%
R/include_css_js.R             7       1  85.71%   17
R/optionalInput.R            225     182  19.11%   87-362, 414, 465, 471, 486-499
R/panel_group.R               90      90  0.00%    12-132
R/plot_with_settings.R       382      21  94.50%   272-285, 344-345, 356-357, 607-608, 610, 612
R/standard_layout.R           35       0  100.00%
R/table_with_settings.R      173       1  99.42%   79
R/utils.R                     11       1  90.91%   7
R/verbatim_popup.R            99      49  50.51%   63-78, 104-105, 107, 115-143, 164
R/white_small_well.R           7       7  0.00%    18-24
TOTAL                       1196     447  62.63%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 65b07a3

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2023

Unit Tests Summary

    1 files    10 suites   17s ⏱️
101 tests 101 ✔️ 0 💤 0
208 runs  208 ✔️ 0 💤 0

Results for commit 8bbc237.

♻️ This comment has been updated with latest results.

@chlebowa
Copy link
Contributor

Would you mind modifying the last example app while you're at it?

shinyApp(
  ui = fluidPage(
    useShinyjs(),
    actionButton("button", "Show/Hide"),
    plot_with_settings_ui(
      id = "plot_with_settings"
    )
  ),
  server = function(input, output, session) {
    plot_r <- reactive(ggplot2::qplot(data = faithful, x = waiting, y = eruptions))

    show_hide_signal_rv <- reactiveVal(TRUE)

    observeEvent(input$button, show_hide_signal_rv(!show_hide_signal_rv()))

    plot_with_settings_srv(
      id = "plot_with_settings",
      plot_r = plot_r,
      height = c(400, 100, 1200),
      width = c(500, 250, 750),
      show_hide_signal = reactive(show_hide_signal_rv())
    )
  }
)

Copy link
Contributor

@chlebowa chlebowa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

.lintr Show resolved Hide resolved
@chlebowa
Copy link
Contributor

We have PR-blocking indentation checks now? 🙄

@vedhav vedhav merged commit 8d6f83c into main Sep 27, 2023
@vedhav vedhav deleted the 174-retain-brush-selection-on-plot-resize branch September 27, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Selected brush gets cleared on resizing because of re-render of plot
3 participants