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

Flag for props check #687

Merged
merged 13 commits into from
Apr 15, 2019
Merged

Flag for props check #687

merged 13 commits into from
Apr 15, 2019

Conversation

byronz
Copy link
Contributor

@byronz byronz commented Apr 13, 2019

  • add test case once confirmed with design


env_value = env.get('DASH_{}'.format(config_name.upper()))
if env_value is None:
def get_combined_config(name, val, default=None):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified the get_config by removing unnecessary parameters passing of env, and removed is_bool

@@ -340,6 +336,7 @@ def _config(self):
'url_base_pathname': self.url_base_pathname,
'requests_pathname_prefix': self.config.requests_pathname_prefix,
'dev_tools_ui': self._dev_tools.dev_tools_ui,
'dev_tools_props_check': self._dev_tools.dev_tools_props_check,
Copy link
Contributor Author

@byronz byronz Apr 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this, the props-check will only happen when bool(dev_tools_ui && dev_tools_props_check) == True

@byronz
Copy link
Contributor Author

byronz commented Apr 15, 2019

app.run_server(debug=True, dev_tools_ui=False, dev_tools_props_check=True)
image
app.run_server(port=8070, debug=True, dev_tools_props_check=False)
image

@byronz byronz requested a review from chriddyp April 15, 2019 03:48
@byronz
Copy link
Contributor Author

byronz commented Apr 15, 2019

@chriddyp I saw your branch about the dev_tools_ui, adding one commit here together with props_check. note that I changed the get_config as I found the API design made the code hard to read and awkward. the current change is still not optimal but one step cleaner.

dash/dash.py Outdated Show resolved Hide resolved
dash/dash.py Outdated Show resolved Hide resolved
dash/dash.py Outdated Show resolved Hide resolved
@byronz byronz changed the title WIP - Flag for props check Flag for props check Apr 15, 2019
os.environ[var] = 'false'
vars = load_dash_env_vars()
self.assertEqual(vars[var], 'false')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea to include this run-time check 👍

Copy link
Member

@chriddyp chriddyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

chriddyp added a commit to plotly/dash-renderer that referenced this pull request Apr 15, 2019
@byronz byronz merged commit 5d3d945 into master Apr 15, 2019
@byronz byronz deleted the flag-for-props-check branch April 15, 2019 16:50
chriddyp added a commit to plotly/dash-renderer that referenced this pull request Apr 15, 2019
HammadTheOne pushed a commit to HammadTheOne/dash that referenced this pull request May 28, 2021
…y#687)

* Use start_date or min_date_allowed for initial_visible_month if initial_visible_month is undefined.

* Add test for initial month.

* Add datePickerRange tests.

* Use max date allowed

* Make function call simpler.

* Run linter.

* Fix typo.
HammadTheOne pushed a commit that referenced this pull request Jul 23, 2021
* Use start_date or min_date_allowed for initial_visible_month if initial_visible_month is undefined.

* Add test for initial month.

* Add datePickerRange tests.

* Use max date allowed

* Make function call simpler.

* Run linter.

* Fix typo.
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