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

Future state of Shiny Extends #48

Open
gshotwell opened this issue Dec 11, 2023 · 0 comments
Open

Future state of Shiny Extends #48

gshotwell opened this issue Dec 11, 2023 · 0 comments

Comments

@gshotwell
Copy link
Collaborator

I went through our JS template process and ran into some documentation/template issues. I think these are bigger jobs which shouldn't block #46, so thought I'd break them out here:

Documentation

There are explanations and how-tos that we need to include here. IMO they are:

Explanation

  • An overview of how Shiny works:
    • Adding HTML dependenceis
    • A high level picture of how data flows from the UI to the server and back again
  • Inputs
    • What is an input binding and how does it work?
  • Outputs
    • Rendering decorators
    • Output bindings
  • JS best practices
    • Web components and why we use them
    • TypeScript and why we use it

How to

I think this should be broken down into a few cases:

  1. Including JavaScript in your app
  2. Building a package with a JS input
  3. Building a package with a JS output
  4. Building a React based package with both inputs and outputs
  5. (Later, building a Vue extension, or a Svelte extension)

Appendix

  • What do the files in the template mean and do?

Template changes

I found it difficult to build a React output based on our current template because the output boilerplate wasn't included. I think we should include both inputs and outputs for each template because it's much easier to delete the boilerplate code than to find and add it. This would also reduce the number of templates we need because we wouldn't need an input/output one. The template structure for each JS framework would be something like:

example-apps
      - input-app.py
      - output-app.py
my-component
      - my-component-input.py
      - my-component-output.py
 scrts
      - index.tsx (include both input and output Javascript)

Out templates would then match the framework and include both Input and Output bindings:

  • JS template
  • React template
  • Vue template
  • Svelte template
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

1 participant