-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
modify feedback widget behaviour #8312
modify feedback widget behaviour #8312
Conversation
✅ ethereum-org-website-dev deploy preview ready
|
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.
Thanks for the PR @marcellamalune. I think the basic animation is working but there are some problems when the expanding animation starts. Take a look at this to see it clearly:
https://user-images.githubusercontent.com/468158/198043249-d6e3e1f4-5c69-4c76-bb2f-c46ed4ea9608.mp4
This is looking nice so far @marcellamalune. Wanted to check with @konopkja what he thinks about it? should the animation be faster? or is it ok as it is? |
looks nice! agree, the animation could be twice as fast. other than that it looks good. |
Thank you for your feedback @pettinarip @konopkja! I speeded up the animation. |
ok this is better. @pettinarip im good with this. |
e9d2d85
to
7092831
Compare
Thanks for fixing @marcellamalune. Will get to review this week, but I did add the |
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 overall result looks great right now @marcellamalune. My only concern is more about the implementation using ids, wondering if we could adjust a bit that.
src/components/FeedbackWidget.tsx
Outdated
#feedback-wrapper { | ||
width: ${({ isExpanded }) => (isExpanded ? "13.5rem" : "3rem")}; | ||
position: ${({ isExpanded }) => (isExpanded ? "absolute" : "flex")}; | ||
} | ||
#expanded-prompt { | ||
display: ${({ isExpanded }) => (isExpanded ? "flex" : "none")}; |
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 don't love the idea of using ids to achieve this. Why can't we implement this logic using style props?
Can't we do this like
<Text ... width={{ base: "3rem", lg: isExpanded ? "13.5rem" : "3rem" }}>
<Box
as={Translation}
id="feedback-card-prompt-page"
display={{ base: "flex", lg: isExpanded ? "flex" : "none" }}
/>
</Text>
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.
@pettinarip thanks for the feedback and for the improvements you've made 🙂
@pettinarip @marcellamalune can we push this forward? |
I think this is done. I'll do some small tweaks and get it merged. |
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.
Thanks @marcellamalune and @pettinarip!
Description
isExpanded
state to FeedbackWidget componentisExpanded
state to true and clear timeout on unmountisExpanded
to false whenisOpen
is reset tooText
component from ChakraUIRelated Issue
#8298