402 Commits
Author SHA1 Message Date
Connor Clark e7a6489e5c Enable projectService for TypeScript files in eslint config
Enabling this is required for rules that need to use the types as
resolved by the TypeScript compiler.

The no-floating-promises rule was missing some stuff due to missing
types, so this CL resolves that too. Also, return-await kicked up more
stuff.

A warm run of `npm run lint` went from ~23s to ~35s on my M1 Mac.

Bug: 406518012
Change-Id: I0c413e2ca14ee903851fd8404e490335c7f8aae0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6397499
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-03-28 05:02:27 -07:00
Paul Irish 109655405f RPP: Polish UI
- Reduce insight sidebar whitespace
- Drop transition on insight hover button.
- Make Magic pen animation smoother

Change-Id: I6a1cc2d83e73db66472d945bd51960c5417da547
Bug: 395797366
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6395296
Auto-Submit: Paul Irish <paulirish@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2025-03-27 10:52:20 -07:00
Danil Somsikov 6de27def00 Screenshot tests for the protocol monitor view
Bug: 388730998
Change-Id: I423f3d1b86938f4a683fa7a608e5a5e4d692aa9b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6329382
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
2025-03-24 04:40:28 -07:00
Adriana Ixba 3067d40135 [RPP] Use main thread and treeView bottomUpRootNode for 3P insight
This also simplifies the insight shape closer to how we use it in RPP,
and how we will use it in LH. This also simplifies some tests.

This modifies how we generate eventIDs when grouping by 3P. This fixes a
bug where when grouping by 3P, generateEventID can incorrectly group
events of different entities.

This fixes:
- misalignment in main thread times insight<->3P table
(by using same data source, including instant events, filters)
- incorrect event grouping: breaking bottomUp button and causing further
incorrect selftime/transfersize (bottomUp tree node ID generation)

Bug: 394651390
Change-Id: I1660a5b5b9a90be89815aad858caea94f153eabb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6341914
Reviewed-by: Paul Irish <paulirish@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
2025-03-19 13:07:38 -07:00
Alex Rudenko feb21f6438 Add assertScreenshot to unit tests
This CL adds a custom browser wrapper that starts the browser using
Puppeteer instead of letting Karma to directly start the browser. The
wrapper also exposes a binding that allows the test code to capture a
screenshot of the test DOM. The helper reuses existing screenshot
assertions and reports the result back to the test code.

This CL also adds args to improve stability of screenshots and
fixes the font to be a Roboto font loaded from Google Fonts.

To test: `npm run test --
front_end/panels/ai_assistance/components/UserActionRow.test.ts`

Bug: 401489541
Change-Id: I04889d0f0caa5c468fd35f98c66b0e6ac393de18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6330749
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2025-03-14 11:32:55 -07:00
Alex Rudenko 1deba54fc0 Stability improvements of existing screenshot tests
This CL reduces retries to 1 (no-retries) and the threshold for diffs to 0.1. This CL
also adds the following flags that should help to render in a more
stable way:

- `--disable-font-subpixel-positioning` disables subpixel positioning for fonts.
- `--disable-lcd-text` disables subpixel antialiasing.
- `--force-device-scale-factor=1` forces device scale factor to be 1.
- `--hide-scrollbars` hides scrollbars which might affect rendering.

Also, this CL imports a Roboto web font into component docs and adds a
special CSS class to force all fonts to be the same font (see
front_end/design_system_tokens.css and
front_end/ui/components/docs/component_docs_styles.css).

Bug: 401489541
Change-Id: I94e6a733d63459d1692197536511dad199ee168b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6342613
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2025-03-13 04:26:29 -07:00
Danil Somsikov 7400d95fa8 Update Chrome (for Testing) PIN
Chromium pin updated to 136.0.7063.0

Roll created at https://cr-buildbucket.appspot.com/build/8720638141246584577

Bug: none
Change-Id: I9d054ed10c1029210498c40e6c938564f8d4f068
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6343747
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2025-03-12 04:38:27 -07:00
Alex Rudenko dfffdf2a02 [Recorder] turn injected tests into unit tests (part 2)
Interaction tests are removed with this CL.

Bug: 402372244
Change-Id: Ia6fb66f9765b576dac2ddec0a5f270e865e69f37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6343238
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
2025-03-11 13:40:22 -07:00
Jack Franklin 56e22c810b Update network track screenshot tests
Bug: none
Change-Id: Iddd61a3e5c0f1d6b39900ddffca4c1a57d356f65
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6336210
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2025-03-10 05:01:00 -07:00
Adriana Ixba 64b3154df4 [RPP][3P] Change self time string to main thread time
Bug: 394651390
Change-Id: I6675497e9199ed4df29cebc7f4b5a33a72965928
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6302574
Auto-Submit: Adriana Ixba <aixba@chromium.org>
Reviewed-by: Adam Raine <asraine@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
Commit-Queue: Adriana Ixba <aixba@chromium.org>
2025-02-25 17:02:13 -08:00
Wolfgang Beyer ac9aef21c5 Add console insight with references to component server and screenshot
test

drive-by: fix margin which jumps on animation

Bug: 393061324
Change-Id: I35e0e20134c556cd8e6e7be322aa8acac25f8295
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6291325
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2025-02-25 07:53:30 -08:00
Alex Rudenko 5b4d9e062d [cleanup] remove AI assistance docs and interaction test setup
Since we are not using them.

Bug: none
Change-Id: I4428cf1a26d422ef6c0e4840122780a037550fc0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6268787
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2025-02-14 05:53:59 -08:00
Alex Rudenko 2bb7afadb6 Remove default retries for tests in CI
This CL removes retries for test failures during the main test
run and let's the flakiness exoneration step run the failed tests
with retries.

This CL also adds a test argument called `--retries` that configures
the number of retries for failed tests for all mocha-based tests.

Bug: none
Change-Id: Id06756151cf3aeddd35db1d64dc426daa4720522
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6257655
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2025-02-13 01:38:54 -08:00
Adriana Ixba 2e3ced92c6 [RPP] Remove 3p experiment
Bug:394000756
Change-Id: I0aa783c7623e9853477a8e576b05af9b12b8b32e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6230097
Commit-Queue: Adriana Ixba <aixba@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2025-02-10 15:09:20 -08:00
Kateryna Prokopenko 938aa9507c [GM3Restyling] Update devtools-select-menu dialog styles
Screenshot: https://imgur.com/a/1XQrOUM

Bug: 325442935
Change-Id: Iddaf7997ad02e1baa4927c4be5ec550bec1ba495
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6243806
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2025-02-10 06:24:19 -08:00
Kateryna Prokopenko 8e13637631 [GM3Restyling] Update Recorder > export dialog menu
Screenshot: https://imgur.com/a/KwJ4fEY

Bug: 325442935
Change-Id: Iadde1e6ae1a93be7e803cbaaf10d2fb6a93d35ac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6243679
Auto-Submit: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2025-02-10 01:35:50 -08:00
Kateryna Prokopenko cd29a45936 [GM3Restyling] Update Dialog and Shortcut Dialog styles
Remove unused styles as a drive-by

Screenshot: https://imgur.com/a/EC1uLNX

Bug: 325442935
Change-Id: I1ffc8339c761277e83a5c96002045bd6201e1665
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6243196
Auto-Submit: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2025-02-07 06:15:49 -08:00
Jack Franklin 9e0bf01010 RPP: improve LCP fetchpriority text
This CL updates the LCPDiscovery component to show specific text for
when fetchpriority should be applied to make it clear to the user what
we are suggesting.

Fixed: 394009056
Change-Id: I6588b3ed3b7327c94cd84f052370a3a89595adf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6235031
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2025-02-06 09:34:08 -08:00
Connor Clark 734f98ed16 [RPP] Define common checklist type, component type for insights
Bug: 394402056
Change-Id: I2a0eae4b120678663b143cab6b6292d48df93847
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6235989
Commit-Queue: Paul Irish <paulirish@chromium.org>
Auto-Submit: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2025-02-05 14:59:23 -08:00
Adam Raine 862f232c4f [RPP] Always show insights tab in the sidebar
Justification:

- It's not super clear that disabling the insights tab means all the
  insights are passing.
- The information in passed insights can be somewhat useful
- If there aren't any insights then there probably isn't anything
  worth annotating either.
- Auto switching to annotations tab makes annotations the default
  tab for the next trace loaded, which could have useful insights.

This does not affect the behavior of RPP when dealing with the brief
pre-navigation period before record and reload runs. This <50ms
period will still be excluded from the insight set entirely.

Bug: None
Change-Id: Ic224b5048446b84b6cbe76d2512607c33614c5a3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6220265
Auto-Submit: Adam Raine <asraine@chromium.org>
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
2025-02-05 14:04:38 -08:00
Paul Irish 085d08c71e RPP: Fix 3P table scrolling, plus Summary tab polish
- Scrolling was mostly buggy due to a hardcoded row height in DataGrid (20), whereas our rows were not. It's dynamic now and doesn't force a layout thrash either.
- All of TimelineTreeView styles have been in timelinePanel.css, but due to shadow DOM, the 3P table wasn't using them. This lead to some unpredictability. Now, 3PTTV extends the component _and_ its styles.
  - This included moving 3P table styles from timelineSummary.css to timelinePanel.css. That said, I've adjusted 60% of those styles, too.
- Reduced DOM complexity of the summary: fewer containers, removed use of slots. Also removed a div within .entity-badge
- A few renames to help distinguish Details (the pane with tabs), Summary (the first tab which is often used to show the _details_ of a trace event), the Category Summary (the Scripting/Rendering/etc numbers), and Range Summary (a container holding the Category Summary and 3P table, side by side)
- Pixel-perfect vertical rhythm, matching mocks: https://screenshot.googleplex.com/C2Pkr5anVgU3F5o (That was fun :)
- Changed how layout of the bottom-up button works, to get more predictable layout behavior.

Change-Id: Ia92a4a78e17813e1ce9c64d313e2a978f9aaf7d5
Bug: 388458798
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6221821
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Adriana Ixba <aixba@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2025-02-03 02:30:53 -08:00
Andrés Olivares a95dd05312 Resize network flamechart to preferred height when toggling custom tracks
I noticed a bug where the network flamechart would break if it was open
at the time the custom tracks setting is toggled. Calling
`TimelineFlameChartView::resizeToPreferredHeights` ensures this behavior
doesn't happen.

Bug: none
Change-Id: I9e76d3810ff517fbd2c46384f7c7b2e673d5c450
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6216143
Auto-Submit: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2025-01-31 06:58:08 -08:00
Danil Somsikov ca20b6e1d0 Remove ui/components/data_grid and new in the devtools-new-data-grid
Bug: 390346490
Change-Id: I6dd392e030b1077f437e298e7b00c150978a11e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6218251
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2025-01-31 04:30:15 -08:00
Connor Clark cf39c83636 [RPP] Include main thread events in Third Parties related events
Also, improve the summarizing function: where before if there was no
network request for a given trace bounds, no main thread activity would
be accounted for in the insight. Now, 3p info is summarized in two
passes: first looking at the main thread activity, and then looking at
the provided network requests.

Should have no impact on ThirdPartyTreeView, as that currently uses a
parallel interface for getting 3p information.

Bug: 352244718
Change-Id: I2774071d0334755f3c4df8ff9995e56e8d12e3e7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6209308
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Adam Raine <asraine@chromium.org>
Auto-Submit: Connor Clark <cjamcl@chromium.org>
2025-01-28 15:22:58 -08:00
Adam Raine d7b27d5471 [DOM Size] Adjust thresholds based on statistical analysis
Bug: 372897811
Change-Id: I135ea23fa3b0d1b414b25c37a0cf23fbaa7bad95
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6192924
Commit-Queue: Adam Raine <asraine@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2025-01-23 16:59:22 -08:00
Andrés Olivares f9d14a3967 Simplify handling of custom track setting change in Perf panel
Toggling the setting used to call a bunch of methods from
TimelineFlameChartView to rebuild the timeline to include/exclude
custom tracks. Thus it was hard to keep track of the functions
that needed to be called to ensure all UI items are reset and rebuilt
properly. For this reason, overlays weren't being rebuilt after the
setting was toggled.

This CL aims to simplify this by extracting the methods that build the
data in TimelineFlameChartView into a dedicated `refresh` method, which
is called when the trace model is set and when the setting is toggled.

Drive-by: make TimelinePanel more unit test friendly by accepting a trace model on instantiation and update old screenshot tests.

Fixed: 391328289
Change-Id: If9b89a36183821f28f7e8c8199eae84cc4d979ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6179454
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2025-01-23 08:50:33 -08:00
Jack Franklin b1b834b0a1 RPP: rename time unit types and constructors
- MicroSeconds to Micro
- MilliSeconds to Milli
- TraceWindowMicroSeconds to TraceWindowMicro
- TraceWindowMilliSeconds to TraceWindowMilli

Bug: none
Change-Id: I1e2ce7bacb985aba644f0d61d230338cec5e51a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6191870
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Nancy Li <nancyly@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2025-01-23 02:46:13 -08:00
Connor Clark b9ec6d9774 [RPP] Display field metrics in insights tab
https://i.imgur.com/DIcZ2vE.png (local + field)
https://i.imgur.com/vL7vk2C.png (just local)

Bug: 368135130
Change-Id: I9b7d9f2bfbc3ce01c4cbbcc051d6b0cf3e0f8b30
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6169823
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2025-01-21 16:47:01 -08:00
Wolfgang Beyer 09852e31c5 Use heading elements for headings in MarkdownInsightRenderer
Use HTML heading elements instead of `<strong>` for rendering
markdown headings in the MarkdownInsightRenderer. All `<h1>` - `<h6>`
tags are styled to match the previous `<strong>` styling.

Bug: 365835615
Change-Id: I07cf6189c3c3124fbbdd42098e2cf6ddd08f6c69
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6179443
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2025-01-20 23:02:26 -08:00
Adam Raine 499a9ed324 [RPP] Add related elements to DOM size insight
https://screenshot.googleplex.com/77JSbU8uKGZ9YGC

This also removes the DOM size insight from the experimental list since
it is now feature-complete.

Bug: 372897811
Change-Id: Id66bcd103fcaef4569d111ef787cd6582b873d54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6182528
Commit-Queue: Adam Raine <asraine@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2025-01-17 15:02:03 -08:00
Adriana Ixba cddabc8b69 [RPP] Create 3p table in summary pane
This is the first pass on the table, it uses the trace's entityMapper
data to create the summaries. Additional table features will be added
in follow ups

https://screencast.googleplex.com/cast/NDYwNjAxNzQ3OTM3Njg5NnwzM2FmZmRmOC0zMg

Bug:383567961
Change-Id: I11e37f9bddcb5e0cf8ceab355d16a69de8f32245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6100546
Commit-Queue: Adriana Ixba <aixba@chromium.org>
Reviewed-by: Adam Raine <asraine@chromium.org>
2025-01-15 10:07:21 -08:00
Nikolay Vitkov 44e3006b85 [eslint] Prefer TypeScript interface over type aliases.
We have a mix of `type` and `interface` usage throughout our codebase,
that is sometimes difficult to follow and reason about. We should follow
the suggestion from the TypeScript PM and use `interface` consistently
where possible. This leads to better type display in errors and makes
our codebase easier to read (b/c consistency).

This CL adds the `@typescript-eslint/consistent-type-definitions`
ESLint rule to accomplish this.

Fixed: 387237537
Change-Id: Idb9e8275ddd8f633021d6cf1c933e2e55f980e45
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6152576
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-08 01:14:10 -08:00
Jack Franklin 9ce0d9a0b6 RPP: select the event when an annotation label is clicked
With this CL when a user clicks on an annotation label in the timeline
we now will select the associated entry. This is a useful change because
when the event is small it can be hard to select, especially when zoomed
out. But the label is always going to be (relatively) large compared to
the event, so let's allow them to click the label.

Bug: 383120286
Fixed: 388224764
Change-Id: Ia58c2ffd8e075087480e651e31e0fea186039a54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148172
Reviewed-by: Alina Varkki <alinavarkki@chromium.org>
Commit-Queue: Alina Varkki <alinavarkki@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2025-01-07 05:58:20 -08:00
Nikolay Vitkov 937f463144 Revert "[eslint] Prefer TypeScript interface over type aliases."
This reverts commit af6c6337aa.

Reason for revert: The latest version of EsLint v9 does not work with the plugin added here, also the rule does more that just change shape objects from type to interface.

Original change's description:
> [eslint] Prefer TypeScript `interface` over type aliases.
>
> We have a mix of `type` and `interface` usage throughout our codebase,
> that is sometimes difficult to follow and reason about. We should follow
> the suggestion from the TypeScript PM and use `interface` consistently
> where possible. This leads to better type display in errors and makes
> our codebase easier to read (b/c consistency).
>
> This CL adds the `etc/prefer-interface` ESLint rule to accomplish this.
>
> Fixed: 387237537
> Change-Id: Idd6775094ba94b8397f626191788437f6b156dc6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6135001
> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
> Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>

Bug: 387237537
Change-Id: I6ecf18bfdaa4ad9efb17f0801def528035f9e703
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6140555
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-03 09:42:50 -08:00
Benedikt Meurer af6c6337aa [eslint] Prefer TypeScript interface over type aliases.
We have a mix of `type` and `interface` usage throughout our codebase,
that is sometimes difficult to follow and reason about. We should follow
the suggestion from the TypeScript PM and use `interface` consistently
where possible. This leads to better type display in errors and makes
our codebase easier to read (b/c consistency).

This CL adds the `etc/prefer-interface` ESLint rule to accomplish this.

Fixed: 387237537
Change-Id: Idd6775094ba94b8397f626191788437f6b156dc6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6135001
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2025-01-02 03:42:22 -08:00
Benedikt Meurer 5cb9f987f7 Disallow equality assertions with boolean, null, and undefined.
Require the more descriptive `assert.isTrue`, `assert.isFalse`,
`assert.isNull`, `assert.isUndefined`, and friends instead, which also
produce a more meaningful error message than the generic
`assert.strictEqual`, `assert.deepEqual`, and friends.

Bug: 386335487
Change-Id: Ic58a07381196c358a43857b53364d74076e9c7e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6113833
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2024-12-30 00:32:53 -08:00
Benedikt Meurer 3dffd37833 Consistently use assert.deepEqual instead of assert.deepStrictEqual.
Previously we have been a bit sloppy with sometimes using one or the
other. In Chai both methods perform exactly the same comparison, but
the name `deepStrictEqual` can be a bit confusing to developers not
familiar with the Chai implementation, and particularly might leave
you wondering what exactly is *strict* about this method.

Fixed: 386330115
Change-Id: Idda55ee784b01cce650996ab3d56f76e220e6b2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110227
Commit-Queue: Samiya Caur <samiyac@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Samiya Caur <samiyac@chromium.org>
2024-12-27 04:38:55 -08:00
Benedikt Meurer 586a9a5908 [eslint] Adopt ESLint Rule Naming Conventions.
Update our custom ESLint rules to follow the official naming
conventions[^1], in particular the rule names need to

1. consistently use dashes to separate words (rather a mix of
   underscores and dashes), and
1. consistently use `no-` prefix for rules that disallow something.

Drive-by-fix: Also remove the `fixable` setting from rules that don't
provide a fix.

This is a functionally neutral change.

[^1]: https://eslint.org/docs/latest/contribute/core-rules#rule-naming-conventions

Fixed: 386319581
Change-Id: Ifcb6c0e4ca8334a263be6534596c30b3bcca243b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110726
Reviewed-by: Samiya Caur <samiyac@chromium.org>
Commit-Queue: Samiya Caur <samiyac@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2024-12-27 02:54:56 -08:00
Marcel Pütz 12055dd0ff [GM3Restyling] Update tab bars
This is not yet moving the icons to the right, as intended in the designs. This is because for the settings and the vertical layout, we need the icons on the left. After this CL we can refactor it two allow icons on both sides.

Before: https://imgur.com/9lf6UGZ
After: https://imgur.com/a/YEHoNT9
Bug: 325442723
Change-Id: Ie2bd99726e767598258d3c8d34d648ba793ca781
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6089109
Reviewed-by: Nancy Li <nancyly@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Marcel Pütz <marcelpuetz@chromium.org>
2024-12-20 04:25:26 -08:00
Adriana Ixba 7cbc6609a0 [RPP] Bring back DCL and L markers
https://screenshot.googleplex.com/6zv3Yrvgtz3Sf2f

Bug:384980553
Change-Id: If078e81d37a047f2375df3dc87714ee87531ae4a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6107674
Commit-Queue: Adriana Ixba <aixba@chromium.org>
Reviewed-by: Adam Raine <asraine@chromium.org>
2024-12-19 17:00:44 -08:00
Kim-Anh Tran 454310e0e8 [GM3Restyling] Update IconDialog to use ButtonDialog
This switches the usage of IconDialog to ButtonDialog and makes a few
padding changes, and removes the now obsolete IconDialog.

Before: https://i.imgur.com/Oj2qOSW.png
After: https://i.imgur.com/Piaam45.png

Bug: 383278166, 379036632
Change-Id: I58bbcdcf09f1f295904a48f27daad715de387004
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110475
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Nancy Li <nancyly@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
2024-12-19 04:44:28 -08:00
Nancy Li 148fd10a9b [GM3Restyling] Remove the showConnector property in Dialog component
Will remove the usage in the following CL

Bug: 383278166
Change-Id: Idc456c2aedc83f8d96364b921601430dd5454f36
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6085436
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
2024-12-17 06:27:33 -08:00
Nancy Li 1906c4c343 [GM3Restyling] Update the dialog's header/buttons row
Also added more example in components server
See design here: https://www.figma.com/design/A5iQBBNAe5zPFpJvUzUgW8/Chrome-DevTools-Design-Kit?node-id=3653-3002&m=dev

Bug: 383278166
Change-Id: Iac70968af04b967ae5ec1f5bce0fe04b37096fa3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6084416
Commit-Queue: Nancy Li <nancyly@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2024-12-17 06:25:07 -08:00
Connor Clark a7d0715424 [RPP] Remove all markers from minimap, but add nav start
These markers are really noisy, so we decided to remove them. But adding
NAV since it seems useful to see how the trace is broken up into
navigations at-a-glance.

The minimap component attempted to render the NAV markers, but since
they were not marked as "tall" it never rendered.

Also align the color used for the navigationStarted event type to be the
same as the marker color (black, not orange). Similar for the other
page load metrics.

Bug: 383368162
Change-Id: I75eed42d8ab33e27d8205dc560bf7d95371a652c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6084879
Commit-Queue: Connor Clark <cjamcl@chromium.org>
Reviewed-by: Adriana Ixba <aixba@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2024-12-11 11:27:06 -08:00
Alex Rudenko 786bd42909 [AI Assistance] Renames and refactorings
Fixed: 380044548
Change-Id: I0c71417a8189a728ff10e9b6504a9887e3f26652
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6080811
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-12-10 11:47:32 +00:00
Connor Clark 6bef38aa90 [RPP] Remove insights experiment
We shipped this months ago.

Bug: 366379943
Change-Id: I6829531ac2cc53b8595ea0f5265471b5a0e3f7fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6072708
Auto-Submit: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
Reviewed-by: Paul Irish <paulirish@chromium.org>
2024-12-05 22:01:49 +00:00
Andrés Olivares 5d90540f1c [RPP] Generalize JS async call initiator relationships
By using the output of the AsyncCallStacksHandler. One noticeable change
from the UI is that since we don't need specific JS entrypoints for
these events (setTimeout: InstallTimer -> TimerFire, rAF:
RequestAnimationFrame -> AnimationFrameFired, etc.), the initiated
arrows now follow this pattern:

js call -> FunctionCall. Where js call is the profile call for the
scheduling function (e.g. setTimeout or requestAnimationFrame) and
FunctionCall is the entry point for the JS task that was scheduled.

I'd argue an improvement because we are consistent across JS
schedulers, without the need for specific entrypoints for each
scheduler.

Bug: 381391955
Change-Id: I687b2c00104dde8d942b68508cfca0f072224499
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6054289
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2024-12-02 09:28:27 +00:00
Connor Clark eadd2d5f27 [RPP] Hide insight set if there is nothing to show
Bug: 371615739
Change-Id: I8a635201f36bb34870dfb3d3105f99dab4fca1d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6037380
Reviewed-by: Adam Raine <asraine@chromium.org>
Auto-Submit: Connor Clark <cjamcl@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
2024-11-26 20:33:24 +00:00
Adriana Ixba 49bc047d10 [RPP] Replace timings markers with new ones
This creates a new overlay for LCP, Nav, and FCP timings events as per
UI mocks. CLS and INP will be added on a follow-up.

This includes making these markers clickable, and hoverable with a
tooltip.

https://screencast.googleplex.com/cast/NTUwNjQ1Nzk0MzQwODY0MHw5NTExYWE1Zi0zYQ

Bug:374191612
Change-Id: I412f7fe896adf453b53efce7f41bb0dcf4c1307f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6001801
Commit-Queue: Adriana Ixba <aixba@chromium.org>
Reviewed-by: Connor Clark <cjamcl@chromium.org>
2024-11-26 18:42:10 +00:00
Nancy Li cbde6b1e42 Update shortcut dialog to use new ButtonDialog component
Bug: 379036632
Change-Id: I611a2b99febfa99043a4b42ef1141d6370ba8510
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6023184
Reviewed-by: Alina Varkki <alinavarkki@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
2024-11-22 19:24:42 +00:00