shinydashboard icon indicating copy to clipboard operation
shinydashboard copied to clipboard

Added id's to menuItems and menuSubItems

Open metanoid opened this issue 9 years ago • 8 comments

Please see issue #114

I could not understand how to implement the suggestion of user @funnng as shown here

To this end, I tried my hand at adding id's directly to the menuItem and subMenuItem functions in the shinydashboard code.

I ran the tests, and everything seems to be working. However, I have absolutely no idea what I am doing. Do not merge this pull request until thorough testing has been done by competent persons.

Thanks.

metanoid avatar Feb 27 '16 12:02 metanoid

You need to fix R docs (in man folder) in order to pass travis tests. See here: https://travis-ci.org/rstudio/shinydashboard/builds/112231436#L1353

If you are using rstudio (i hope) + devtools package, then just do CTRL+SHIFT + D. And then push again.

Hopefully Winston (@wch) will take a look on both PR soon. (I would like to open a third one but waiting to have the first one being merged).

dmpe avatar Feb 29 '16 17:02 dmpe

Also added id to box, valueBox, and infoBox

metanoid avatar Jul 06 '16 12:07 metanoid

This would be great to have merged into the dashboard. I am trying to add Google Analytics tracking to a shiny dashboard and it is proving incredibly difficult to do so without IDs being available. It would be great to add this to the tabPanel object too so I can track if someone clicks on the various panels.

danwwilson avatar Jul 24 '16 22:07 danwwilson

Did we fixed the tabpanel id identification ? Current issue is that tabpanel has random value with no id and can't be associated with event action and hence can't logged that event click information in google analytics.

pauldx avatar Jan 19 '17 17:01 pauldx

@metanoid, I came across an issue with the infoBox id in your version of shinydashboard today.

Running this example:

library(shiny)
library(shinydashboard)

ui <- dashboardBody(
  infoBox(title = "Test")
)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

throws the following error:

Error in tag("div", list(...)) : promise already under evaluation: recursive default argument reference or earlier problems?

The app works if we explicitly add an id as in id = "test".

The documentation has:

id An optional id for the element

so it seems to be behaving strangely.

Eli-Berkow avatar Mar 13 '18 08:03 Eli-Berkow

Thanks @Eli-Berkow , fixed - good catch!

metanoid avatar Mar 14 '18 08:03 metanoid

Any chance of this getting merged. Looks like a great addition and becomes very nessecary as you try to add any kind of functionality beyond the basic stuff

RoyMudie avatar Aug 08 '19 09:08 RoyMudie

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

:x: metanoid
:x: soar-tm-discovery
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar May 04 '22 20:05 CLAassistant