-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
style: remove react bootstrap fade component #11843
style: remove react bootstrap fade component #11843
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11843 +/- ##
==========================================
- Coverage 67.54% 63.40% -4.15%
==========================================
Files 916 459 -457
Lines 44545 28173 -16372
Branches 4227 0 -4227
==========================================
- Hits 30090 17864 -12226
+ Misses 14352 10309 -4043
+ Partials 103 0 -103
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
const Fade = styled.div<FadeProps>` | ||
transition: all ${({ theme }) => theme.transitionTiming}s; | ||
opacity: ${props => (props.hovered ? 1 : 0)}; | ||
`; |
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... but would there be a downside to a simpler approach of just making it:
transition: opacity ${({ theme }) => theme.transitionTiming}s;
opacity: 0;
&:hover {
opacity: 1
}
then, I think you could go through and remove all the code regarding the hovered
state and prop.
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.
With this approach component would only fade in/out if we hover over the header which is not the previous behaviour we had. The previous behaviour would trigger fade in/out when we hover over TableElement component (header and body).
@nikolagigic thanks for the PR! if it's ok with you, going forward, can we attach screenshot or gif on the PRs, instead of links to video? thanks! 🙏 |
I think there are a thousand options, but I've had good luck with Giphy Capture. |
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.
LGTM!
There's a bit of an ongoing discussion as to where new components like this should go. This seems like a reasonable place for now, but at some point I want to make things a little more consistent, with components each having a folder with their own test file(s), a Storybook file, and the component itself. That can be a task for another day... this one is obviously pretty light/utilitarian. I appreciate the test!
SUMMARY
Replacing Bootstrap component with custom Emotion/CSS component with same behaviour in effort to move away from Bootstrap.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://www.loom.com/share/e1ba9e7671c34581858043bfca669ea1
After:
https://www.loom.com/share/7228d0769f3247bba5aedec407d7f3bc
TEST PLAN
ADDITIONAL INFORMATION