Skip to content

Commit d42c883

Browse files
ux(search): keep github.com/ prefix inline with input on mobile
The mobile layout stacked the prefix span, input, and button each on their own row because all three were direct flex children of the wrapper. Group the prefix and input in an inner row so only the button wraps to a second line on narrow screens. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 11de7f5 commit d42c883

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

src/components/SearchForm.tsx

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -121,30 +121,32 @@ export default function SearchForm({ url, setUrl, onSubmit, onUserSubmit, onSele
121121
background: '#FAF6EF',
122122
boxShadow: '0 4px 14px rgba(0,0,0,0.06)',
123123
}}>
124-
<span style={{ fontFamily: MONO, fontSize: '14px', fontWeight: 700, color: '#666', padding: '0 2px 0 16px', display: 'flex', alignItems: 'center', flexShrink: 0, userSelect: 'none' }}>
125-
github.com/
126-
</span>
127-
<input
128-
autoFocus
129-
type="text"
130-
inputMode="url"
131-
value={url.replace(/^(?:https?:\/\/)?(?:www\.)?github\.com\//i, '')}
132-
onChange={e => { if (invalid) setInvalid(false); handleChange(e.target.value) }}
133-
placeholder={PLACEHOLDER}
134-
style={{
135-
fontFamily: MONO,
136-
fontSize: '16px',
137-
fontWeight: 600,
138-
flex: 1,
139-
height: '60px',
140-
padding: '0 10px 0 2px',
141-
background: 'transparent',
142-
border: 'none',
143-
outline: 'none',
144-
color: '#160A06',
145-
minWidth: 0,
146-
}}
147-
/>
124+
<div className="input-field-row" style={{ display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }}>
125+
<span style={{ fontFamily: MONO, fontSize: '14px', fontWeight: 700, color: '#666', padding: '0 2px 0 16px', display: 'flex', alignItems: 'center', flexShrink: 0, userSelect: 'none' }}>
126+
github.com/
127+
</span>
128+
<input
129+
autoFocus
130+
type="text"
131+
inputMode="url"
132+
value={url.replace(/^(?:https?:\/\/)?(?:www\.)?github\.com\//i, '')}
133+
onChange={e => { if (invalid) setInvalid(false); handleChange(e.target.value) }}
134+
placeholder={PLACEHOLDER}
135+
style={{
136+
fontFamily: MONO,
137+
fontSize: '16px',
138+
fontWeight: 600,
139+
flex: 1,
140+
height: '60px',
141+
padding: '0 10px 0 2px',
142+
background: 'transparent',
143+
border: 'none',
144+
outline: 'none',
145+
color: '#160A06',
146+
minWidth: 0,
147+
}}
148+
/>
149+
</div>
148150

149151
<ClickSpark color="#2b2b2b">
150152
<button

0 commit comments

Comments
 (0)