Open SwethaJanardhana opened 6 months ago
Great user story, Team! Well structured and everything clearly formulated π
Just some tiny questions/suggestions:
The wireframes of the Layout user story before showed a "home" icon and a "plus" icon in the footer. This should be updated also here, or?
you could add a subsentence in your first acceptance criteria: "A navigation link labeled "Family" is displayed in the navigation bar at the bottom (...)", but even if you will not adapt it, is this fine for me. But I am wondering, if you will also use an icon here for consistency, since you implement a "home" icon and a "plus" icon instead of a text link...
When you saved no family member yet, is there just nothing or an example user or a text, which says there is no family member added yet, displayed? Something like that would be great for a good user experience, or what do you think?
Great improvement πππ
Add family member
Value Proposition
As a family member,
I want to add new members to our family
so that everyone can be involved in the family task management system.
Description
Acceptance Criteria
name
with label "Name",role
with label "Role" and a dropdown for selection (e.g., Parent, Child, Caregiver).name
field is required, with a character limit between 1 and 50.role
field must have a default option, "Please select a role," and require a selection to ensure each member has a defined role within thefamily.
Tasks
feature/add-family-members
pages/family/index.js
and render the headlineh1
"My Family" in itLink
component to/family
to theLayout
component_app.js
create afamilyMembers
state for the list of family members with initial value[ ]
and passfamilyMembers
to the pagesFamilyMembersList
component with propfamilyMembers
to render the name and the role of every family member from the list withmap
FamilyMembersList
component in thepages/family/index.js
pagebutton
under theFamilyMembersList
component in thepages/family/index.js
pageMemberForm
component with required elements:input
forname
andselect
forrole
, and an "Add"button
input
field forname
onChange attribute to show the number of characters left (max 50 characters) and implement logic to handle thisselect
element forrole
a default option "Please select a role" and 3 other options to choose: Parent, Child, CaregiverModal
componentpages/family/index.js
page render theModal
component with theMemberForm
component insidehandleAddMember
in _app.js to update the state with a newly added family member and pass it to theMemberForm
componentMemberForm
component using handleAddMember` functionhandleSubmit
function validate the emptyname
field and not selectedrole
field option and display appropriate error messagehandleSubmit
function validate theinput
name
for unique entries and display appropriate error message