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

Add dev_mode param to App() #1297

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

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
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.

None yet

2 participants