Create a swappable UI component #160
No reviewers
Labels
No Label
hex-grid
maintenance
music-player
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: savanni/monorepo#160
Loading…
Reference in New Issue
No description provided.
Delete Branch "fitnesstrax/swappable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Singleton is a UI component that allows for only a single child. Not complicated in itself, but it helps simplify other components that need to have only a single child but will visually toggle between two different states.
This had some follow-on complications and refactorings of the DayDetail, DayEdit, and DayDetailView. Those, themselves, became a lot more complicated. It was feeling really awkward both in code and in UI, to have only one field be editable at the same time. It was also getting to be difficult to click no a field to make it editable and then click away to commit it. Instead, I also added an ActionGroup bar which appears at the top of the day detail and the day edit, and which prompts the user to edit or save items. We did it in 1Password with professional designers, so I can copy that here.
There's a lot of code getting intermixed in the UI callbacks, and I'll have to solve those. Plus, there's a lot of code necessary to just handle rendering and saving a weight. I'm going to solve all of that in the next PR.