Skip to content

Commit 2274d6f

Browse files
Nancy LiDevtools-frontend LUCI CQ
authored andcommitted
[RPP insight] Update the README file
Bug: none Change-Id: I00d71e91f89fd735ccd4abd7d50313abc64f8342 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6316673 Reviewed-by: Jack Franklin <[email protected]> Auto-Submit: Nancy Li <[email protected]> Commit-Queue: Jack Franklin <[email protected]>
1 parent 7f17ce8 commit 2274d6f

File tree

1 file changed

+13
-2
lines changed
  • front_end/panels/timeline/components/insights

1 file changed

+13
-2
lines changed

front_end/panels/timeline/components/insights/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Building performance insights UI
22

3-
**Last updated: Jan 2025**
3+
**Last updated: Mar 2025**
44

55
If you want to add an insight to the Performance panel sidebar, you need to create and render an HTML component that follows certain conventions which will mean it integrates nicely into the rest of the performance panel, and all its overlays/active state/etc is managed for you.
66

7+
## 0. (Optional) Add your insight to `EXPERIMENTAL_INSIGHTS`
8+
9+
The insights often require multiple CLs to implement. If you want your WIP insight only be visible when the 'enable experimental performance insights' experiment is active, you can add it to the insight to `EXPERIMENTAL_INSIGHTS`.
10+
711
## 1. Extend `BaseInsightComponent`
812

913
When creating your component, extend the `BaseInsightComponent` class (defined in `components/insights/BaseInsightComponent.ts`). This class will set up some of the setters and data you need. Your component will then have access to a `this.data` object which will have on it:
@@ -65,4 +69,11 @@ override connectedCallback(): void {
6569

6670
## 5. Render!
6771

68-
Add your insight to the UI in `SidebarSingleInsightSet.ts` in the `INSIGHT_NAME_TO_COMPONENT` variable.
72+
Add your insight to the UI in `SidebarSingleInsightSet.ts` in the `INSIGHT_NAME_TO_COMPONENT` method.
73+
74+
75+
## 6. Before you submit your CL
76+
77+
- Add your related VE loggine context values in the `KnownContextValues.ts`
78+
- Update the tests in `SidebarSingleInsightSet.test.ts`
79+
- WHen you want to ship the insight, make sure it is not in the experiments: `EXPERIMENTAL_INSIGHTS`.

0 commit comments

Comments
 (0)