blob: 1905258cc4817e6130efec34e24a24da789adc22 [file]
/*
* Copyright 2026 The Chromium Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@scope to (devtools-widget > *) {
.comments-container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
overflow: hidden;
}
.comments-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
height: var(--sys-size-13);
padding: 0 var(--sys-size-5);
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
background-color: var(--sys-color-surface1);
flex-shrink: 0;
}
.toolbar-left {
display: flex;
align-items: center;
height: 100%;
gap: var(--sys-size-8);
padding-left: var(--sys-size-3);
}
.tab-button {
position: relative;
display: flex;
align-items: center;
height: 100%;
padding: 0 var(--sys-size-2);
border: none;
background: transparent;
color: var(--sys-color-on-surface-subtle);
font-size: var(--sys-typescale-body4-size);
font-weight: var(--ref-typeface-weight-regular);
cursor: pointer;
}
.tab-button:hover {
color: var(--sys-color-on-surface);
}
.tab-button:focus-visible {
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
outline-offset: calc(-1 * var(--sys-size-2));
}
.tab-button.active {
color: var(--sys-color-primary);
font-weight: var(--ref-typeface-weight-bold);
}
.tab-button.active::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: var(--sys-size-2);
background-color: var(--sys-color-primary);
border-radius: var(--sys-shape-corner-full) var(--sys-shape-corner-full) 0 0;
}
.toolbar-button {
display: flex;
align-items: center;
justify-content: center;
width: var(--sys-size-11);
height: var(--sys-size-11);
padding: 0;
border: none;
background: transparent;
border-radius: var(--sys-shape-corner-extra-small);
cursor: pointer;
color: var(--sys-color-on-surface-subtle);
}
.toolbar-button:hover {
background-color: var(--sys-color-state-hover-on-subtle);
color: var(--sys-color-on-surface);
}
.toolbar-button:active {
background-color: var(--sys-color-state-ripple-neutral-on-subtle);
}
/* Queued and sent threads share a single scroll area below the toolbar. */
.comments-scroll-container {
/* Offset parent for the sections, so their offsetTop is their scroll position. */
position: relative;
flex: 1;
min-height: 0;
overflow-y: auto;
}
/*
* Only as tall as its content, so the footer follows the last queued row
* when the queue fits in the panel.
*/
.comments-queued-section {
display: flex;
flex-direction: column;
}
.comments-list {
margin: 0;
padding: 0;
list-style: none;
}
/* Extra space between the Send to agent footer and the sent comments separator. */
.comments-sent-section {
margin-top: var(--sys-size-11);
/*
* At least as tall as the panel, so the sent comments can always be
* scrolled to the top of the drawer, even when the content above and the
* sent list itself are short.
*/
min-height: 100%;
}
/*
* Looks like a pane header, but only visually separates the queued comments
* (with their footer) from the comments already sent to the agent.
*/
.comments-sent-separator {
padding: var(--sys-size-3) var(--sys-size-5);
border-top: var(--sys-size-1) solid var(--sys-color-divider);
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
background-color: var(--sys-color-surface1);
color: var(--sys-color-on-surface-subtle);
font-size: var(--sys-typescale-body4-size);
line-height: var(--sys-typescale-body4-line-height);
}
.comment-thread-item {
display: flex;
align-items: center;
gap: var(--sys-size-5);
padding: var(--sys-size-5) var(--sys-size-8);
border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
cursor: pointer;
transition: background-color var(--sys-motion-duration-short4) var(--sys-motion-easing-emphasized);
}
.comment-thread-item:hover {
background-color: var(--sys-color-state-hover-on-subtle);
}
.comment-thread-item:focus-visible {
background-color: var(--sys-color-state-hover-on-subtle);
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
outline-offset: calc(-1 * var(--sys-size-2));
}
.comment-pin-badge {
box-sizing: border-box;
width: var(--sys-size-9);
height: var(--sys-size-9);
margin-right: var(--sys-size-2);
border-radius: var(--sys-shape-corner-full) var(--sys-shape-corner-full) var(--sys-shape-corner-full) var(--sys-shape-corner-extra-small);
border: var(--sys-size-2) solid var(--sys-color-primary);
background-color: var(--sys-color-cdt-base-container);
flex-shrink: 0;
}
.comment-pin-badge.resolved {
border: none;
background-color: var(--sys-color-primary);
}
.comment-thread-item.orphaned .comment-pin-badge {
border-color: var(--sys-color-surface-variant);
}
.comment-thread-item.orphaned .comment-pin-badge.resolved {
background-color: var(--sys-color-surface-variant);
}
.anchor-chip {
display: flex;
height: calc(var(--sys-size-8) + var(--sys-size-2));
padding: var(--sys-size-2) var(--sys-size-4) var(--sys-size-2) var(--sys-size-3);
align-items: center;
border-radius: var(--sys-shape-corner-extra-small);
border: var(--sys-size-1) solid var(--sys-color-divider);
background: var(--sys-color-surface2);
font-family: var(--source-code-font-family);
font-size: var(--monospace-font-size);
color: var(--sys-color-token-tag);
overflow: hidden;
max-width: var(--sys-size-24);
min-width: 0;
flex-shrink: 0;
pointer-events: none;
}
.anchor-chip.orphaned {
border-style: dashed;
border-color: var(--sys-color-neutral-outline);
background: transparent;
color: var(--sys-color-state-disabled);
gap: var(--sys-size-3);
}
.anchor-chip.orphaned .anchor-chip-text {
color: var(--sys-color-state-disabled);
}
.orphaned-label {
flex-shrink: 0;
color: var(--sys-color-on-surface-subtle);
font-family: var(--default-font-family);
font-size: var(--sys-typescale-body5-size);
font-style: italic;
}
.anchor-chip devtools-widget,
.anchor-chip-text {
display: block;
flex: 0 1 auto;
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.comment-text {
flex: 1;
font-size: var(--sys-typescale-body4-size);
line-height: var(--sys-typescale-body4-line-height);
color: var(--sys-color-on-surface);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.thread-status-working,
.thread-status-sent {
display: flex;
align-items: center;
gap: var(--sys-size-4);
color: var(--sys-color-on-surface-subtle);
font-size: var(--sys-typescale-body4-size);
line-height: var(--sys-typescale-body4-line-height);
font-weight: var(--ref-typeface-weight-medium);
white-space: nowrap;
}
.thread-status-sent {
gap: var(--sys-size-2);
}
.check-icon {
width: var(--sys-size-8);
height: var(--sys-size-8);
color: var(--sys-color-on-surface-subtle);
}
.see-response-button {
margin-right: calc(-1 * var(--sys-size-6));
}
.comments-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
/* Fills the panel when there are no comments at all. */
flex: 1;
padding: var(--sys-size-13) var(--sys-size-8);
text-align: center;
}
.comments-empty-state-title {
margin-bottom: var(--sys-size-4);
color: var(--sys-color-on-surface);
font-size: var(--sys-typescale-headline5-size);
line-height: var(--sys-typescale-headline5-line-height);
font-weight: var(--ref-typeface-weight-medium);
}
.comments-empty-state-description {
max-width: var(--sys-size-29);
color: var(--sys-color-on-surface-subtle);
font-size: var(--sys-typescale-body3-size);
line-height: var(--sys-typescale-body3-line-height);
text-wrap: balance;
}
.comments-empty-state-icon {
width: var(--sys-size-8);
height: var(--sys-size-8);
vertical-align: text-bottom;
color: var(--sys-color-on-surface-subtle);
}
.comments-empty-state-link {
margin-top: var(--sys-size-3);
}
/*
* Sticks to the bottom of the panel while the queued rows overflow it, and
* scrolls up with the end of the queued section once the sent rows are reached.
*/
.comments-footer {
position: sticky;
bottom: 0;
z-index: 1;
display: flex;
align-items: center;
justify-content: flex-end;
gap: var(--sys-size-5);
/* Overlap the last queued row's bottom border so only a single divider is shown. */
margin-top: calc(-1 * var(--sys-size-1));
padding: var(--sys-size-5) var(--sys-size-8);
border-top: var(--sys-size-1) solid var(--sys-color-divider);
background-color: var(--sys-color-cdt-base-container);
flex-shrink: 0;
}
.info-icon {
color: var(--sys-color-on-surface-subtle);
cursor: pointer;
}
.info-tooltip-container {
max-width: var(--sys-size-28);
padding: var(--sys-size-4) var(--sys-size-5);
}
.send-agent-button {
background-color: var(--sys-color-primary);
color: var(--sys-color-on-primary);
border: none;
border-radius: var(--sys-shape-corner-full);
padding: var(--sys-size-4) var(--sys-size-8);
font-size: var(--sys-typescale-body4-size);
font-weight: var(--ref-typeface-weight-medium);
cursor: pointer;
transition: background-color var(--sys-motion-duration-short4) var(--sys-motion-easing-emphasized), box-shadow var(--sys-motion-duration-short4) var(--sys-motion-easing-emphasized);
}
.send-agent-button:hover {
background-color: var(--sys-color-primary-bright);
box-shadow: var(--sys-elevation-level1);
}
}