Create a validated text entry widget and a structure for tracking view vs. edit state #155

Merged
savanni merged 4 commits from fitnesstrax/validated-text-entry into main 2024-01-02 05:11:58 +00:00
Owner

The validated text entry widget is a pretty common thing. Given a validation function and a renderer function, this widget will validate the data on the fly and give the user immediate feedback. It will parse the data and store it if valid, so that anything outside of the widget has no need to handle parsing potentially invalid data.

EditView just helps keep track of components involved in edit and view state, slightly reducing the complexity of widgets that have to handle both of these states.

Resolves #137
Resolves #136

The validated text entry widget is a pretty common thing. Given a validation function and a renderer function, this widget will validate the data on the fly and give the user immediate feedback. It will parse the data and store it if valid, so that anything outside of the widget has no need to handle parsing potentially invalid data. EditView just helps keep track of components involved in edit and view state, slightly reducing the complexity of widgets that have to handle both of these states. Resolves #137 Resolves #136
savanni added 4 commits 2024-01-02 05:11:09 +00:00
a25b76d230 Create a validated text entry widget
I move the weight edit view into the validated text entry widget, and I
work on some of the unfortunate logic in the weight blur function. I've
left behind a lot of breadcrumbs for things that still need to be done.
b7b9b1b29f Create an EditView "component"
This is a super tiny data structure that covers an edit mode, a view
mode, and an unconfigured mode. It's mostly a container so that views
don't have to preserve everything directly.
savanni merged commit 0007522b26 into main 2024-01-02 05:11:58 +00:00
savanni deleted branch fitnesstrax/validated-text-entry 2024-01-02 05:11:58 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: savanni/monorepo#155
No description provided.