Skip to content

Support for links in the appTitle box #681

Closed

Description

@RiboRings

Hi!

I would like to add a link to the title box of my iSEE-based app, so that when you click on it, it would bring you back to the home page (an https address). My app home page can be found at this link: https://miadash-microbiome.2.rahtiapp.fi/

When I try to use tags$a or HTML methods in the appTitle argument of iSEE(), the title is not rendered correctly and the link does not work.

Would it be possible to add this feature to the dashboard box in the main iSEE package?

Thank you in advance!

Activity

  1. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    I think/fear the behavior and/or the content of the app title is limited in its extent by the shinydashboard general behavior.
    I don't know if it is possible to have this circumvented with any of the usual tricks to "force content in the form we need", probably worth checking on the upstream side of us?

  2. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    Hmm, scratch that, as this one works @RiboRings

    library(shinydashboard)
    library(shiny)
    
    ui <- dashboardPage(dashboardHeader(title = 
                                          tags$a(
                                            "Link to your home",
                                            target = "_blank",
                                            href = "https://miadash-microbiome.2.rahtiapp.fi/"
                                          )),
                        dashboardSidebar(),
                        dashboardBody("all the rest of the content"))
    
    server <- function(input, output, session) {}
    
    shinyApp(ui, server)
    
    
    
    image

    ... but the same does not within iSEE

  3. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    In theory, this

    iSEE::iSEE(appTitle = tags$a(
        "Link to your home",
        target = "_blank",
        href = "https://miadash-microbiome.2.rahtiapp.fi/"
    ))
    

    would give the same behavior, but becomes rendered as...

    image
  4. RiboRings commented on Nov 22, 2024

    @RiboRings
    Author

    Hi!

    Yes, that's exactly the strange behaviour I noticed when trying a tag$a or HTML() as appTitle arg of iSEE().

    Thanks for the working example! Since I am making use of the other dashboard elements from iSEE, I was trying to get it to work, but I'll see if I find a workaround.

    Thanks!

  5. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    If you please keep us posted.

    I actually cannot tell why this is not interpreted correctly, as all we do to the appTitle parameter is fairly minimal:

    iSEE/R/iSEE-main.R

    Lines 161 to 163 in 99b2629

    title = ifelse(is.null(appTitle),
    paste0("iSEE - interactive SummarizedExperiment Explorer v", packageVersion("iSEE")),
    appTitle),

  6. RiboRings commented on Nov 22, 2024

    @RiboRings
    Author

    Could possibly be that the ifelse function is picking only the first element in the tags list?

  7. RiboRings commented on Nov 22, 2024

    @RiboRings
    Author

    It works using an if else statement instead of the ifelse function!

        .set_title <- function(title) {
          if( is.null(title) ) {
            paste0("iSEE - interactive SummarizedExperiment Explorer v", packageVersion("iSEE"))
          } else {
            title
          }
        }
        
        iSEE_ui <- dashboardPage(
            dashboardHeader(
                title = .set_title(appTitle),
    
    Screenshot 2024-11-22 at 19 03 07
  8. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    i.e. ifelse does something unexpected

    image

    Well spotted!

  9. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    As a bonus track content for you, ICYMI...

    iSEE::iSEE(appTitle = "Your title 🦠")
    
    image

    --> You can go wild with emojis as well in there 😉

  10. RiboRings commented on Nov 22, 2024

    @RiboRings
    Author

    Haha looks very appropriate!

    If that is ok, I could open a PR to fix this behaviour.

  11. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    On it already as you type 😉

    ... and taking a chance to update also the GHA

  12. RiboRings commented on Nov 22, 2024

    @RiboRings
    Author

    Great thank you so much!

  13. RiboRings commented on Nov 22, 2024

    @RiboRings
    Author

    ... and taking a chance to update also the GHA

    Have you considered rworkflows? No need to update GHA after new Bioc release.

  14. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    So far it is almost as easy as changing 20 to 21, since the rest should keep on working, but thanks for the heads up, I was not aware of that!
    Will give it a good look

  15. federicomarini commented on Nov 22, 2024

    @federicomarini
    Contributor

    Solution coming in #682

  16. RiboRings commented on Dec 2, 2024

    @RiboRings
    Author

    Hi! Any update when this feature will be incorporated? :)

  17. federicomarini commented on Dec 2, 2024

    @federicomarini
    Contributor

    I just merged that yesterday in 😉
    Give it the time it takes to build on the Bioc machines, or just grab the devel version from Github, now it is in devel

  18. kevinrue commented on Dec 2, 2024

    @kevinrue
    Member

    I've pushed upstream. Like Fede wrote, give it a couple of days. Feel free the re-open the issue if needed.

  19. RiboRings commented on Dec 2, 2024

    @RiboRings
    Author

    Fantastic, thank you!

  20. lcolladotor commented on Jul 8, 2025

    @lcolladotor
    Contributor

    Since I saw that you mentioned biocthis and rworkflows in this thread, as an FYI you might be interested in https://lcolladotor.github.io/biocthis/news/index.html#biocthis-1174.

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