Skip to content

Commit ff321ef

Browse files
bmeurerDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
[docs] Add a skeleton for the Contribution Guide.
Bug: 354102605 Change-Id: I8f253844aeae4a386f967140a472f4ee12b666f3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5803966 Auto-Submit: Benedikt Meurer <[email protected]> Reviewed-by: Philip Pfaffe <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]>
1 parent d5e1f9b commit ff321ef

10 files changed

+322
-202
lines changed

CONTRIBUTING.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributing to Chromium DevTools
2+
3+
Contributions to Chromium DevTools include code, documentation, and responding
4+
to user questions.
5+
6+
See the [Chrome DevTools Contribution Guide](./docs/contributing/README.md)
7+
for details on how you can contribute. Also checkout the [Contributing to
8+
Chromium](https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md)
9+
and [Contributing to V8](https://v8.dev/docs/contribute) documents for details
10+
how to contribute to the Chromium / V8 code base in general, which is relevant
11+
when working on the DevTools back-end.

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ maintain a DevTools front-end checkout, as well as design guidelines, and archit
2222
- [awesome-chrome-devtools](https://github.com/paulirish/awesome-chrome-devtools): recommended tools and resources
2323
- Contributing to DevTools: [bit.ly/devtools-contribution-guide](https://goo.gle/devtools-contribution-guide)
2424
- Contributing To Chrome DevTools Protocol: [docs.google.com](https://goo.gle/devtools-contribution-guide-cdp)
25-
- DevTools Design Review Guidelines: [design_guidelines.md](docs/design_guidelines.md)
2625

2726
### Source mirrors
2827

docs/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ below.**
2323

2424
### General Development
2525

26-
* [Get the Code](get_the_code.md)
26+
* [Get the Code](./get_the_code.md)
27+
* [Contribution Guide](./contributing/README.md)
2728
* [UX Style Guide](./styleguide/ux/README.md)
2829
* [Testing Guide](../test/README.md)
29-
* [Contributing Changes](contributing_changes.md)
30-
* [Chrome DevTools Design Review Guidelines](design_guidelines.md)
3130
* [Release Management](release_management.md)
3231
* [Dependencies](dependencies.md)
3332
* [Localization](l10n.md)
34-
* [Chrome DevTools Protocol](devtools-protocol.md)
3533
* [Visual logging in DevTools](visual_logging.md)
3634
* [UMA metrics in DevTools](uma_metrics.md)
3735
* [How to add UMA metrics in DevTools frontend](add_uma_metrics.md)
@@ -41,11 +39,12 @@ below.**
4139
### Architectural Documentation
4240

4341
* [Architecture of DevTools](architecture_of_devtools.md)
42+
* [Chrome DevTools Protocol (CDP)](devtools-protocol.md)
4443
* [Resource management in DevTools](resource_management.md)
4544

4645
### Chromium
4746

48-
* [Chromium Docs](https://chromium.googlesource.com/chromium/src/+/master/docs/README.md)
47+
* [Chromium Docs](https://chromium.googlesource.com/chromium/src/+/main/docs/README.md)
4948
* [V8 Documention](https://v8.dev/docs)
5049

5150
### Checklists

docs/contributing/README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Chromium DevTools Contribution Guide
2+
3+
[goo.gle/devtools-contribution-guide](https://goo.gle/devtools-contribution-guide)
4+
5+
This page assumes a working Chromium DevTools [checkout and build](../get_the_code.md).
6+
7+
1. [Design Documents](./design.md)
8+
1. [Contributing changes](./changes.md)
9+
10+
## Legal stuff
11+
12+
All contributors must have valid Gerrit/Google accounts (which means you must
13+
be [old enough to manage your own
14+
account](https://support.google.com/accounts/answer/1350409)) and complete the
15+
contributor license agreement.
16+
17+
For individual contributors, please complete the [Individual Contributor
18+
License Agreement](https://cla.developers.google.com/about/google-individual?csw=1)] online. Corporate contributors must fill out the [Corporate Contributor License
19+
Agreement](https://cla.developers.google.com/about/google-corporate?csw=1) and
20+
send it to us as described on that page.
21+
22+
### First-time contributors
23+
24+
Add your or your organization's name and contact info to the [`AUTHORS`](./AUTHORS)
25+
file for Chromium DevTools. Please include this as part of your first patch and
26+
not as a separate standalone patch.
27+
28+
### External contributor checklist for reviewers
29+
30+
Before LGTMing a change from a non-`chromium.org` address, ensure that the
31+
contribution can be accepted:
32+
33+
- Definition: The "author" is the email address that owns the code review
34+
request on <https://chromium-review.googlesource.com>
35+
- Ensure the author is already listed in the [`AUTHORS`](./AUTHORS).
36+
In some cases, the author's company might have a wildcard rule
37+
(e.g. `*@google.com`).
38+
- If the author or their company is not listed, the CL should include a new
39+
[`AUTHORS`](./AUTHORS) entry.
40+
- Ensure the new entry is reviewed by a reviewer who works for Google.
41+
- Contributor License Agreement can be verified by Googlers at http://go/cla.
42+
- If there is a corporate CLA for the author's company, it must list the
43+
person explicitly (or the list of authorized contributors must say
44+
something like "All employees"). If the author is not on their company's
45+
roster, do not accept the change.

docs/contributing/changes.md

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Contributing changes to Chromium DevTools
2+
3+
See [Get the Code](../get_the_code.md) for details on how to checkout the code, and [Design Documents](design.md) for information regarding our design process.
4+
5+
[TOC]
6+
7+
## Creating a change
8+
9+
Usual [steps](https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md#creating-a-change) for creating a change work out of the box, when executed in the DevTools frontend repository.
10+
11+
Tips to create meaningful CL descriptions:
12+
- Provide information on what was changed and why
13+
- Provide before/after screenshots (if applicable)
14+
- Provide relevant link to demo or example (if applicable)
15+
- Provide link to design doc (if applicable)
16+
17+
At least two committers need to have been involved in the CL either as reviewer or author. See [committers policy](https://chromium.googlesource.com/devtools/devtools-frontend/+/main/docs/committers_policy.md) for more information.
18+
19+
Example CL, adapted from [Chromium guidelines](https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md#uploading-a-change-for-review):
20+
21+
```
22+
Summary of change (one line)
23+
24+
Longer description of change addressing as appropriate:
25+
what change was made, why the change is made, context if
26+
it is part of many changes, description of previous behavior
27+
and newly introduced differences, etc.
28+
29+
Long lines should be wrapped to 72 columns for easier log message
30+
viewing in terminals.
31+
32+
How to test:
33+
1. ..
34+
2. ..
35+
36+
Before: https://page-to-before-screenshot.com/before
37+
After: https://page-to-after-screenshot.com/after
38+
Bug: 123456
39+
40+
```
41+
## Merges and cherry-picks
42+
43+
_Merge request/approval is handled by Chromium Release Managers. DevTools follows [Chromium's merge criteria](https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/docs/process/merge_request.md#merge-criteria-phases). In exceptional cases please get in touch with [email protected]._
44+
45+
Step-by-step guide on how to merge:
46+
47+
1. Request approval to merge by adding the milestone to the `Merge-Request` filed of the relevant crbug. A bot will come by and either ask for more info ([example](http://crbug.com/1123307#c1)) or approve the request.
48+
1. Backmerges are done to the `chromium/xxxx` (e.g. `chromium/3979`) branch on the DevTools frontend repo.
49+
Use <https://chromiumdash.appspot.com/branches> or [Omahaproxy](https://omahaproxy.appspot.com/)
50+
to find out what branch a major Chromium version has (column `true_branch`).
51+
1. Open the to-be-merged commit in Gerrit
52+
([example](https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928912)).
53+
1. Click the hamburger menu on the top right and select “Cherry pick”.
54+
1. Select the branch to merge to e.g. `chromium/3968`.
55+
1. The cherry-pick CL is created
56+
([example](https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928913)).
57+
1. Get it reviewed if necessary.
58+
1. Once merge request approval is granted (see step 1), click the hamburger menu on the cherry-pick CL and select “Submit”. (Setting the Commit-Queue bit (+2) has no effect because these branches don’t have a commit queue.)
59+
1. Done.
60+
61+
### Merge conflicts
62+
63+
If the approach above causes conflicts that need resolving, you can use an alternative git workflow which allows you to resolve conflicts locally before uploading. This is very similar to the [chromium git merge steps](https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/docs/process/merge_request.md#using-git) but with different branch names. These steps will **create the cherry-pick CL via git**.
64+
65+
_It is suggested to use the Gerrit UI approach when possible, it is more straightforward and automated. Only use this approach if your cherry-pick causes conflicts._
66+
67+
For the commands below, replace `xxxx` with the Chromium branch number that you are merging into.
68+
69+
To set up your local environment run:
70+
71+
```
72+
gclient sync --with_branch_heads
73+
git fetch
74+
git checkout -b BRANCH_NAME origin/chromium/xxxx
75+
git cl upstream origin/chromium/xxxx
76+
```
77+
78+
You can then cherry-pick your commit from the main branch:
79+
80+
```
81+
git cherry-pick -x YOUR_COMMIT
82+
```
83+
84+
You can then resolve any conflicts, run tests, build DevTools, etc, locally to verify everything is working. Then run `git cl upload` to upload the CL and get a review as normal.
85+
86+
**Make sure you remove the Change-ID: line** from the description to avoid issues when uploading the CL.
87+

docs/contributing/design.md

+165
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Design Documents
2+
3+
**TL;DR**: This document outlines the development process for Chromium DevTools,
4+
in particular the established culture and processes around design artifacts.
5+
6+
[TOC]
7+
8+
## Writing a design document
9+
10+
Any non-trivial technical effort that will significantly impact Chromium DevTools
11+
should have a design doc ([template](https://goo.gle/devtools-design-doc-template)).
12+
Specifically, we require design docs (DDs) in the following cases:
13+
14+
1. When writing code that will have a large impact on DevTools as a whole, e.g.
15+
when you are changing behavior of a critical component like the *Console* or
16+
*Sources* panel.
17+
1. When beginning a large technical undertaking that should be documented for
18+
historical reasons (>1 person-month of work can be used as a general
19+
guideline).
20+
21+
*** promo
22+
**Tip (Googlers):**
23+
For smaller scale changes or when you are not sure yet whether any of the
24+
criteria above will apply, but you still want to have it written up and
25+
discussed, you can start with a Design Proposal
26+
([template](http://go/chrome-devtools-greendoc-template)).
27+
These should always be Google internal.
28+
***
29+
30+
Public design docs have to live in the
31+
[Design Documents](https://drive.google.com/drive/folders/1JbUthATfybvMQR3yAHC4J0P7n6oftYNq)
32+
folder of the shared public
33+
[Chromium DevTools](http://go/chrome-devtools/team-resources#chromium-devtools-shared-drive) team drive,
34+
which automatically makes them commentable for
35+
36+
[[email protected]](mailto:[email protected]). And they need to
37+
be send to
38+
39+
40+
Google internal design docs have to live in the
41+
[Design Documents (internal)](https://drive.google.com/corp/drive/folders/15oHN9vX8j08QOkegjWKdSN0XjyaoLanl)
42+
folder of the shared internal
43+
[Chrome DevTools](http://go/chrome-devtools/team-resources#chrome-devtools-shared-drive) team drive, and
44+
should be sent to
45+
46+
47+
*** note
48+
**IMPORTANT (Googlers):** Every design document (whether public or internal) must be editable
49+
50+
must have a `go/chrome-devtools:<project-name>-design` go/ link pointing to it
51+
(even for publicly visible documents).
52+
***
53+
54+
Follow the steps in the
55+
[Chrome DevTools Design Review Guidelines](#Review-Guidelines)
56+
to proceed with your design document and get it reviewed and approved.
57+
58+
## Review Guidelines
59+
60+
When contributing to Chrome DevTools, please follow the process explained in this document. This is to reach a clear agreement on proposals, while involving all relevant stakeholders and decision makers.
61+
62+
This process puts the IC in charge, but also requires Chrome DevTools' leaders to help the IC navigate the decision process. It includes an escalation path in case of disagreement. The overhead of this process should be proportionate to the scope of the proposal.
63+
64+
**Important:**
65+
66+
1. Assume good intentions.
67+
1. Be kind and civilized.
68+
1. Be pragmatic.
69+
70+
![DevTools Design Process](./images/design-guidelines.png)
71+
72+
### Roles
73+
74+
#### Individual Contributor (IC)
75+
76+
_LGTM_: N/A
77+
78+
This person is the creator of the feature and the creator of the design documentation.
79+
80+
#### Technical Lead (TL)
81+
82+
_LGTM_: Required. May delegate.
83+
84+
The Chrome DevTools TL is Danil Somsikov ([email protected]). The TL ensures architectural consistency and good coverage by the right set of LGTM providers, and is required to sign off on the design. They may however explicitly delegate to other LGTM providers.
85+
86+
In the absence of the TL, an EnReOw can act in their stead.
87+
88+
#### LGTM provider
89+
90+
_LGTM_: Required. May delegate.
91+
92+
This is a person that is required to give LGTM. These are usually ICs with significant knowledge about the areas in question.
93+
94+
#### Reviewer
95+
96+
_LGTM_: Not required.
97+
98+
This is somebody who reviews and comments on the proposal. Their input should be considered, although their LGTM is not required.
99+
100+
#### The Eng Review Owners (EnReOw)
101+
102+
_LGTM_: Not required. However, LGTM or non-LGTM is binding.
103+
104+
Stuck proposals can be escalated to the [ENG_REVIEW_OWNERS](https://cs.chromium.org/chromium/src/third_party/devtools-frontend/src/config/owner/ENG_REVIEW_OWNERS). Potential use cases of such an escalation:
105+
106+
- An LGTM provider is non-responsive.
107+
- No consensus on the design can be reached.
108+
109+
The EnReOw can overrule non-LGTMs or LGTMs.
110+
111+
### Detailed workflow
112+
113+
1. IC shares the document with LGTM providers and reviewers according to the roles listed above.
114+
1. LGTM providers may add more LGTM providers to remove themselves as LGTM providers.
115+
1. LGTM providers and reviewers review the design document and add feedback.
116+
1. IC incorporates feedback and iterates on their design document.
117+
1. Optional: the design doc is shared publicly with [email protected] (make sure to give comment access to [email protected], but untick the "Notify" checkbox).
118+
1. IC collects LGTMs by addressing feedback. Iterate if necessary.
119+
1. Once all required LGTMs have been collected, proceed with implementation.
120+
1. On disagreement that cannot be resolved or unreasonable delays, escalate to EnReOw.
121+
1. Implement and iterate on CLs with code owners. We expect the implementation to take place on the public repository's main branch. Note that a series of small incremental changes has a higher chance of receiving timely reviews and actionable feedback.
122+
123+
## FAQ
124+
125+
### Is it worth creating a design document?
126+
127+
It is always useful to have a design document. Its length can vary depending on the scope of the proposed change.
128+
129+
### When should the design process be kicked off?
130+
131+
As soon as possible so that a wide range of opinions can be taken into consideration. If you share your idea or prototype at a later stage, you risk having to redo the work because you missed a constraint.
132+
133+
### How to decide who to add to the list of LGTM providers?
134+
135+
Some pointers when people should be added to the list of LGTM providers:
136+
137+
- OWNERs of the source files/directories you anticipate to touch
138+
- Main component expert of the components you anticipate to touch
139+
- Downstream consumers of your changes e.g. when you change an API
140+
141+
### Where can I find a template for design documents?
142+
143+
[goo.gle/devtools-design-doc-template](https://goo.gle/devtools-design-doc-template)
144+
145+
### What if I made big changes to the design document?
146+
147+
Make sure you still have the LGTMs e.g. by pinging the LGTM providers.
148+
149+
### LGTM providers do not comment on my design document, what should I do?
150+
151+
In this case you can follow this path of escalation:
152+
153+
1. Ping them directly via mail, chat or comment/assignment in the doc and specifically ask them explicitly to add an LGTM or non-LGTM.
154+
1. Get your TL involved and ask them for help.
155+
1. Escalate to EnReOw.
156+
157+
### Somebody added me as an LGTM provider to a doc, what should I do?
158+
159+
Review the design document. If you think there are other people who should take a look, add them as LGTM providers or as reviewers. If you don't think you are the right person, remove yourself as LGTM provider.
160+
161+
If you agree with the design, add an LGTM to the table. If you have blocking concerns, add "Not LGTM, because <reason>" to the table. Be prepared to re-review the design after another iteration.
162+
163+
### How does this work together with the Blink Intents process?
164+
165+
The Chromium DevTools Design Review Guidelines complement [Chromium’s feature launch process](https://www.chromium.org/blink/launching-features). If you are launching a new Web platform feature, please follow the Chromium launch process. It likely makes sense to have all the LGTMs gathered at the point in time you would send an Intent to Implement.

docs/contributing/navbar.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Chromium DevTools Contribution Guide
2+
3+
[logo]: https://github.com/ChromeDevTools/devtools-logo/raw/master/logos/png/devtools-circle-48.png
4+
[home]: README.md
5+
[devtools]: ../README.md
6+
7+
* [Chromium DevTools Contribution Guide][home]
8+
* [Chromium DevTools Documentation][devtools]

0 commit comments

Comments
 (0)