Skip to content

Add dev_mode param to App() #1297

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

Closed
wants to merge 2 commits into from
Closed

Add dev_mode param to App() #1297

wants to merge 2 commits into from

Conversation

wch
Copy link
Collaborator

@wch wch commented Apr 9, 2024

This PR does a few things:

  • It adds a new parameter so you can call App(dev_mode=True).
  • When the App object is created, if dev_mode is None (the default), then it looks at the env var SHINY_DEV_MODE. The setting for dev_mode is stored in the App object.
  • Before the change in this PR, it only used that env var to determine whether to dev mode, and it looked at the env var each time that shiny_deps() was called. This is potentially problematic when running multiple concurrent apps, as with shinylive apps embedded in a web page. With the change, the App object stores the value of dev_mode, so the setting for one App will not affect any others.

The reason for this PR is for Shinylive -- I want to enable the dev mode error console when there's are both editor and viewer components, but not when there's just the viewer component.

@wch wch requested a review from schloerke April 9, 2024 16:58
@schloerke schloerke added this to the v0.9.1 milestone May 8, 2024
@schloerke schloerke modified the milestones: v0.10.0, v0.11.0 May 21, 2024
@wch
Copy link
Collaborator Author

wch commented Jun 3, 2024

Closing because this was fixed a different way in posit-dev/shinylive@5290904

@wch wch closed this Jun 3, 2024
@schloerke schloerke deleted the devmode branch June 3, 2024 15:14
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.

2 participants