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

Remove unused/broken UI and addin functionality #679

Merged
merged 8 commits into from
Nov 21, 2022
Merged

Conversation

juliasilge
Copy link
Member

This PR removes/deprecates functions for viewing legacy API pins in the RStudio Viewer pane. Some of these didn't work anymore:

library(pins)
ui_addin_pin_find()
#> Error in `shiny::shinyAppDir()` at pins-r/R/ui_addin.R:10:2:
#> ! No Shiny application exists at the path ""

#> Backtrace:
#>     ▆
#>  1. └─pins::ui_addin_pin_find()
#>  2.   └─shiny::shinyAppDir(system.file("rstudio/shinyaddin", package = "pins")) at pins-r/R/ui_addin.R:10:2
#>  3.     └─rlang::abort(...)

Created on 2022-11-18 with reprex v2.0.2

library(pins)
ui_connection_create()
#> Error in `shiny::shinyAppDir()` at pins-r/R/ui_connection.R:10:2:
#> ! No Shiny application exists at the path ""

#> Backtrace:
#>     ▆
#>  1. └─pins::ui_connection_create()
#>  2.   └─shiny::shinyAppDir(system.file("rstudio/shinycon", package = "pins")) at pins-r/R/ui_connection.R:10:2
#>  3.     └─rlang::abort(...)

Created on 2022-11-18 with reprex v2.0.2

Some of this may still work but would not be a part of typical production or scheduled jobs because these are intended for interactive use only.

@juliasilge
Copy link
Member Author

This will let us move forward with #678 more easily.

viewer$connectionClosed(type = "Pins", host = board$name)
.globals$ui_connections[[board$name]] <- FALSE
}
lifecycle::deprecate_stop("1.1.0", "pin_preview()")
Copy link
Member Author

Choose a reason for hiding this comment

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

I deprecated this because I think it is still somewhat usable in the current release, but it has been @keywords internal and documented as "no longer used" for over a year so we probably could remove it altogether. Again, this is not something that would typically be used in production or scheduled jobs.

@juliasilge
Copy link
Member Author

As far as I can tell from my interactive work and the automated tests, functionality like read/write/list/etc for the legacy API all are unaffected by these changes.

@juliasilge juliasilge requested a review from hadley November 18, 2022 23:50
R/ui_viewer.R Show resolved Hide resolved
@juliasilge juliasilge merged commit 1bf9b6c into main Nov 21, 2022
@juliasilge juliasilge deleted the addin-ui-remove branch November 21, 2022 19:03
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants