Skip to content

Replace shinyBS popovers with Bootstrap tooltips#34

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/remove-shinybs-popups
Draft

Replace shinyBS popovers with Bootstrap tooltips#34
Copilot wants to merge 6 commits intomainfrom
copilot/remove-shinybs-popups

Conversation

Copy link

Copilot AI commented Feb 1, 2026

shinyBS popovers are unmaintained and breaking on modern browsers. This replaces them with a Bootstrap tooltip approach that keeps the same “info” affordance and HTML content support.

  • UI tooltip wiring
    • Swap shinyBS::popify() + bsButton() for tooltip-enabled span() and initialize tooltips via tags$script.
  • Styling and attribution
    • Add tooltip CSS/JS (with attribution per StackOverflow source) and keep existing visual affordances.
  • Dependency/docs cleanup
    • Drop shinyBS from Imports and update documentation/NEWS language to “tooltips”.

Example tooltip markup (generated UI):

span(
  `data-toggle` = "tooltip", `data-placement` = "right", `data-html` = "true",
  title = "A tooltip <i>with HTML</i>",
  icon("info-circle")
)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • canonical-bos01.cdn.snapcraftcontent.com
    • Triggering command: /usr/lib/snapd/snapd /usr/lib/snapd/snapd -r-cran-fit.mode--norc eb dpkg-deb --co�� 1-3-1_all.deb /var/lib/dpkg/tmr-cran-plotly /usr/bin/dpkg-spr-cran-dt hics_0.5-1-1_allbash /var/lib/dpkg/tm--norc /usr/bin/dpkg-sp--noprofile dpkg-split -Qao�� -r-cran-spdata_2.3.0-1_all.deb .20.0-2ubuntu0.1_amd64.deb eb b -10-1_amd64.deb eb rm (dns block)
  • cloud.r-project.org
    • Triggering command: /usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --no-echo --no-restore -e install.packages(c(&#39;shiny&#39;,&#39;bslib&#39;,&#39;testthat&#39;,&#39;jsonlite&#39;),~&#43;~repos=&#39;REDACTED&#39;,~&#43;~lib=&#39;/home/REDACTED/work/metaUI/Rlibs&#39;) (dns block)
    • Triggering command: /usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --no-echo --no-restore -e options(repos=&#39;REDACTED&#39;);~&#43;~install.packages(&#39;shinyWidgets&#39;,~&#43;~lib=&#39;/home/REDACTED/work/metaUI/Rlibs&#39;) -r-cran-rann_2.6.1-1build2_amd64.deb p.ci b -r-cran-ggrepel_/usr/bin/dpkg p.ci b tar -x .random_3.2-2-1_--print-foreign-architectures -r-cran-rhpcblasctl_0.23-42-1_amd64.deb /usr/sbin/dpkg-deb md64.deb -r-cran-stabledi-Qao /usr/sbin/dpkg-d/var/lib/dpkg/reassemble.deb dpkg-deb (dns block)
  • cran.r-project.org
    • Triggering command: /usr/lib/R/bin/exec/R /usr/lib/R/bin/exec/R --no-echo --no-restore -e options(repos=&#39;REDACTED&#39;);~&#43;~install.packages(&#39;shinyWidgets&#39;,~&#43;~lib=&#39;/home/REDACTED/work/metaUI/Rlibs&#39;) (dns block)
  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https -type f -cmin &#43;24 -delete (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Move away from shinyBS for popups</issue_title>
<issue_description>shinyBS is no longer maintained and increasingly breaking with modern browsers - so we should switch to something else.

ChatGPT suggests https://rinterface.github.io/bs4Dash/ which looks v powerful but also like it would require a complete rewrite of the app - or to create custom javascript code like the following.

    tags$script(
      '$(document).ready(function(){
          $("#myButton").popover({
            title: "Popover title",
            content: "Here is the popover content.",
            trigger: "hover"
          });
       });'
    )
  ),
  actionButton("myButton", "Hover over me")

</issue_description>

Comments on the Issue (you are @copilot in this section)

@LukasWallrich This stackoverflow solution looks good. If we use it, make sure to keep attribution.
# Source - https://stackoverflow.com/a/73325271
# Posted by Stéphane Laurent
# Retrieved 2026-02-01, License - CC BY-SA 4.0

library(shiny)
library(bslib)

css <- '
.tooltip {
  pointer-events: none;
}
.tooltip > .tooltip-inner {
  pointer-events: none;
  background-color: #73AD21;
  color: #FFFFFF;
  border: 1px solid green;
  padding: 10px;
  font-size: 25px;
  font-style: italic;
  text-align: justify;
  margin-left: 0;
  max-width: 1000px;
}
.tooltip > .arrow::before {
  border-right-color: #73AD21;
}
'

js <- "
$(function () {
  $('[data-toggle=tooltip]').tooltip()
})
"

shinyApp(
  server = function(input,output,session){},
  ui = fluidPage(
    theme = bs_theme(version = 4),
    tags$head(
      tags$style(HTML(css)),
      tags$script(HTML(js))
    ),
    br(),
    span(
      "Example",
      span(
        `data-toggle` = "tooltip", `data-placement` = "right",
        title = "A tooltip",
        icon("info-circle")
      )
    )
  )
)

```</body></comment_new>
</comments>

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits February 1, 2026 17:54
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove shinyBS and implement new popup system Replace shinyBS popovers with Bootstrap tooltips Feb 1, 2026
Copilot AI requested a review from LukasWallrich February 1, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move away from shinyBS for popups

2 participants