Closed
Bug 1491281
Opened 6 years ago
Closed 6 years ago
Make id and title props optional for Tab components in Inspector
Categories
(DevTools :: Inspector, enhancement, P3)
DevTools
Inspector
Tracking
(firefox65 fixed)
RESOLVED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: rcaliman, Assigned: rcaliman)
References
Details
Attachments
(1 file)
When registering a new sidebar tab in the inspector, there's needless duplication of the tab id and title which are passed as props to the React component: https://searchfox.org/mozilla-central/source/devtools/client/inspector/inspector.js#917-920,945-948,966-969 This could be solved in Tabbar.js `renderTab()` by inferring the id and title props to be the same as the tab's id and title attributes. https://searchfox.org/mozilla-central/source/devtools/client/shared/components/tabs/TabBar.js#308-319 In case explicit props are defined, they should be used instead.
Assignee | ||
Comment 1•6 years ago
|
||
Avoid needless duplication if tab id and title as props when creating Inspector sidebar tab components.
Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/91599d4283b5 Use tab id and title as fallbacks for panel props in Inspector sidebar tabs; r=gl
Comment 3•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/91599d4283b5
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Comment 4•6 years ago
|
||
This patch breaks the inspector if you use the dev version of react (`ac_add_options --enable-debug-js-modules` in mozconfig). JavaScript error: resource://devtools/shared/base-loader.js -> resource://devtools/client/shared/components/tabs/TabBar.js, line 321: TypeError: "props" is read-only Any idea how we could fix this?
Flags: needinfo?(rcaliman)
Assignee | ||
Comment 5•6 years ago
|
||
Reverted this change with the fix for Bug 1503192
Flags: needinfo?(rcaliman)
You need to log in
before you can comment on or make changes to this bug.
Description
•