Fix React warning in devtools/client/responsive/components/Browser.js `allowFullScreen: "true"`
Categories
(DevTools :: Responsive Design Mode, task, P3)
Tracking
(firefox76 fixed)
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: jdescottes, Assigned: marylicious, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
What were you doing?
- Build Firefox with the build option
ac_add_options --enable-debug-js-modules
- Run Firefox
- Open RDM
What happened?
The following warning is logged in the command line output:
console.error: "Warning: Received the string `%s` for the boolean attribute `%s`. %s
Did you mean %s={%s}?%s" "true" "allowFullScreen"
"Although this works, it will not work as expected if you pass the string \"false\"."
"allowFullScreen" "true"
in iframe (created by Browser)
in Browser (created by ResizableViewport)
in div (created by ResizableViewport)
in div (created by ResizableViewport)
in div (created by ResizableViewport)
in ResizableViewport (created by Viewports)
in div (created by Viewports)
in div (created by Viewports)
in Viewports (created by Connect(Viewports))
in Connect(Viewports) (created by App)
in div (created by App)
in App (created by Connect(App))
in Connect(App)
in Provider"
What should have happened?
No error should be logged.
Anything else we should know?
Not sure why the error message is so unreadable, but the fix should be easy:
https://searchfox.org/mozilla-central/rev/557a0e222dd104c5d805ba344c45d6abc27d3db0/devtools/client/responsive/components/Browser.js#163
allowFullScreen: "true",
should be changed to
allowFullScreen: true,
This should be a good-first-bug for someone who wants to setup their development environment.
Out contributors documentation is at https://docs.firefox-dev.tools/
Assignee | ||
Comment 1•5 years ago
|
||
I want to work on this !
Reporter | ||
Comment 2•5 years ago
|
||
Hi marylicious!
Thanks for offering to help with this, I'm assigning the bug to you.
Take a look at https://docs.firefox-dev.tools/ to get started, and don't hesitate to ask for help here or on slack/riot if needed.
Assignee | ||
Comment 3•5 years ago
|
||
I'm following the steps to reproduce but the console doesn't log this error. Just these ones:
console.error: "Warning: Failed prop type: Toolbar: prop type `devices.phones[0].os` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.\n in Toolbar (created by Connect(Toolbar))\n in Connect(Toolbar) (created by App)\n in div (created by App)\n in App (created by Connect(App))\n in Connect(App)\n in Provider"
console.error: "Warning: Failed prop type: DeviceSelector: prop type `devices.phones[0].os` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.\n in DeviceSelector (created by Toolbar)\n in Toolbar (created by Connect(Toolbar))\n in Connect(Toolbar) (created by App)\n in div (created by App)\n in App (created by Connect(App))\n in Connect(App)\n in Provider"
console.error: "Warning: Failed prop type: DevicePixelRatioMenu: prop type `devices.phones[0].os` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.\n in DevicePixelRatioMenu (created by Toolbar)\n in Toolbar (created by Connect(Toolbar))\n in Connect(Toolbar) (created by App)\n in div (created by App)\n in App (created by Connect(App))\n in Connect(App)\n in Provider"
[Child 9812, Main Thread] WARNING: NS_ENSURE_TRUE(mPresShell) failed: file /builds/worker/checkouts/gecko/layout/base/nsPresContext.cpp, line 839
Reporter | ||
Comment 4•5 years ago
|
||
Can you check if you have enabled devtools.responsive.browserUI.enabled
in about:config? It should be set to false to reproduce the issue.
Reporter | ||
Comment 5•5 years ago
|
||
I see that the preference's default value was just changed to true in https://bugzilla.mozilla.org/show_bug.cgi?id=1621306
That's probably why you are not seeing the issue. Make sure to switch the preference to false before testing.
Assignee | ||
Comment 6•5 years ago
|
||
You are right! that was the problem. I'll push in a couple of hours when I get home
Hi,
I realize that Maria has already done some work on this bug, but would it be fine if I try my hand at this bug as an exercise to get my development environment setup?
Thanks,
Ivan
Assignee | ||
Comment 8•5 years ago
|
||
Comment 10•5 years ago
|
||
bugherder |
Description
•