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

shinywidgets inputs are rendered awkwardly #73

Closed
Alik-V opened this issue Apr 6, 2023 · 1 comment
Closed

shinywidgets inputs are rendered awkwardly #73

Alik-V opened this issue Apr 6, 2023 · 1 comment

Comments

@Alik-V
Copy link

Alik-V commented Apr 6, 2023

Hi @daattali, I have found that shiny widgets are rendered awkwardly inside the modals. Possibly related to #55. I would appreciate any suggestions on how to tackle this issue to preserve unmodified rendering appearance.

For example, here is how the elements look inside the modal:
image

whereas this is their intended appearance outside of modal:
image

The simplified UI below is placed in text = tagList() portion of shinyalert when htlm=TRUE.

  output[["some_ui_element"]] <- renderUI({
    list(
      pickerInput(
        inputId = "some_id",
        label = "Choose profiles to download",
        choices = c("Profile 1", "Custom named profile"),
        multiple = TRUE,
        options = list(`actions-box` = TRUE,
                       `live-search` = TRUE,
                       `noneSelectedText` = noneSelectedText),
       ),
      br(),
      actionBttn(
        inputId = "another_id",
        label = "Download selected profiles",
        style = "material-flat",
        color = "success",
        size = "sm",
        no_outline = FALSE
      )
    )
  })

I can write a full repex if it's helpful here!

@daattali
Copy link
Owner

Thanks for the report. This is indeed the same as #55 and doesn't really have a general solution. The underlying javascript library (sweetalert) includes a CSS file that is required, and that css file contains some rules that might interfere with other UI libraries. The modal is usually meant to be fairly simple and only include text or maybe a simple input, but if you want to include more complex UI in it, you'll have to manually sort out the CSS issues and write custom css to overwrite it.

Sorry there isn't a nice solution to this, but I'm closing this issue.

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

No branches or pull requests

2 participants