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

feat: Restructure and expand export_template files #144

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

gadenbuie
Copy link
Contributor

@gadenbuie gadenbuie commented Jun 27, 2024

This PR consolidates the JavaScript for launching an exported shiny app into runExportedApp() to avoid duplicating logic between the index.html template file and edit/index.html:

  • Adds {{title}} as a template parameter.
  • Consolidate app-launching code in runExportedApp().
  • Pick up app mode from the mode query parameter.
  • edit/index.html now redirects to index.html?mode=editor-terminal-viewer.
  • Adds template parameters for additional content:
    • {{{include_in_head}}} for content just before </head>
    • {{{include_before_body}}} for content just after <body>
    • {{{include_after_body}}} for content just before </body>

These changes are intended to help with

Ready for review in conjunction with the following PRs. I've tested this PR in both Python and R exports, but let me know if I can provide guidance for testing locally.

…late file

* Adds `{{title}}` as a template parameter.
* Consolidate app-launching code in `runExportedApp()`.
* Pick up app mode from the `mode` query parameter.
* `edit/index.html` now redirects to `index.html?mode="editor-terminal-viewer"`.
export_template/index.html Outdated Show resolved Hide resolved
src/Components/App.tsx Outdated Show resolved Hide resolved
src/Components/App.tsx Outdated Show resolved Hide resolved
src/Components/App.tsx Outdated Show resolved Hide resolved
@gadenbuie gadenbuie merged commit 5f29f1a into main Jul 1, 2024
2 checks passed
@gadenbuie gadenbuie deleted the feat/export-template branch July 1, 2024 13:05
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

Successfully merging this pull request may close these issues.

3 participants