rstudio / shinyuieditor

A GUI for laying out a Shiny application that generates clean and human-readable UI code
https://rstudio.github.io/shinyuieditor/
MIT License
216 stars 29 forks source link

Suggestion: Place value boxes outside of cards #220

Open AlbertRapp opened 11 months ago

AlbertRapp commented 11 months ago

Hi,

I noticed that value boxes always get wrapped into cards (at least I couldn't find out how to change this default behavior in the UI editor). I think the resulting app would look better, if value boxes don't have an additional border around them.

Currently it looks like this:

image

Here's what I think would be nicer default behavior (from bslib::bslib_theme_preview()):

image

Best Albert

nstrayer commented 11 months ago

Agreed. Currently, this is because only items that are gridlayout aware can go directly on the grid. That being said, there is a wrapper in gridlayout already that adds this functionality so it should be as simple as writing out grid_place(area="AREA", value_box(...)).

nstrayer commented 11 months ago

Another option will be once the api for the column layout stuff in bslib is stable, that will be added to the editor, so no gridlayout will be needed. Once the next release of the editor is out I can look at getting this figured out.

AlbertRapp commented 11 months ago

This change worked nicely for me. Thanks. One thing I noticed is that when I reopen the UI editor the value boxes are displayed as unknown UI at the bottom of the card. But in the app they are at the top of the card (above the chart). Is that intended behavior?

image