positron icon indicating copy to clipboard operation
positron copied to clipboard

Data Explorer doesn't reapply filters if underlying data object changes

Open jthomasmock opened this issue 1 year ago • 0 comments

System details:

Positron and OS details:

Positron Version: 2024.07.0 (Universal) build 107 Code - OSS Version: 1.91.0 Commit: 240a81d86244160a275539c3c0e71adf70bbcbf6 Date: 2024-07-29T04:54:25.803Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Interpreter details:

R 4.3.2

Describe the issue:

Data Explorer doesn't refresh filters when the underlying dataframe is changed, only when some other modifying operation is done in the Data Explorer such as applying an additional filter. This limits the ability to iterate across code and UI.

Other elements such as the summary statistics do update on the fly, and we are able to invalidate filters if the column type has changed, so we should have some awareness of the dataframe we could make use of here.

Steps to reproduce the issue:

In a R Script

  1. Assign car2 <- mtcars and View(car2)
  2. Create a filter such as mpg > 5 in the filter bar, notice no rows have changed (as all the values are above this)
  3. modify the underlying data with car2$mpg <- 3
  4. Notice that all the values in mpg are now 3, which is less than the filter should allow
  5. Create an additional filter on a different or same column, note that all values are excluded now.

https://github.com/user-attachments/assets/7fe1998c-6c30-454d-8a03-88230e551673

Expected or desired behavior:

We should re-query filters when the dataframe changes, otherwise we lose the ability to safely iterate across code and UI together.

Were there any error messages in the UI, Output panel, or Developer Tools console?

jthomasmock avatar Jul 29 '24 12:07 jthomasmock