Giter Site home page Giter Site logo

b-kennedy0 / shinyuieditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rstudio/shinyuieditor

0.0 0.0 0.0 254.46 MB

A GUI for laying out a Shiny application that generates clean and human-readable UI code

Home Page: https://rstudio.github.io/shinyuieditor/

License: Other

JavaScript 86.63% Python 0.01% R 0.82% TypeScript 11.15% CSS 0.75% HTML 0.04% SCSS 0.12% Astro 0.25% MDX 0.23%

shinyuieditor's Introduction

Shiny UI Editor

R Package checks Javascript Tests

A visual tool for building the UI portion of a Shiny application that generates clean and human-readable code.

The goal of the Shiny Ui Editor is to allow people to build the broad-level UI for their Shiny app without writing code. The editor is intended for those who may not be comfortable with the HTML-style code of Shiny's UI functions or who simply don't want to fiddle with sizes to get things laid out correctly.

Installing

While in development the package is only available on github:

install.packages("remotes")

# Install using the remotes package
remotes::install_github("rstudio/shinyuieditor")

๐Ÿšจ Installation fail? See the Trouble installing section.

Running

There are two main ways to run the UI editor. Using the R packages included launch_editor() function, or using the VSCode extension.

launch_editor()

In any R console, simply run launch_editor(app_loc = "loc/of/app") and point it to the root of your Shiny app. This will open up a browser window with the UI editor for you.

VSCode extension

In VSCode, install the ShinyUiEditor extension from the marketplace. Once this extension is installed, anytime you open a file with the title ending in app.R you will see a small icon for running the ui editor in the top right.

Button to run ShinyUiEditor on app file

Click that icon to start the ui editor.

Alternatively, if you wish to start a new app with the ui editor you can open the command palette and run the command shinyuieditor.launchEditor (or "Launch ShinyUiEditor") to choose an app location for editing an existing app or creating a new one from a template.

Launch editor command

Feedback

Found a bug or want to suggest a feature? Use the github issues page: github repo's issues..

More general comments can be sent via email ([email protected]) or for more public discourse, twitter.

The things most useful for feedback at this stage are:

  • Are there interaction patterns you kept wanting to do that were either unavailable or not intuitive? E.g., Wanting to delete an element with the delete key or by throwing the element off the screen.
  • Did the app crash? If so
    • Was the crash reflected in errors in the R console?
    • if not, were there errors in the browser's javascript console? (Keyboard shortcut Ctrl-Shift-J on Windows, or Cmd-Option-J on Mac.)
  • Do you have any ideas about how you could see yourself or others using the editor that are not currently supported?

Getting help

If the UI is confusing, there's a tour mode that walks you through the various components of the Ui Editor. Simple click the button titled "Tour App" to enter the tour mode. Also check out the FAQs section (vignette('faqs')) and the "How To" article (vignette('how-to')).

Trouble installing

Because the package uses a remote dependency (gridlayout) installation can sometimes fail in confusing ways.

HTTP error 404, Not Found

> remotes::install_github('rstudio/shinyuieditor')
Error: Failed to install 'shinyuieditor' from GitHub:
  HTTP error 404.
  Not Found

  Did you spell the repo owner (`rstudio`) and repo name (`shinyuieditor`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.

You may need to setup your github PAT to access. To set this up run usethis::create_github_token() in the terminal and follow the prompts.

Using remotes?

usethis::create_github_token() no longer puts your PAT in an environment variable, however that's the method remotes uses for authentication. You can get around this by using the withr package to temporarily set the environment variable.

withr::with_envvar(
  list( GITHUB_PAT = gitcreds::gitcreds_get()$password ),
  remotes::install_github('rstudio/shinyuieditor')
)

Subscript out of bounds

> pak::pkg_install('rstudio/shinyuieditor')
Error: subscript out of bounds
Type .Last.error.trace to see where the error occurred

This occurs for some reason when trying to reinstall or update the package using pak. The easiest solution is to either use remotes (see above), or to uninstall both shinyuieditor and gridlayout and then reinstall.

remove.packages(c('shinyuieditor', 'gridlayout'))
# now works
pak::pkg_install("rstudio/shinyuieditor")

Overarching principle

We're trying hard to constrain the feature set so we have fewer but higher-quality features. Lots of the no-code UI builders expose so many options that, ultimately, they're more complex to use than just writing the code by hand. By generating code for the user, we're letting them flesh out those details by hand on top of a solid foundation instead of forcing them to do it in a (probably sub-optimal) visual paradigm.

Complexity is anything related to the structure of a system that makes it hard to understand and modify that system

- A Philosophy of Software Design, John Ousterhout

shinyuieditor's People

Contributors

aariq avatar dependabot[bot] avatar edavidaja avatar mdancho84 avatar nstrayer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.