keystatic
keystatic copied to clipboard
bug: ux - create new branch modal - if `branchPrefix` is long, the input is unusable
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.
Potential Solution
Temp Fix
Not tested on mobile, only desktop.
// 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;
}
}