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

Implemented sample description drawer #19

Merged
merged 23 commits into from
May 24, 2024
Merged

Implemented sample description drawer #19

merged 23 commits into from
May 24, 2024

Conversation

rmanaem
Copy link
Collaborator

@rmanaem rmanaem commented May 22, 2024

Closes #13

Changes proposed in this pull request:

  • Implemented create_sample_description_drawer function to render a drawer element in the UI
  • Implemented create_drawer_state function for creating and updating state/cluster in the drawer
  • Implemented create_drawer_sample_size function for creating and updating sample size in the drawer
  • Implemented callback functions to
    • toggle drawer visibility
    • update state
    • update sample size

dashboard-drawer1

@rmanaem rmanaem requested a review from alyssadai May 22, 2024 18:37
@alyssadai alyssadai removed their request for review May 22, 2024 19:24
@rmanaem rmanaem requested a review from alyssadai May 23, 2024 19:38
Copy link
Collaborator

@alyssadai alyssadai left a 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!

"""Callback function for updating the state in the drawer."""
if value is None:
return "National"
else:
Copy link
Collaborator

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!

df = SURVEY_DATA["samplesizes_state.tsv"]
if value is None:
return f"Sample size: {NATIONAL_SAMPLE_SIZE}"
else:
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above :)

@alyssadai alyssadai merged commit f0784d4 into main May 24, 2024
1 check passed
@alyssadai alyssadai deleted the rman/drawer branch May 24, 2024 01:56
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.

Add drawer/navbar component to hold sample description plots
3 participants