-
Notifications
You must be signed in to change notification settings - Fork 2
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
add SignupPopover to learning resource drawer bookmark button #1565
Conversation
… learning resource drawer user list button
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.
works well. left some minor nitpicks. it would be good to resolve the redundant code issue if possible but not a blocker
@@ -124,6 +134,7 @@ const ResourceListCard: React.FC<ResourceListCardProps> = ({ | |||
condensed, | |||
...props | |||
}) => { | |||
const loc = useLocation() |
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.
It seems like there is a lot of redundancy between ResourceCard and ResourceListCard that could potentially be abstracted/consolidated.
@@ -86,6 +87,10 @@ const Certificate = styled.div` | |||
height: 16px; | |||
} | |||
` | |||
// The SignupPopover needs to display over the top of the resource drawer | |||
const StyledSignupPopover = styled(SignupPopover)({ | |||
zIndex: 9999, |
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.
it would be good to avoid the hardcoded zIndex if at all possible (realizing this might be the only workaround for now)
…me to the default mui value for the drawer, then take that value plus one for popover
@shanbady Thanks for the review. I've addressed your two concerns above. |
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/5505
Description (What does it do?)
This PR adds some functionality that was missed in #1537. If you are logged out, the bookmark button should still show in the learning resource drawer. When clicking this button, the same "signup popover" that shows when you click the bookmark button on the card show show.
Screenshots (if appropriate):
How can this be tested?
mit-learn