Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "ui content" instead of "ui segment" in dashboard body. Related to #147 #151

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

andrie
Copy link
Contributor

@andrie andrie commented Nov 3, 2020

Fix theming problem with dashboard_body()

As described in #147, using a dark theme doesn't work well. For example, the headers remain white on white.

This fixes this specific issue by using content instead of segment for the dashboard body.

Light theme:

image

Dark theme (cyborg):

image

Test code:

library(shiny)
library(semantic.dashboard)

ui <- dashboardPage(
  theme = "cyborg",
  dashboardHeader(),
  dashboardSidebar(side = "left", size = "thin",
                   sidebarMenu(
                     menuItem(tabName = "tab1", "Tab 1"),
                     menuItem(tabName = "tab2", "Tab 2"))),
  dashboardBody(tabItems(
    tabItem(tabName = "tab1", p("Tab 1")),
    tabItem(tabName = "tab2", p("Tab 2"))))
)

server <- function(input, output) {
}

shinyApp(ui, server)

Copy link
Contributor

@dokato dokato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good starter, but I think that the problem lays in the fact that some Fomantic UI features are still not available for SemanticUI themes.

@dokato dokato merged commit 25ff4d6 into Appsilon:develop Nov 5, 2020
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.

2 participants