-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sb es modal test #44
Sb es modal test #44
Conversation
@@ -0,0 +1,235 @@ | |||
/** Modal Styling **/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably include a comment linking to the source of this CSS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, true. I just forgot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great going with a different approach than the first PR π
It'd be nice if we can still connect to router for the modal. I pushed a branch modal-to-router
that does just this. Give it a peek if you get stuck syncing the two.
src/components/ListItem.js
Outdated
</button> | ||
<button onClick={handleShow}>View Details</button> | ||
</li> | ||
<TestModal item={item} show={show} handleClose={handleClose} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Nice way to show the item details. Another option using a different library might be Drawer from Material UI
let lastPurchase = item ? new Date(item.last_purchased).toDateString() : ''; | ||
|
||
return ( | ||
<> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need the Fragment if you have a wrapping component like Modal
.
return ( | ||
<> | ||
<Modal show={show} onHide={handleClose}> | ||
<Modal.Header> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice use of Modal
's compound components π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π₯
<button | ||
className={isPurchased ? 'purchased' : 'not-purchased'} | ||
onClick={onHandle} | ||
disabled={isPurchased ? !null : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not from this PR, but this expression can be simply disabled={!isPurchased}
.
disabled={isPurchased ? !null : null} | |
disabled={!isPurchased} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well. It's up to you which you choose. I like either version!
<Shopping userToken={userToken} list={data} /> | ||
)} | ||
/> | ||
<Route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /add
route needs to go first @espain16 @skillitzimberg. Switch will match the first path that it matches.
Type of Changes
Related Issue
closes #15
Description
From the shopping list, the user can tap to navigate to a detailed view of the item.
The detail view includes the following information:
When in the βitem detailsβ view, a back arrow is displayed in the header to take the user back to the βlistβ view.
List To Complete Task
Updates
Before
Previous Shopping List
After
Update To Shopping List UI
Item Detail View
Acceptance Criteria
Testing Steps / QA Criteria
Click Here for the preview of our branch.