Closed Bug 1173142 Opened 9 years ago Closed 8 years ago

Users should be able to define their own device definitions


(DevTools :: Responsive Design Mode, defect)

41 Branch
Not set


(firefox54 fixed)

Firefox 54
Tracking Status
firefox54 --- fixed


(Reporter: canuckistani, Assigned: jryans)


(Blocks 2 open bugs)


(Keywords: dev-doc-complete, Whiteboard: [rdm-v2])

In bug 1172309 we're tracking using the device catalogf for RDV. For Android devices we can't / don't want to track all devices.

As a developer I should be able to somehow define custom device definitions with arbitrary values of the correct type for the supported properties, for example:

  name: "Geeksphone Keon", // String
  width: 320, // int
  height: 480, // int
  pixelRatio: 1, // float
  userAgent: "Mozilla/5.0 (Mobile; rv:28.0) Gecko/28.0 Firefox/28.0", // string
  touch: true, // boolean

We should store these and allow import / export of them.
Additionally - as a developer I should be able to clone an existing device definition and 'save as' a new one.
This is possible via about:config
(In reply to Tim Nguyen [:ntim] from comment #2)
> This is possible via about:config

Yup - just want to offer a better user experience for that. Here's a use case: I have a weird android phone I want to emulate - say one that is popular in some countries but doesn't make the global top list. I'd really like to be able to load a similar device, click 'copy', Give it a name and adjust the parameters as needed, then hit 'save'.
Whiteboard: [devtools-ux]
The device list is now stored in IndexedDB, so it's a bit harder to tweak the actual data just from about:config.  If you are in dire need of a customized device set before a UI is added here, you could change the pref "devtools.devices.url" to point at your own JSON file.
Whiteboard: [devtools-ux] → [rdm-v2]
Another related thing that is lost with the new RDM are the previously user defined devices (well, not exactly devices but just dimensions plus a name). It was strange that just an update forgot my presets, I think they must be imported from the previous settings.

In bug 1321675, the "minimal" UI turned into enough of a UI to create a complete device, so be sufficient to cover the needs here as well.

For the moment, it doesn't convert data from old RDM.  Currently, this doesn't seem like a major issue to me, as it's just a few names and numbers, plus the new version has additional fields that would need to be set anyway.  Feel free to file a separate bug if it's important to you.
Assignee: nobody → jryans
Closed: 8 years ago
Depends on: 1321675
Resolution: --- → FIXED
See Also: 1321675
Target Milestone: --- → Firefox 54
Product: Firefox → DevTools
No longer blocks: rdm-web-compat
You need to log in before you can comment on or make changes to this bug.