-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implemented sample description drawer #19
Conversation
…nce/us_climate_emotions_map into adai/setup-app-nav
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rmanaem for the PR, this looks and works great 🎉
For the sake of merging this quickly, I pushed a 🍒 change to remove an unneeded else
statement (and de-indent your return
statement inside) in the two callbacks I highlighted below. Hope you don't mind!
🧑🍳 , will merge this directly!
climate_emotions_map/app.py
Outdated
"""Callback function for updating the state in the drawer.""" | ||
if value is None: | ||
return "National" | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the else
here, since the previous if
returns you out of the function!
climate_emotions_map/app.py
Outdated
df = SURVEY_DATA["samplesizes_state.tsv"] | ||
if value is None: | ||
return f"Sample size: {NATIONAL_SAMPLE_SIZE}" | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above :)
Closes #13
Changes proposed in this pull request:
create_sample_description_drawer
function to render a drawer element in the UIcreate_drawer_state
function for creating and updating state/cluster in the drawercreate_drawer_sample_size
function for creating and updating sample size in the drawer