Skip to content

Commit

Permalink
68.14.0 - devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedor committed Apr 22, 2024
1 parent 31cef1d commit 7c18fe1
Show file tree
Hide file tree
Showing 2,020 changed files with 82,055 additions and 76,150 deletions.
34 changes: 0 additions & 34 deletions devtools/client/aboutdebugging-new/aboutdebugging.css

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ To try out about:debugging, type `about:debugging` in the Firefox URL bar.
## Technical overview

The about:debugging-new UI is built using React and Redux. The various React/Redux files should be organized as follows:
- devtools/client/aboutdebugging-new/src/actions
- devtools/client/aboutdebugging-new/src/components
- devtools/client/aboutdebugging-new/src/middleware
- devtools/client/aboutdebugging-new/src/reducers
- devtools/client/aboutdebugging/src/actions
- devtools/client/aboutdebugging/src/components
- devtools/client/aboutdebugging/src/middleware
- devtools/client/aboutdebugging/src/reducers

The folder `devtools/client/aboutdebugging-new/src/modules` contains various helpers and classes that are not related to React/Redux. For instance modules/usb-runtimes.js provides an abstraction layer to enable USB runtimes scanning, to list USB runtimes etc...
The folder `devtools/client/aboutdebugging/src/modules` contains various helpers and classes that are not related to React/Redux. For instance modules/usb-runtimes.js provides an abstraction layer to enable USB runtimes scanning, to list USB runtimes etc...

### Firefox Component Registration
about:debugging-new is an "about" page registered via a component manifest that is located in `/devtools/startup/aboutdebugging.manifest`. The component registration code is at `/devtools/startup/aboutdebugging-registration.js`.
Expand All @@ -39,7 +39,7 @@ They should never use any of the lifecycle methods that will be deprecated in Re
When it comes to updating the state, components should do it via an action if the result of this action is something that should be preserved when reloading the UI.

### Middlewares
We use several middlewares in the application. The middlewares are required in the create-store module `devtools/client/aboutdebugging-new/src/create-store.js`.
We use several middlewares in the application. The middlewares are required in the create-store module `devtools/client/aboutdebugging/src/create-store.js`.

#### thunk
This is a shared middleware used by other DevTools modules that allows to dispatch actions and allows to create multiple asynchronous actions.
Expand Down Expand Up @@ -69,12 +69,12 @@ Holds the current list of runtimes known by the application as well as the curre
Holds all the debug targets (ie tabs, addons, workers etc...) for the currently monitored runtime. There is at most one monitored runtime at a given time.

### Constants
Constants can be found at `devtools/client/aboutdebugging-new/src/constants.js`. It contains all the actions available in about:debugging as well as several other "packages" of constants used in the application.
Constants can be found at `devtools/client/aboutdebugging/src/constants.js`. It contains all the actions available in about:debugging as well as several other "packages" of constants used in the application.

If a constant (string, number, etc...) is only used in a single module it can be defined as a `const` in this module. However as soon as the constant is shared by several modules, it should move to `devtools/client/aboutdebugging-new/src/constants.js`.
If a constant (string, number, etc...) is only used in a single module it can be defined as a `const` in this module. However as soon as the constant is shared by several modules, it should move to `devtools/client/aboutdebugging/src/constants.js`.

### Types
Types can be found at `devtools/client/aboutdebugging-new/src/types.js`. They serve both as documentation as well as validation. We do not aim at having types for every single element of the state, but only for complex objects.
Types can be found at `devtools/client/aboutdebugging/src/types.js`. They serve both as documentation as well as validation. We do not aim at having types for every single element of the state, but only for complex objects.

## Contact
If you have any questions about the code, features, planning, the active team is:
Expand Down
34 changes: 34 additions & 0 deletions devtools/client/aboutdebugging/aboutdebugging.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/*
* Global styles
*/
@import "resource://devtools/client/themes/variables.css";
@import "resource://devtools/client/aboutdebugging/src/base.css";

/*
* Components
*/
@import "resource://devtools/client/aboutdebugging/src/components/App.css";
@import "resource://devtools/client/aboutdebugging/src/components/ProfilerDialog.css";
@import "resource://devtools/client/aboutdebugging/src/components/RuntimeActions.css";
@import "resource://devtools/client/aboutdebugging/src/components/RuntimeInfo.css";
@import "resource://devtools/client/aboutdebugging/src/components/connect/ConnectPage.css";
@import "resource://devtools/client/aboutdebugging/src/components/connect/ConnectSection.css";
@import "resource://devtools/client/aboutdebugging/src/components/connect/ConnectSteps.css";
@import "resource://devtools/client/aboutdebugging/src/components/connect/NetworkLocationsForm.css";
@import "resource://devtools/client/aboutdebugging/src/components/connect/NetworkLocationsList.css";
@import "resource://devtools/client/aboutdebugging/src/components/debugtarget/DebugTargetItem.css";
@import "resource://devtools/client/aboutdebugging/src/components/debugtarget/DebugTargetList.css";
@import "resource://devtools/client/aboutdebugging/src/components/debugtarget/DebugTargetPane.css";
@import "resource://devtools/client/aboutdebugging/src/components/debugtarget/FieldPair.css";
@import "resource://devtools/client/aboutdebugging/src/components/debugtarget/ServiceWorkerAction.css";
@import "resource://devtools/client/aboutdebugging/src/components/debugtarget/TemporaryExtensionInstallSection.css";
@import "resource://devtools/client/aboutdebugging/src/components/shared/IconLabel.css";
@import "resource://devtools/client/aboutdebugging/src/components/shared/Message.css";
@import "resource://devtools/client/aboutdebugging/src/components/sidebar/Sidebar.css";
@import "resource://devtools/client/aboutdebugging/src/components/sidebar/SidebarFixedItem.css";
@import "resource://devtools/client/aboutdebugging/src/components/sidebar/SidebarItem.css";
@import "resource://devtools/client/aboutdebugging/src/components/sidebar/SidebarRuntimeItem.css";
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const AboutDebugging = {
store: this.store,
},
LocalizationProvider(
{ messages: l10n.getBundles() },
{ bundles: l10n.getBundles() },
Router({}, App({}))
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## When do you need to build Firefox for Android

If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it with a device which runs the release version of Firefox for Android. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging-new`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build Firefox for Android and deploy it on a test device.
If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it with a device which runs the release version of Firefox for Android. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build Firefox for Android and deploy it on a test device.

## Setup your environment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## When do you need to build GeckoView Example

If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it without building your GeckoView Example. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging-new`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build GeckoView Example and deploy it on a test device.
If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it without building your GeckoView Example. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build GeckoView Example and deploy it on a test device.

## Setup your environment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## When do you need to build GeckoView Reference Browser

If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it without building your GeckoView Reference Browser. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging-new`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build GeckoView Reference Browser and deploy it on a test device. To build custom Reference Browser, need two modules of GeckoView and Reference Browser.
If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it without building your GeckoView Reference Browser. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build GeckoView Reference Browser and deploy it on a test device. To build custom Reference Browser, need two modules of GeckoView and Reference Browser.

## Setup your environment and build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Tests overview

Tests are located in `devtools/client/aboutdebugging-new/test`. There are two subfolders, `browser` and `unit`. `browser` contains our [browser mochitests](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Mochitest). Most of our tests are browser mochitests. `unit` contains our [xpc-shell unit tests](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests). At the moment of writing we only have one.
Tests are located in `devtools/client/aboutdebugging/test`. There are two subfolders, `browser` and `unit`. `browser` contains our [browser mochitests](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Mochitest). Most of our tests are browser mochitests. `unit` contains our [xpc-shell unit tests](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests). At the moment of writing we only have one.

## Test coverage

You can get some code coverage information at https://codecov.io/gh/mozilla/gecko-dev/tree/master/devtools/client/aboutdebugging-new/src . The service is sometimes very slow, be patient! You might have to reload the page several times to get a result.
You can get some code coverage information at https://codecov.io/gh/mozilla/gecko-dev/tree/master/devtools/client/aboutdebugging/src . The service is sometimes very slow, be patient! You might have to reload the page several times to get a result.

## Running tests

Expand All @@ -20,7 +20,7 @@ A few examples below:
```
# Run browser_aboutdebugging_addons_manifest_url.js only
./mach test devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_addons_manifest_url.js
./mach test devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_manifest_url.js
# or
Expand All @@ -30,7 +30,7 @@ A few examples below:
```
# Run all aboutdebugging tests
./mach test devtools/client/aboutdebugging-new/test/browser/
./mach test devtools/client/aboutdebugging/test/browser/
# or (this works because all our tests start with "browser_aboutdebugging...")
Expand Down
Loading

0 comments on commit 7c18fe1

Please sign in to comment.