-
Notifications
You must be signed in to change notification settings - Fork 78
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
LF-4371 Feedback - Add feedback drawer and icon #3532
Conversation
…ggering type error
…); apply hover state + animation + mobile width
…r Jira ticket instructions); remove mobile styling from SideDrawer
…e mobile slide-up animation The offending line was even mentioned in the PR discussion thread, but I didn't realize at the time the return null ruins the ability to animate between the open and closed states! (Luckily bug never made it to App)
Also minor fixes: remove classname with no reference in JSX and remove propTypes which were triggering type error
@@ -233,7 +233,7 @@ const PureSideMenu = ({ | |||
isOpen={isDrawerOpen} | |||
onClose={onDrawerClose} | |||
fullHeight | |||
responsiveModal={false} | |||
desktopVariant={DesktopDrawerVariants.DRAWER} |
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.
@antsgar I don't know if you remember back well enough to when the responsiveModal
property was defined, but it doesn't seem necessary in this context because the Drawer is never a modal in mobile view anyway! Maybe Drawer or SideMenu also got a refactor since originally written?
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.
Yeah since this only renders in mobile view I don't think the prop makes sense, I'm not sure why I passed it along initially or if something got refactored along the way
} | ||
|
||
return isDesktop && responsiveModal ? ( | ||
return isDesktop && desktopVariant === DesktopDrawerVariants.MODAL && isOpen ? ( |
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 actually destroyed the mobile drawer slide-up animation with this change, which we did discuss a little in this PR comment thread but I landed on thinking it was innocuous. At the time I totally missed that applying conditional rendering to the Drawer = no animation! Luckily it never went to App, but you can see the slide up animation broken on beta/integration currently.
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.
Oooh great catch!!
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 to me! Nice stories ❤️
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 awesome!
I found a few visual differences with the designs, for example:
- The padding between the form and the drawer borders should be narrower (the drawer itself already has padding so those 16px are summed to the 24px of the container here, but it should be 24px total).
- The "Request help" title is not present in the design.
- There's wider spacing between some form fields, like the radio buttons and the email field.
- The buttons should be anchored to the bottom of the drawer if possible per the designs.
Not sure if I'm looking at the right design though! But other than these it looks great.
} | ||
|
||
return isDesktop && responsiveModal ? ( | ||
return isDesktop && desktopVariant === DesktopDrawerVariants.MODAL && isOpen ? ( |
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.
Oooh great catch!!
@@ -233,7 +233,7 @@ const PureSideMenu = ({ | |||
isOpen={isDrawerOpen} | |||
onClose={onDrawerClose} | |||
fullHeight | |||
responsiveModal={false} | |||
desktopVariant={DesktopDrawerVariants.DRAWER} |
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.
Yeah since this only renders in mobile view I don't think the prop makes sense, I'm not sure why I passed it along initially or if something got refactored along the way
@antsgar the styling of the form had its own ticket in Jira and the PR for that is open here: (It's only in draft because it's branched off of / depending on this one, but actually I'll undraft it because the code is done). Could you check the points you mentioned against that PR branch? |
@kathyavini ahhh that makes sense, thanks! I'll approve this one and review the other one |
@kathyavini Any reason you can think of why the Happy path tests might be failing haha? |
@Duncan-Brain I see that same failure locally 🤔 Could it be that cypress is still reading the elements of the off-viewport form (closed state of sideDrawer is off viewport to the right)? The selector that is failing is suuuuuuper general. Too general I would say 😂 Since it's just the one written like this, I'll probably make it more selective in the test. cy.get(Selectors.REACT_SELECT)
.find('input') |
@kathyavini That makes sense to me if it is being added to both forms yah! ps I am impressed you can run happy path locally -- I don't want to even try haha |
Description
Thank you @kevin-wu01 for doing the bulk of this ticket, including the integration into App! 🙏
This ticket covers the side drawer component and the menu icon that calls it up. I did throw the existing feedback form (with no alternations) into the Drawer, but there is a separate ticket for the feedback form refactor, including removing the old route and adjusting the form content, that I will open separately.
Notes:
SideDrawer
to be its own component that is used in Desktop view, and the existingDrawer
to be used in mobile view; however in the end I made SideDrawer a variant of Drawer toJira link: https://lite-farm.atlassian.net/browse/LF-4371
Type of change
How Has This Been Tested?
Checklist: