keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

bug: ux - create new branch modal - if `branchPrefix` is long, the input is unusable

Open tresorama opened this issue 4 months ago • 1 comments

Current

If config.storage.branchPrefix is long, like

    branchPrefix: "chore/test-code--test-cms--test-blog-next-keystatic/update-content",

the input in the modal doesn't handle that, and if you write the suffix you don't see the text you are adding.

Image

Potential Solution

Image

tresorama avatar Aug 14 '25 19:08 tresorama

Temp Fix
Not tested on mobile, only desktop.

Image
// component - new branch - branch input
.kui\:reset:has(> div:nth-child(1) > span.kui\:Text):has(> input:nth-child(2)[type=text]):has(> div:nth-child(3)[role=presentation]) {

  // wrapper
  & {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem;
  }

  // branch prefix (read-only)
  &>div:nth-child(1) {
    padding: 0;
  }

  // branch suffix
  &>input {
    flex: 1;
    min-width: 16rem;
    padding: 0;
    line-height: 1.2;
  }
}

tresorama avatar Sep 21 '25 15:09 tresorama