Closed Bug 1620935 Opened 5 years ago Closed 5 years ago

Fix React warning in devtools/client/responsive/components/Browser.js `os: PropTypes.String`

Categories

(DevTools :: Responsive Design Mode, task, P3)

task

Tracking

(firefox77 fixed)

RESOLVED FIXED
Firefox 77
Tracking Status
firefox77 --- fixed

People

(Reporter: jdescottes, Assigned: alisaur, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

What were you doing?

  1. Build Firefox with the build option ac_add_options --enable-debug-js-modules
  2. Run Firefox
  3. Open RDM

What happened?

Several similar warnings about devices.phones[0].os are logged, for instance:

Warning: Failed prop type: App: prop type `devices.phones[0].os` is invalid; it must be a function, usually from the `prop-types` package, but received `undefined`.
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?

The fix should be easy

https://searchfox.org/mozilla-central/rev/557a0e222dd104c5d805ba344c45d6abc27d3db0/devtools/client/responsive/types.js#50

os: PropTypes.String,

should be changed to

os: PropTypes.string,

(uppercase String is not a valid PropType!)

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/

Hi,

I am new, however, I would like to work on this!

Thanks

Hi michaelw!

Thanks for offering to work on 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: nobody → michaelw.wang
Status: NEW → ASSIGNED

Hi michaelw,

Do you need any help with the setup or with the bug?

Flags: needinfo?(michaelw.wang)

No answer from the assignee, resetting.

Assignee: michaelw.wang → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(michaelw.wang)

Hello! Could I work on this?
I'm new, and I just got my local build up and running :)

(In reply to Alice :alisaur from comment #5)

Hello! Could I work on this?
I'm new, and I just got my local build up and running :)

Sure thing! I have assigned the issue to you.

Assignee: nobody → yawenalice
Status: NEW → ASSIGNED

Are there any related tests that need to be updated? I would think no, but wanted to double check...

Flags: needinfo?(jdescottes)

(In reply to Alice :alisaur from comment #7)

Are there any related tests that need to be updated? I would think no, but wanted to double check...

No related tests need to be updated for this one.

Flags: needinfo?(jdescottes)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: