juba / shinyglide

Glide.js component for Shiny apps
https://juba.github.io/shinyglide/
91 stars 8 forks source link

Unexpected behavior with bs4Dash #21

Closed gueyenono closed 3 years ago

gueyenono commented 3 years ago

The original poster of Issue #10 used the shinydashboard package, which is based on Bootstrap v.3. Their problem was fixed by the current dev version of the package. I use bs4Dash, which is based on Bootstrap v.4 and I suspect that this is the reason why my problem is not fixed by the current dev version.

For some reason, the "Next" and "Back" buttons get forced into the left side of the glide window (top or bottom depending on the controls_position argument).

bs4Dash-shinyglide

bs4Dash-shinyglide2

library(shiny)
library(bs4Dash)
library(shinyglide)

shinyApp(
  ui = dashboardPage(
    title = "Basic Dashboard",
    header = dashboardHeader(),
    sidebar = dashboardSidebar(),
    controlbar = dashboardControlbar(),
    footer = dashboardFooter(),
    body = dashboardBody(

      glide(
        screen(h1("First screen")),
        screen(h1("Second green"))
      )

    )
  ),
  server = function(input, output) {}
)
juba commented 3 years ago

I think this should now be fixed in the development version. There may be other incompatibilities with bootstrap 4, so feel free to reopen the issue if needed.

Thanks for taking the time to report the issue with a reproducible example.