Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/api/class-browsercontext.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ await context.CloseAsync();

This event is not emitted.

## event: BrowserContext.bringToFront
## event: BrowserContext.pickLocator
* since: v1.60
- argument: <[Page]>

Emitted when a client calls [`method: Page.bringToFront`] on a page in this context. The event is dispatched to all
Emitted when a client calls [`method: Page.pickLocator`] on a page in this context. The event is dispatched to all
clients connected to the context, including the one that initiated the call.

## property: BrowserContext.clock
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ const reactFiles = [
`packages/recorder/src/**/*.tsx`,
`packages/trace-viewer/src/**/*.ts`,
`packages/trace-viewer/src/**/*.tsx`,
`packages/dashboard/src/**/*.ts`,
`packages/dashboard/src/**/*.tsx`,
`packages/web/src/**/*.ts`,
`packages/web/src/**/*.tsx`,
];
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

255 changes: 255 additions & 0 deletions packages/dashboard/src/annotations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

.annotation-layer {
position: absolute;
inset: 0;
z-index: 5;
outline: none;
cursor: crosshair;
}

.annotation-layer::after {
content: '';
position: absolute;
inset: 0;
pointer-events: none;
box-shadow: inset 0 0 0 1px rgb(var(--annotate-blue) / 0.72), inset 0 0 26px rgb(var(--annotate-blue) / 0.28);
}

.annotation-toolbar {
position: absolute;
top: 8px;
right: 8px;
display: inline-flex;
gap: 6px;
padding: 6px;
background: var(--color-canvas-overlay);
border: 1px solid var(--color-border-muted);
border-radius: 999px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
z-index: 20;
cursor: default;
}

.annotate-action-btn {
height: 26px;
padding: 0 12px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.03em;
text-transform: uppercase;
background: var(--color-neutral-subtle);
color: var(--color-fg-default);
border: 1px solid var(--color-border-muted);
border-radius: 999px;
cursor: pointer;
line-height: 1;
}

.annotate-action-btn:hover:not(:disabled) {
background: var(--color-neutral-muted);
}

.annotate-action-btn:disabled {
opacity: 0.5;
cursor: default;
}

.annotate-action-btn.primary {
background: rgb(var(--annotate-blue));
color: #fff;
border-color: transparent;
}

.annotate-action-btn.primary:hover:not(:disabled) {
background: rgb(var(--annotate-blue) / 0.85);
}

.annotate-action-btn.danger {
background: transparent;
color: var(--color-danger-fg);
border-color: var(--color-border-muted);
}

.annotate-action-btn.danger:hover:not(:disabled) {
background: var(--color-danger-subtle);
}

.annotation-rect {
position: absolute;
box-sizing: border-box;
border: 2px solid rgb(var(--annotate-blue));
background: rgb(var(--annotate-blue) / 0.12);
cursor: pointer;
transition: box-shadow 120ms ease;
}

.annotation-rect:hover {
box-shadow: 0 0 0 3px rgb(var(--annotate-blue) / 0.25);
}

.annotation-rect.selected {
box-shadow: 0 0 0 3px rgb(var(--annotate-blue) / 0.4);
border-style: solid;
border-color: rgb(var(--annotate-blue));
cursor: move;
}

.annotation-rect.draft {
border-style: dashed;
background: rgb(var(--annotate-blue) / 0.18);
pointer-events: none;
}

.annotation-handle {
position: absolute;
width: 10px;
height: 10px;
background: #fff;
border: 1.5px solid rgb(var(--annotate-blue));
border-radius: 2px;
box-sizing: border-box;
z-index: 1;
}

.annotation-handle-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.annotation-handle-n { left: 50%; top: -6px; margin-left: -5px; cursor: ns-resize; }
.annotation-handle-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.annotation-handle-e { right: -6px; top: 50%; margin-top: -5px; cursor: ew-resize; }
.annotation-handle-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.annotation-handle-s { left: 50%; bottom: -6px; margin-left: -5px; cursor: ns-resize; }
.annotation-handle-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.annotation-handle-w { left: -6px; top: 50%; margin-top: -5px; cursor: ew-resize; }

.annotation-label {
position: absolute;
top: -2px;
left: -2px;
max-width: calc(100% + 4px);
padding: 2px 6px;
background: rgb(var(--annotate-blue));
color: #fff;
font-size: 11px;
font-weight: 500;
border-radius: 2px 2px 2px 0;
transform: translateY(-100%);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: text;
}

.annotation-label:hover {
background: rgb(var(--annotate-blue) / 0.85);
}

.annotation-popover {
position: absolute;
min-width: 220px;
max-width: 320px;
background: var(--color-canvas-overlay);
border: 1px solid var(--color-border-default);
border-radius: 8px;
padding: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
gap: 6px;
z-index: 10;
cursor: default;
}

.annotation-textarea {
width: 100%;
min-height: 64px;
resize: vertical;
padding: 6px 8px;
font-family: inherit;
font-size: 12px;
color: var(--color-fg-default);
background: var(--color-canvas-default);
border: 1px solid var(--color-border-muted);
border-radius: 6px;
outline: none;
box-sizing: border-box;
}

.annotation-textarea:focus {
border-color: rgb(var(--annotate-blue));
}

.annotation-popover-actions {
display: flex;
gap: 6px;
justify-content: flex-end;
}

.annotation-modal-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
cursor: default;
}

.annotation-modal {
width: min(520px, 92%);
max-height: 80%;
background: var(--color-canvas-default);
border: 1px solid var(--color-border-default);
border-radius: 10px;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
display: flex;
flex-direction: column;
overflow: hidden;
}

.annotation-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid var(--color-border-muted);
font-size: 13px;
font-weight: 600;
color: var(--color-fg-default);
}

.annotation-modal-text {
flex: 1;
min-height: 200px;
padding: 12px 16px;
font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
font-size: 12px;
color: var(--color-fg-default);
background: var(--color-canvas-subtle);
border: none;
outline: none;
resize: none;
white-space: pre;
}

.annotation-modal-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 10px 16px;
border-top: 1px solid var(--color-border-muted);
}
Loading
Loading