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

add collapsible sidebar which is capable of showing only icons #133

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dmpe
Copy link
Contributor

@dmpe dmpe commented Mar 16, 2016

Addresses: #74 and #79

@@ -117,7 +117,7 @@ dashboardSidebar <- function(..., disable = FALSE, width = NULL) {
custom_css,
tags$section(
class = "sidebar",
`data-disable` = if(disable) 1 else NULL,
`data-disable` = if(disable) TRUE else NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC, this should be a 1 because that's what's expected by AdminLTE. Also, TRUE is not particularly meaningful in HTML. For example,

> tags$section(`foo`=TRUE)
<section foo="TRUE"></section>

@wch
Copy link
Contributor

wch commented Mar 22, 2016

I think this sort of thing should be implemented as an option to sidebarMenu. It's a different HTML structure, but it makes more conceptual sense for users. That's also how disabling the sidebar is done. See:
https://github.com/rstudio/shinydashboard/blob/master/R/dashboardSidebar.R#L120
https://github.com/rstudio/shinydashboard/blob/master/inst/shinydashboard.js#L53-L56

@dmpe
Copy link
Contributor Author

dmpe commented Mar 22, 2016

Hi @wch ,

Thank you for the review. I have now updated code and it works as I would like to see it working (main functionality is there now).
I should note, maybe that I am not a JS guru.

@dmpe
Copy link
Contributor Author

dmpe commented Apr 7, 2016

CC' @jackolney @wch

@ghost
Copy link

ghost commented Apr 10, 2016

Hello,

I am trying for 3 days without success to implement the "collapsible sidebar which is capable of showing only icons". I don't understant how the links are made between the different R files and those present in the "inst" folder. Is it possible to explain me ? Thank you in advance !

@detule
Copy link

detule commented Feb 25, 2017

Hello,

Please consider detule@afecd74 for an alternative solution, one that toggles this feature as an option to dashboardSidebar.

@Eli-Berkow
Copy link

#317

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

None yet

6 participants