Commit graph

128 commits

Author SHA1 Message Date
Simon Knott 008722b2d9
cherry-pick(#33797): fix(trace): in indexTree check isVisible before adding to result (#33797) 2024-11-28 14:13:29 +01:00
Pavel Feldman 2a00ca8453 cherry-pick(#33635): chore: add cm placeholder text 2024-11-15 16:59:49 -08:00
Pavel Feldman 649e0e0235
chore: nicer cm widgets for aria (#33524) 2024-11-11 09:40:50 -08:00
Pavel Feldman 503f74da90
chore: allow editing aria template in recorder (tests) (#33522) 2024-11-08 17:18:51 -08:00
Pavel Feldman b021b58379
chore: allow editing aria template in recorder (#33482) 2024-11-08 07:43:01 -08:00
Simon Knott 0d92737a07
chore(web): replace static ID with React.useId (#33474) 2024-11-06 14:42:48 +01:00
Simon Knott f554f42b82
feat(trace viewer): link from attach action to attachment tab (#33265) 2024-11-06 10:22:15 +01:00
Pavel Feldman a655b0bfb3
chrome: aria api review (#33458) 2024-11-05 15:23:38 -08:00
Pavel Feldman 80bd246543
chore: use React.useId for a11y (#33402) 2024-11-01 13:38:16 -07:00
Pavel Feldman 74e5e5560f
chore: update missing snapshots by default (#33311) 2024-10-25 16:13:38 -07:00
Pavel Feldman 6bfdad068c
chore: introduce accessibility tab in recorder (#33235) 2024-10-22 16:36:03 -07:00
Pavel Feldman 2a3d67195d
chore: use aria snapshots in some ui mode tests (#33212) 2024-10-21 21:54:06 -07:00
Pavel Feldman 2e8e7a66cd
chore: implement tree w/o list (#33169) 2024-10-18 13:50:43 -07:00
Pavel Feldman 623a8916f9
chore: implement tree w/o list (#33167) 2024-10-17 16:57:45 -07:00
Pavel Feldman 6cfcbe0d6d
chore: fix codegen selector while debugging (#33099)
Fixes #33052
2024-10-14 14:04:24 -07:00
Pavel Feldman 6c9823eeaf
chore: allow minimal height for trace attachments (#32996) 2024-10-08 08:33:45 -07:00
Pavel Feldman 8649b13f25
chore: start putting tv-recorder ui together (#32776) 2024-09-23 19:13:45 -07:00
Max Schmitt 4c31a8289f
feat(trace-viewer): add network requests 'copy as cURL' button (#32627) 2024-09-18 14:35:11 +02:00
Simon Knott b599335404
chore(ui): enable react/recommended lint rules (#32214)
Closes https://github.com/microsoft/playwright/issues/32159. I
originally set out to enable Strict Mode for our React UI, but found a
way better thing: Enabling the lint rules we had already installed!

`eslint-plugin-react` is already in of our `package.json`, and this PR
enables it and fixes some of the reported issues. Most of them are
around the `key` prop which is mostly about performance, but there's
also fixes for misspelled `data-testid` props.
2024-08-20 14:16:28 +02:00
Pavel Feldman 80e014f4b6
chore: sources tab render polish (#32055) 2024-08-08 10:53:59 -07:00
Simon Knott 17bb36a7fe
fix(ui): reset higlighted action on keyboard navigation (#32051)
Closes https://github.com/microsoft/playwright/issues/32050

When keyboarding through the action view, the UI continues showing the
hovered action. This makes keyboard nav hard to use.

The fix is to reset the higlighted action on keyboard navigation. This
is what we do when the mouse pointer leaves an action, and what I think
is reasonable.
2024-08-08 10:06:36 +02:00
Pavel Feldman 79ca3f28c5
chore: simplify useSetting to not rely on useSyncExternalStore (#32018) 2024-08-06 14:30:15 -07:00
Yury Semikhatsky 5a80ddfaf9
chore: remove bright counter from sidebar tab selector (#31975)
Removing the following icon:

![image](https://github.com/user-attachments/assets/d2de2ed0-f66e-4452-8763-aad1b6e7bb79)

HTML `options` element cannot be styled, so just removing the counter in
sidebar mode:

<img width="348" alt="image"
src="https://github.com/user-attachments/assets/d636dca2-5007-41f7-866e-3a0f604d46fc">
2024-08-01 16:18:10 -07:00
Dmitry Gozman a541751657
feat(ui mode): linkify attachment names and content (#31960)
- Pass `contentType` to the CodeMirror.
- Support `text/markdown` mode.
- Custom mode for non-supported types that linkifies urls.
2024-08-01 09:27:45 -07:00
Simon Knott daca1681c0
refactor(ui): in splitview component, move sidebar and main from children into named properties (#31925)
Pulled out from https://github.com/microsoft/playwright/pull/31900

I stumbled over `React.Children`, because it's the first time I saw that
used. https://react.dev/reference/react/Children lists `React.Children`
it as "Legacy" and mentions it's uncommon. Also, the fact that SplitView
only displays its first two children, and all others are silently
discarded, can be a surprise to some.

By separating things out into `sidebar` and `main`, not only do we give
the two elements names (otherwise one needs to remember that sidebar is
always the first child), but we also prevent any "third children" from
being dropped.
2024-07-31 12:48:46 +02:00
Simon Knott 99724d0322
refactor(ui): some react refactorings (#31900)
Addresses https://github.com/microsoft/playwright/issues/31863. This PR
is chonky, but the individual commits should be easy to review. If
they're not, i'm happy to break them out into individual PRs.

There's two main things this does:

1. Remove some unused imports
2. Add a `clsx`-inspired helper function for classname templating

I wasn't able to replace `ReactDOM.render` with `ReactDOM.createRoot`.
This is the new recommended way starting with React 18, and the existing
one is going to be deprecated at some point. But it somehow breaks our
tests, i'll have to investigate that separately.
2024-07-31 12:12:06 +02:00
Simon Knott b8b562888e
refactor(ui): synchronize settings via useSyncExternalStore instead of prop drilling (#31911)
Broken out from https://github.com/microsoft/playwright/pull/31900, part
of https://github.com/microsoft/playwright/issues/31863.

Synchronizes different `useSettings` calls via `useSyncExternalStore`.
This saves us from having to drill down settings props everywhere,
without the big refactoring that a `Context` would be.
2024-07-30 17:57:31 +02:00
Dmitry Gozman f232507afa
feat(ui mode): ui updates (#31894)
- Update copy to clipboard button.
- Reveal test source in the Source tab instead of external editor.
- New button to reveal in the external editor in the Source tab.
- Move the Pick Locator button next to snapshot tabs.
2024-07-29 07:32:13 -07:00
Dmitry Gozman a41cebc1c9
feat(ui mode): introduce Testing Options and Settings (#31841)
Testing Options control tests, while Settings are UI mode settings.

<img width="298" alt="Screenshot 2024-07-25 at 10 54 22 AM"
src="https://github.com/user-attachments/assets/7b6f5fff-687b-48d1-80b3-d1e6f2a257e8">


These sections are separately expandable, collapsed by default.

<img width="294" alt="Screenshot 2024-07-24 at 2 06 25 PM"
src="https://github.com/user-attachments/assets/5d35ac8c-9289-46ca-aaa2-ebc5419fa0c4">

References #31520.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Simon Knott <info@simonknott.de>
2024-07-25 11:23:43 -07:00
Dmitry Gozman d87cb7a303
feat(trace viewer): allow hiding route actions (#31726)
Adds a new settings tab above the actions list.

<img width="307" alt="settings tab"
src="https://github.com/user-attachments/assets/792212b7-e2fd-4a5c-8878-654e2e060505">

Toggling the "Show route actions" checkbox hides all route calls:
`continue`, `fulfill`, `fallback`, `abort` and `fetch`.

References #30970.
2024-07-22 11:34:34 -07:00
Max Schmitt 6dbc7b54e8
feat(ui-mode): highlight console message in timeline on hover (#31756) 2024-07-18 16:39:40 +02:00
Yury Semikhatsky 9a11be3305
chore(trace-viewer): grid view z-index, source column in resource details (#31094)
New look for multiple contexts:

<img width="585" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/02dc5f54-0946-40a9-9459-942c4362a32e">
2024-05-30 14:45:33 -07:00
Yury Semikhatsky 4c020c9861
chore(trace-viewer): preserve column widths after showing resource details (#31093)
* Column widths are now stored on in the NetworkPanel context, this way
they are not reset after selecting an empty range (and changing position
of the NetworkGridView in the component tree).
* Column widths values are now preserved if column set changes (e.g.
selecting entries from a single context and then from multiple
contexts).
2024-05-30 12:21:32 -07:00
Pavel Feldman 8a1ff34578
chore: split ui mode view into files (#30029) 2024-03-20 16:00:35 -07:00
Pavel Feldman 020a39860d
chore: polish network panel highlight (#29299)
Fixes https://github.com/microsoft/playwright/issues/29287
2024-02-01 13:44:26 -08:00
Pavel Feldman 1db18711a2
fix(ct): move import list into the compilation cache data (#28986) 2024-01-16 19:31:19 -08:00
Pavel Feldman a0750b7854
chore: network panel polish (#28924) 2024-01-10 15:28:33 -08:00
Pavel Feldman f5c57d0e98
chore: reuse image diff component in trace/html (#28727)
Fixes https://github.com/microsoft/playwright/issues/28685
2023-12-22 10:17:35 -08:00
Pavel Feldman 1b3349d091
chore: use codemirror in the on-hover locator editor (#28090) 2023-11-10 22:00:28 -08:00
Pavel Feldman 061ded19b6
chore: place overlay inside the glass pane (#28026) 2023-11-07 19:36:12 -08:00
Dmitry Gozman ffd2e02aa3
feat(recorder): various UX fixes (#27967) 2023-11-04 21:18:27 -07:00
Max Schmitt 08b8181632
chore: make Trace Viewer start page AAA compliant (#27879) 2023-10-31 16:35:13 +01:00
Luigi Colombi 3127765bde
chore: add curly space to fix eslint run (#27858) 2023-10-30 12:05:48 +01:00
Pavel Feldman 462e70ab82
chore: render sidebar tab selector as drop down (#27844) 2023-10-27 15:31:31 -07:00
Pavel Feldman ff206bd9c1
chore: render time in the trace viewer log (#27825) 2023-10-26 14:45:15 -07:00
Pavel Feldman 70dbb9d83a
feat(trace): allow navigating from error to source (#27464) 2023-10-05 14:59:59 -07:00
Pavel Feldman c914d62c69
chore: nicer network grid header (#27102) 2023-09-15 09:16:29 -07:00
Pavel Feldman 97b3625049
chore: polish ui mode for better mac appearance (#27008) 2023-09-11 19:01:00 -07:00
Pavel Feldman 7c838653d6
chore: fix the split view, reset window on timeline click (#27007) 2023-09-11 18:16:02 -07:00
Pavel Feldman 8ba8c9385d
chore: keep split positions when zooming (#26942) 2023-09-08 12:30:08 -07:00