Skip to content

Commit bf05bd6

Browse files
szuendDevtools-frontend LUCI CQ
authored andcommitted
[docs] Update create_new_issue.md with latest information
Also incorporate information about generic issues. [email protected] Fixed: 374265174 Change-Id: Ic8a21e68ec0080e23bdf3d45799ba277e669ec15 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5941632 Reviewed-by: Benedikt Meurer <[email protected]> Auto-Submit: Simon Zünd <[email protected]> Commit-Queue: Simon Zünd <[email protected]>
1 parent 37c5ce5 commit bf05bd6

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

docs/cookbook/create_new_issues.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,30 @@ To do so, follow the next steps:
3232
straightforward solution. With the addition of more context and external
3333
documentation, it will support the developer across the whole debugging
3434
story, making the message more actionable than in the console.
35-
* Pipe your message into DevTools. First you need to decide where to report
36-
the issue. Issues can be reported on the browser side (choose this if the
35+
* Pipe your message into DevTools. First you need to decide which additional
36+
information you want to send with your issue. Depending on the answer
37+
you'll have two options:
38+
1) Use the [generic issue](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/devtools_protocol/browser_protocol.pdl;l=807-829;drc=3e4a3b72cdd0cab0224292a7322ff3cf0248d307). This is the easier option.
39+
All that is required is to add a new value to `GenericIssueErrorType`.
40+
Generic issue allows sending along some pre-defined additional information:
41+
Frame ids, network requests and DOM node ids among others.
42+
2) If a generic issue is not enough, you can introduce a domain/problem
43+
specific issue type. See [here](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/devtools_protocol/browser_protocol.pdl;l=666;drc=bc268cf81e62349e0f283107d70a5f742476ef4e)
44+
how other issues are defined. You need to add an issue code and an issue
45+
details definition. The issue details should hold all the information
46+
that is required for reporting the issue in the front-end.
47+
* Next, you need to figure out where to report the issue.
48+
Issues can be reported on the browser side (choose this if the
3749
issue is raised in content/browser and/or has information that should not be
3850
shared with the renderer). Otherwise you can report it in the renderer.
3951
* For Browser-side reporting, use
40-
[`devtools_instrumentation::ReportBrowserInitiatedIssue`](https://source.chromium.org/chromium/chromium/src/+/17746910d8707d35a0a072f1bdee9d440946d6f3:content/browser/devtools/devtools_instrumentation.cc;l=962)
52+
[`devtools_instrumentation::ReportBrowserInitiatedIssue`](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_instrumentation.cc;l=1981;drc=10c26d0d230900f91d239f2fe0b731b054127e89)
4153
to report the issue.
4254
* For renderer-side reporting, use an `AddInspectorIssue` method, those
4355
are available at every execution context, plus some more classes.
44-
([example](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/bindings/core/v8/isolated_world_csp.cc;l=106;drc=63d89d5a9eea0fbacc933a5a8e34f5b3c2908c51)).
45-
* In both cases, you need to define the structure of the issue in
46-
*browser\_protocol.pdl* \[example cl pending, since we want to show a CL
47-
that doesn't also add the deprecated mojo definitions\].
48-
* See
49-
[here](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/public/devtools_protocol/browser_protocol.pdl;l=666;drc=bc268cf81e62349e0f283107d70a5f742476ef4e)
50-
how other issues are defined. You need to add an issue code and an issue
51-
details definition. The issue details should hold all the information
52-
that is required for reporting the issue in the front-end.
56+
([example](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/bindings/core/v8/isolated_world_csp.cc;l=107;drc=d2b5c17eff35da6ebff8ba20c99688b87e1bc752)).
57+
* Depending on where the issue is reported, creating the protocol structures
58+
works differently.
5359
* An example of how to create the data-structure can be found
5460
* [here](https://source.chromium.org/chromium/chromium/src/+/3564e4bcc7d53aa60350794fc1348792cc33c80d:content/browser/devtools/devtools_instrumentation.cc;drc=d6edf4bb211798b0aa0b656dfb06614cfea043e3;l=181)
5561
for the browser side
@@ -81,8 +87,5 @@ To do so, follow the next steps:
8187
To create the UX strings the best approach is to draft an initial proposal and
8288
then share it with the broader team for polishing
8389
([existing issue descriptions](https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/issues/descriptions/)
84-
for reference). To do so, make a copy of
85-
[this template](https://docs.google.com/document/d/1OCHRh0A9ERX19DvyI-AuvMLMRuOkljJmj6fn_Vb3Zck)
86-
and fill the information for each type of message you want to show. Iterate to
87-
define the most appropriate message and once you get the approvals, implement
88-
them.
90+
for reference). You can wordsmith the issue description in a separate docs or
91+
directly in the CL with Gerrit.

0 commit comments

Comments
 (0)