To allow easily switching only the user agent between various types of browsers.
That, without having to create a new device.
Differential Revision: https://phabricator.services.mozilla.com/D238790
We used to reset the dpr, user agent and touch simulation when resizing the viewport,
which could be annoying if you selected a given device to "load" a given profile
(e.g. a specific UA + touch simulation), but want a bit more room to work.
We don't do anything yet so all those would be persisted when the user resizes.
Tests are updated accordingly.
Differential Revision: https://phabricator.services.mozilla.com/D216171
Unmounting the top level React component will help avoid trigerring React updates
when async thunk actions keep dispatching new actions after the tool is closed.
This was leading to various exceptions in many React components.
Also avoid a race condition where `responsiveFront` could be undefined when closing
RDM while it is still initializing.
Finally, ensure registering the `ResponsiveUI` immediately in `activeTabs` to prevent
race condition in openIfNeeded.
Adding some test coverage for such race condition, but can't enable this on verify.
In chaos mode, there is too many exceptions at the test teardown.
Ideally, RDM should:
* only close the RDP client and let the server restore the default value on its own.
i.e. we shouldn't do any request on closing.
* RDM close requests should wait for previous initialization request to be done.
This would avoid zillion of possible exceptions because initialization is very async
and each step may throw because of things are already being destroyed.
But this wouldn't address race condition when the tab is closed.
So RDM should probably try to have a more resilient initialization sequence as well.
Differential Revision: https://phabricator.services.mozilla.com/D197581
This will help transition to ES Modules as this symbol is exposed to them.
$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests
Differential Revision: https://phabricator.services.mozilla.com/D156401
We already have translation strings in `device.properties`, so we can use them.
String for `custom` type was missing, so we add it.
Assertions are added in test to check that we do have the expected labels in the UI.
Differential Revision: https://phabricator.services.mozilla.com/D146784
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
The RDM toolbar currently scrolls with the page when there is overflow in `.browserStack`. This is because the browser viewport can be set to a size larger than browser window. The solution here sets makes the toolbar `position: fixed` and utilizes the `ResizeObserver` to adjust the size of the device modal/selector to take up the size of the browser stack.
Differential Revision: https://phabricator.services.mozilla.com/D63245
Before now, we used XUL elements as the menu for device selection on RDM.
We introduced the icon on the XUL menuitem in bug 1306198, but the UI on Ubuntu
became weird looking. In order to fix this, we could think to modify Linux
gadget, but we replace to HTML menu components we are using in DevTools with
considering deXUL as well.
Differential Revision: https://phabricator.services.mozilla.com/D61149
Before now, we used XUL elements as the menu for device selection on RDM.
We introduced the icon on the XUL menuitem in bug 1306198, but the UI on Ubuntu
became weird looking. In order to fix this, we could think to modify Linux
gadget, but we replace to HTML menu components we are using in DevTools with
considering deXUL as well.
Differential Revision: https://phabricator.services.mozilla.com/D61149