Skip to content

Client error console prevents apps with matching input and output IDs #3943

Closed

Description

@gadenbuie

#3931 adds a check for matching input IDs that match output IDs, which was previously allowed. The following app runs with shiny 1.8.0 and will break in the 1.8.0.9000 because of the duplicate caption ID, which is used once for an input and once for an output.

library(shiny)

ui <- fluidPage(
  textInput("caption", "Caption", "Data Summary"),
  textOutput("caption")
)

server <- function(input, output, session) {
  output$caption <- renderText(input$caption)
}

shinyApp(ui, server)

The following ID was repeated: "caption": 1 input and 1 output

This example is extracted from shinycoreci: 003-reactivity.

We may want to reduce the severity of the message to a warning in the case of 1 input and 1 output, or we may want to remove this particular check altogether.

Personally, I think it's important that we continue to support overlapping IDs in input and outputs, e.g. input$caption and output$caption.

Activity

  1. added a commit that references this issue on Nov 29, 2023
    6eba4cf
  2. added a commit that references this issue on Nov 30, 2023
    59b1c46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions