-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
active
PropTypes on MobileLayout
#6241
Conversation
Not sure if that is the right approach, but `active` on Panels is being fetched from Mobile, and Mobile treats `active` as bool (L-132), hence I assume the `active` PropTypes is missing the support of boolean. This should solve the following warning message : ``` vendors~main.fe9333fdaa91c3bc407a.bundle.js:8776 Warning: Failed prop type: Invalid prop `active` of type `boolean` supplied to `<<anonymous>>`, expected `number`. in Unknown (created by MobileLayout) in MobileLayout (created by ResizeDetector) in ResizeDetector in Unknown in Unknown (created by Manager) in ThemeProvider (created by Manager) in Manager (created by Context.Consumer) in Location (created by QueryLocation) in QueryLocation (created by Root) in LocationProvider (created by Root) in HelmetProvider (created by Root) in Root ```
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.
Thank you @ShimiSun! @ndelangen mind taking a look at this?
Hmm, I think we need to fix initial state in Mobile component. On component start |
I think the problem isn't that the PropTypes are incorrect, I think we're passing the wrong value to the component. |
Use this GitHub Tip for better linking between issue and PR :) |
Codecov Report
@@ Coverage Diff @@
## next #6241 +/- ##
=========================================
- Coverage 41.01% 38.12% -2.9%
=========================================
Files 613 645 +32
Lines 8460 9647 +1187
Branches 377 355 -22
=========================================
+ Hits 3470 3678 +208
- Misses 4937 5914 +977
- Partials 53 55 +2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## next #6241 +/- ##
==========================================
- Coverage 40.44% 38.12% -2.33%
==========================================
Files 637 645 +8
Lines 8759 9647 +888
Branches 639 355 -284
==========================================
+ Hits 3543 3678 +135
- Misses 5118 5914 +796
+ Partials 98 55 -43
Continue to review full report at Codecov.
|
@Armanio done, let me know if that works. |
I'll fix the tests and merge |
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-shimisun-patch-3.storybook.now.sh |
Issue: #5910
Not sure if this is the right approach, but
active
on Panels is being fetched from Mobile, and Mobile treatsactive
as bool (L-132), hence I assume theactive
PropTypes is missing the support of boolean.This should solve the following warning message :
Issue:
What I did
How to test
If your answer is yes to any of these, please make sure to include it in your PR.