placement of sidebar created with sidebarPanel() moves slightly between tabs created with tabPanel()

Hi, all, I have a minor, spacing-related question for my Shiny app.

In particular, the placement of the sidebar created with sidebarPanel() moves slightly between tabs created with tabPanel().

It is probably easiest to see this in the app itself: https://jmichaelrosenberg.shinyapps.io/shinykonfound/

If you tab between "Linear" and "Non-linear", you'll see that the sidebar moves slightly to the right.

I tried to change the length of the text input box labels (and their default values) as well as the width of the sidebar panel, but the issue persisted. I also tried to add additional tabPanel()s, so that there was the same number within the non-linear tab as for the linear tab, but, again, the issue persisted. Any ideas for how to address it would be appreciated.

Source is here: https://github.com/jrosen48/shinykonfound

Hi,

Nice app!
You just had a small mix-up defining the layout of the Non-Linear tab panel

tabPanel("Non-linear Models (Developmental and Not-Published)",
               tabPanel("Non-Linear",
                   sidebarPanel(tags$h5(
   ...

 )),
mainPanel(
   ...
p())))

Should be:

tabPanel("Non-linear Models (Developmental and Not-Published)",
                 sidebarLayout(
                   sidebarPanel(tags$h5(
   ...
 ),
mainPanel(
   ...
p()))))

Hope this helps,
PJ

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.