Skip to content

Commit 29ec4fd

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
[AI Assistance] Fix link hit box
Currently the click hit box of the link expands due to the flex-grow: 1. Wrap the links in a div to fix this. Bug: none Change-Id: I8ded9722dd6182b1d8d7a08c3dd1ead0cf2fe66e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6433740 Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org> Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
1 parent c8e12f4 commit 29ec4fd

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

front_end/panels/ai_assistance/PatchWidget.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export class PatchWidget extends UI.Widget.Widget {
203203
}
204204

205205
return html`<x-link
206-
class="link sources-link"
206+
class="link"
207207
title="${UIStringsNotTranslate.viewUploadedFiles} ${UIStringsNotTranslate.opensInNewTab}"
208208
href="data:text/plain,${encodeURIComponent(input.sources)}"
209209
jslog=${VisualLogging.link('files-used-in-patching').track({click: true})}>
@@ -266,7 +266,9 @@ export class PatchWidget extends UI.Widget.Widget {
266266
></devtools-code-block>
267267
${input.patchSuggestionState === PatchSuggestionState.ERROR
268268
? html`<div class="error-container">
269-
<devtools-icon .name=${'cross-circle-filled'}></devtools-icon>${lockedString(UIStringsNotTranslate.genericErrorMessage)} ${renderSourcesLink()}
269+
<devtools-icon .name=${'cross-circle-filled'}></devtools-icon>${
270+
lockedString(UIStringsNotTranslate.genericErrorMessage)
271+
} ${renderSourcesLink()}
270272
</div>`
271273
: nothing
272274
}`;
@@ -280,13 +282,15 @@ export class PatchWidget extends UI.Widget.Widget {
280282
if (input.patchSuggestionState === PatchSuggestionState.SUCCESS) {
281283
return html`
282284
<div class="footer">
283-
<x-link class="link disclaimer-link" href="https://support.google.com/legal/answer/13505487" jslog=${
284-
VisualLogging.link('code-disclaimer').track({
285-
click: true,
286-
})}>
287-
${lockedString(UIStringsNotTranslate.codeDisclaimer)}
288-
</x-link>
289-
${renderSourcesLink()}
285+
<div class="left-side">
286+
<x-link class="link disclaimer-link" href="https://support.google.com/legal/answer/13505487" jslog=${
287+
VisualLogging.link('code-disclaimer').track({
288+
click: true,
289+
})}>
290+
${lockedString(UIStringsNotTranslate.codeDisclaimer)}
291+
</x-link>
292+
${renderSourcesLink()}
293+
</div>
290294
<div class="save-or-discard-buttons">
291295
<devtools-button
292296
@click=${input.onDiscard}

front_end/panels/ai_assistance/components/chatView.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,11 @@ main {
859859
align-self: center;
860860
}
861861

862-
.sources-link {
862+
.left-side {
863863
flex-grow: 1;
864+
display: flex;
864865
align-self: center;
866+
gap: var(--sys-size-3);
865867
}
866868

867869
.selected-folder {

0 commit comments

Comments
 (0)