Closed Bug 1253650 Opened 8 years ago Closed 8 years ago

Fix React propType warnings

Categories

(DevTools :: Memory, defect, P2)

defect

Tracking

(firefox47 affected, firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox47 --- affected
firefox48 --- fixed

People

(Reporter: linclark, Assigned: linclark)

References

Details

Attachments

(1 file)

We want to fail tests on propType warnings (Bug 1249106). It looks like some were recently introduced in the memory tool, so we need to clean those up first.
Assignee: nobody → lclark
Status: NEW → ASSIGNED
Blocks: 1249106
Attached patch Bug1253650.patchSplinter Review
This makes the propTypes check pass.

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e5ee4919bfb6
Attachment #8727018 - Flags: review?(nfitzgerald)
Comment on attachment 8727018 [details] [diff] [review]
Bug1253650.patch

Review of attachment 8727018 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! r=me with comments below

::: devtools/client/memory/components/toolbar.js
@@ +11,5 @@
>  
>  module.exports = createClass({
>    displayName: "Toolbar",
>    propTypes: {
>      censusDisplays: PropTypes.arrayOf(PropTypes.shape({

Can you change this to

  PropTypes.arrayOf(censusDisplayModel)

@@ +26,5 @@
>      diffing: models.diffingModel,
>      onToggleDiffing: PropTypes.func.isRequired,
>      view: PropTypes.string.isRequired,
>      onViewChange: PropTypes.func.isRequired,
>      dominatorTreeDisplays: PropTypes.arrayOf(PropTypes.shape({

And this to:

  PropTypes.arrayOf(dominatorTreeDisplayModel)
Attachment #8727018 - Flags: review?(nfitzgerald) → review+
Those variables aren't defined in toolbar.js. I don't think they are exported from models.js in a way that makes sense to reuse them, currently.

Would it be ok to land this as is and create a follow up for that change? That would make it possible to get Bug 1249106 landed.
Flags: needinfo?(nfitzgerald)
Sure
Flags: needinfo?(nfitzgerald)
Great, thanks. Created Bug 1254242 as the follow up.
Keywords: checkin-needed
Has STR: --- → yes
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/50d6d1b53a1d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: