Skip to content

Sidebar collapse to menu button which does not respond #172

Closed

Description

@pplanger

Steps to reproduce

  1. Open a shiny.fluent dashboard with a sidebar.
  2. Decrease the size of your screen, e.g. typical mobile phone sizes

Below you can find a part of our code:

`navigation <- Nav(

IconButton.shinyInput("menu"),

groups = list(
list(links = list(
list(name = 'Start', url = '#!/', key = 'home'),
list(name = 'Browse Topics', url = '#!/browse-topics', key = 'browse'),
list(name = 'Popular by Year', url = '#!/popular', key = 'popular'),
list(name = 'Hot/Cold', url = '#!/hot-cold', key = 'hot-cold'),
list(name = 'Topic Evolution', url = '#!/topic-evolution', key = 'topic-evolution'),
list(name = 'Methods', url = '#!/methods', key = 'methods')
))
),
initialSelectedKey = 'home',
styles = list(
linkText = list(
fontWeight = 600,
fontSize = 15,
color = "white",
":hover" = list(
color = "black"
)
),
root = list(
height = '100%',
width = "100%",
boxSizing = 'border-box',
overflowY = 'auto',
overflowX = "hidden"
# transition = 'width 0.3s ease-in-out',
# selectors = list(
# ":hover" = list(
# width = "100%"
# )
# )
)
)
)

menu = IconButton.shinyInput(
"menu",
iconProps = list(
iconName = "CollapseMenu",
styles = list(
root = list(
color = "#241b3e",
fontWeight = 600
)
)
)
)`

Bug description

I'm currently trying to make our R-Shiny App more mobile-phone friendly. One of the main problems is that the sidebar collapses on mobile phones but the resulting button does not respond. As far as I have looked it up, this might be a bug of the shiny.fluent package. Does anyone of you know a simple solution to this issue?

Expected behavior

The size of the sidebar should just decrease instead of collapsing or alternatively the resulting menu button should respond.

Comments

shiny.fluent app with sidebar:
Psychtopics with sidebar

shiny.fluent app without sidebar (with not responding button):
Psychtopics without sidebar

Activity

  1. jakubsob commented on Mar 27, 2023

    @jakubsob
    Contributor

    Hi @pplanger,

    This looks rather like an issue with CSS/JavaScript code used to collapse the sidebar, not a bug in shiny.fluent. The package provides only components and this is an issue with layout.

    The code you attached doesn't reproduce the issue. Please take a look what a reproducible example and provide one. Otherwise we won't be able to determine if this is an bug in shiny.fluent or not.

  2. locked and limited conversation to collaborators on Mar 27, 2023
  3. converted this issue into a discussion #175 on Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions