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

Make nap user toggleable #513

Closed
14 tasks done
Tracked by #515
cdubz opened this issue Aug 4, 2022 · 2 comments · Fixed by #641
Closed
14 tasks done
Tracked by #515

Make nap user toggleable #513

cdubz opened this issue Aug 4, 2022 · 2 comments · Fixed by #641
Assignees
Labels
enhancement Feature requests or improvements to existing functionality task Specific non-feature things to do that don't require debugging

Comments

@cdubz
Copy link
Member

cdubz commented Aug 4, 2022

Steps reworked from #504

  • Remove the calculated core.models.Sleep.nap property entirely.
  • Create migration to add a true nap field to the Sleep model.
    • Update existing data based on NAP_START_MIN and NAP_START_MAX.
    • Remove napping field.
  • Remove core.models.NapsManager.
  • Update core/templates/core/sleep_list.html to use new nap property.
  • Create new application level setting (feature TBD) for default nap start min/max.
    • Set initial values to NAP_START_MIN and NAP_START_MAX environment variables.
    • Find and refactor any usages of the NAP_START_MIN and NAP_START_MAX environment variables to use new application level setting.
  • Add a new method to core.forms.SleepForm to evaluate nap start min/max setting and pre-select (or not) the nap checkbox in the form.
  • Update documentation
  • Update existing tests
  • Add tests
  • Re-evaluate whether Sleep.nap can be non-nullable without a default.

This issue supersedes #504, #503, and #323 for tracking this issue.

@cdubz cdubz added task Specific non-feature things to do that don't require debugging enhancement Feature requests or improvements to existing functionality labels Aug 4, 2022
@cdubz cdubz self-assigned this Aug 4, 2022
@tango2590
Copy link

Has any progress been made with this? If there is no way to control to why some entries are considered "naps" and others aren't, it should just be removed from the UI until a working toggle or separate nap tracking is implemented to clean up the UI.

@cdubz
Copy link
Member Author

cdubz commented Dec 11, 2022

No progress on this one yet. The current state is as it has been for Baby Buddy's entire 5+ year existence so I'm in no rush to change it.

There is some limited control of thisusing the NAP_START_MAX and NAP_START_MIN settings. You may actually be able to "disable" it by setting both those values tom 00:00 or something 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements to existing functionality task Specific non-feature things to do that don't require debugging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants