Skip to content
Merged
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
10 changes: 4 additions & 6 deletions site/src/modules/provisioners/ProvisionerTagsField.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import TextField from "@mui/material/TextField";
import { PlusIcon } from "lucide-react";
import { type FC, useRef, useState } from "react";
import * as Yup from "yup";
import type { ProvisionerDaemon } from "#/api/typesGenerated";
import { Button } from "#/components/Button/Button";
import { Input } from "#/components/Input/Input";
import { ProvisionerTag } from "#/modules/provisioners/ProvisionerTag";

// Users can't delete these tags
Expand Down Expand Up @@ -119,9 +119,8 @@ const NewTagControl: FC<NewTagControlProps> = ({ onAdd }) => {
<label className="sr-only" htmlFor="tag-key-input">
Tag key
</label>
<TextField
inputRef={keyInputRef}
size="small"
<Input

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Let the replacement inputs shrink inside the tag row

In both callers, especially the 300px ProvisionerTagsPopover, this row is constrained by max-w-72, but each shared Input is a raw input with w-full and its automatic intrinsic minimum width. Unlike the previous MUI TextField wrapper, which supplies min-width: 0, the two inputs cannot shrink enough to coexist with the fixed-size add button and gaps, so the controls overflow the popover. Give both replacement inputs shrinkable sizing such as min-w-0.

Useful? React with 👍 / 👎.

ref={keyInputRef}
id="tag-key-input"
name="key"
placeholder="Key"
Expand All @@ -133,8 +132,7 @@ const NewTagControl: FC<NewTagControlProps> = ({ onAdd }) => {
<label className="sr-only" htmlFor="tag-value-input">
Tag value
</label>
<TextField
size="small"
<Input
id="tag-value-input"
name="value"
placeholder="Value"
Expand Down
Loading