dfe-analytical-services/dfeshiny

external_link() hidden text is not hidden

Closed this issue · 1 comments

Describe the bug

When using the add_warning = FALSE argument there should be a hidden message saying "This link opens in a new tab". However, I overlooked the need for CSS for the custom class, and the text is rendering for all users.

How to reproduce

Steps to reproduce the behaviour:

  1. Clone this repo (or use another R Shiny app)
  2. Add an external_link() with add_warning = FALSE
  3. Run the app
  4. See the hidden text still appears visually

Expected behaviour

Hidden text should not show.

Screenshots

image

Code for this tab is:

      ## Example text panel ---------------------------------------------------
      shiny::tabPanel(
        value = "text_example",
        "Text example",
        shiny::tags$h2("Hey, here's a heading"),
        shiny::tags$p(
          "Hey ",
          external_link(
            "https://shiny.posit.co/",
            "R Shiny"
            ),
          " is so great we should show it off more."
        ),
        shiny::tags$p(
          "Sometimes you just want to be in a cave without distractions",
          " when writing code in ",
          external_link(
            "https://shiny.posit.co/",
            "R Shiny",
            add_warning = FALSE
          ),
          "."
        )
      )

Additional context

Nothing further to add.