quarto-dev / quarto-dev/quarto-cli

Guide for migrating Quarto Dashboard layout/formatting to Shiny Express

Open
#9,448 0 comments 2 reactions 1 assignee View on GitHub

@cwickham is already working on this.

Since Apr 24, 2024.

documentation
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

What would you like to do?

Give feedback or suggest an improvement

Description

@cwickham Here's the outline I had for people who are trying to port from Quarto Dashboard to Shiny Express.

  • Overview
    • Why you might need to go from Quarto Dashboard to Shiny Express
  • Structure
    • Cards and code chunks
      • Quarto: code chunk is card, or alternatively, ::: {.card}
      • Shiny: ui.card()
      • Card titles
        • Quarto: #| title
        • Shiny: ui.card_header
      • Card padding
        • Quarto: #| padding: 0px
        • Shiny: not sure… ui.card(style = "--bs-card-spacer-y: 0; --bs-card-spacer-x: 0;") works but can’t be the best way.
      • Expandable
        • Quarto: #| expandable: false
        • Shiny: argument on ui.card: full_screen: True/False
    • Rows and columns
      • Quarto: H2 headers provide structure
      • Shiny: structure is provided by ui.layout_columns
      • Column-major orientation is well supported in Quarto, not as well supported in Shiny
      • Fill/flow is fillable/fill
    • Multi-page layouts
      • Quarto: H1 headers
      • Shiny Express: ui.nav_panel
      • Shiny Core: ui.page_navbar
    • Tabs
      • Quarto: {.navset}
      • Shiny: ui.navset_card_tabs
    • Sidebars
    • Toolbars
      • Quarto: {.toolbar}
      • Shiny: TBD
  • Data display
    • Plots: switch to @render.plot if not already
    • Tables: switch to @render.data_frame or @render_widget if not already
    • Value boxes: ui.value_box
    • Dynamic content: f-strings or, if reactive, @render.express
  • Text/paragraph formatting
    • Use ui.markdown() for continuous blocks of Markdown
    • For finer grained control, need to use HTML tags: ui.tags.strong(...), etc.
  • Theming
    • TBD (brand.yml)
  • Static assets
    • Quarto: foo_files/ subdir
    • Shiny: put files in ./www/ directory--but don't include "www" in the URL path, e.g. www/logo.png would be <img src="logo.png">

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.