Skip to content

Commit 3252009

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
[AI Assistance] Fix file name overflow & wrap buttons
Allow flex-shrink when name is too long. Wrap the buttons so that they are usable and make sure that the tooltip is always shown. Fixed: 405922851 Change-Id: Ic1d5f2d079bd51c94807a5e4dd6a0965a981fb28 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6439005 Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
1 parent 6b7f2df commit 3252009

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

front_end/panels/ai_assistance/PatchWidget.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,8 @@ export class PatchWidget extends UI.Widget.Widget {
343343
<div class="footer">
344344
${input.projectName ? html`
345345
<div class="change-workspace">
346-
<div class="selected-folder">
347-
<devtools-icon .name=${iconName}></devtools-icon> <span class="folder-name" title=${input.projectPath}>${input.projectName}</span>
348-
</div>
346+
<devtools-icon .name=${iconName}></devtools-icon>
347+
<span class="folder-name" title=${input.projectPath}>${input.projectName}</span>
349348
${input.onChangeWorkspaceClick ? html`
350349
<devtools-button
351350
@click=${input.onChangeWorkspaceClick}

front_end/panels/ai_assistance/components/chatView.css

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ main {
757757
position: relative;
758758
margin: 0 var(--sys-size-5);
759759
padding: 0 var(--sys-size-5);
760-
min-width: var(--sys-size-31);
761760

762761
&.saved-to-disk {
763762
pointer-events: none;
@@ -850,10 +849,10 @@ main {
850849

851850
.footer {
852851
display: flex;
853-
flex-direction: row;
852+
flex-flow: row wrap;
854853
justify-content: space-between;
855854
margin: var(--sys-size-5) 0 var(--sys-size-5) var(--sys-size-2);
856-
gap: var(--sys-size-6);
855+
gap: var(--sys-size-6) var(--sys-size-5);
857856

858857
.disclaimer-link {
859858
align-self: center;
@@ -866,11 +865,20 @@ main {
866865
gap: var(--sys-size-3);
867866
}
868867

869-
.selected-folder {
868+
.save-or-discard-buttons {
869+
flex-grow: 1;
870+
display: flex;
871+
justify-content: flex-end;
872+
gap: var(--sys-size-3);
873+
}
874+
875+
.change-workspace {
870876
display: flex;
877+
flex-direction: row;
871878
align-items: center;
872879
gap: var(--sys-size-3);
873-
overflow-x: hidden;
880+
min-width: var(--sys-size-22);
881+
flex: 1 1 40%;
874882

875883
.folder-name {
876884
white-space: nowrap;
@@ -879,14 +887,6 @@ main {
879887
}
880888
}
881889

882-
.change-workspace {
883-
display: flex;
884-
flex-direction: row;
885-
gap: var(--sys-size-2);
886-
max-width: 50%;
887-
min-width: 0;
888-
}
889-
890890
.info-tooltip-container {
891891
max-width: var(--sys-size-28);
892892

@@ -909,8 +909,10 @@ main {
909909
display: flex;
910910
align-items: center;
911911
gap: var(--sys-size-3);
912-
margin-left: auto;
913912
min-width: fit-content;
913+
justify-content: flex-end;
914+
flex-grow: 1;
915+
flex-shrink: 1;
914916

915917
devtools-icon {
916918
/* var(--sys-size-8) is too small and var(--sys-size-9) is too big. */

front_end/panels/changes/combinedDiffView.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
.summary-left {
2929
display: flex;
3030
align-items: center;
31+
min-width: 0;
3132
flex-grow: 0;
3233

3334
.file-name-link {

0 commit comments

Comments
 (0)