fix(OUT-3450): auto-focus assignee search + fix placeholder size#1186
fix(OUT-3450): auto-focus assignee search + fix placeholder size#1186aschwartz91 wants to merge 3 commits intomainfrom
Conversation
- Auto-focus the search input when the Assignee/Creator/Association filter panel opens, so users can start typing immediately instead of clicking into the search field. - Drop placeholder + input font size to 13px / line-height 20px to match the Figma design-system spec (was 14px). - Lighten placeholder color to #9B9FA3 and remove the blue focus-within/hover border, so the selector visually matches the top-bar search. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR fixes two UX issues in the Assignee/Creator/Association filter selector: auto-focusing the search input on open (via Confidence Score: 5/5Safe to merge — all changes are self-contained UI fixes with no data-layer impact. The auto-focus approach is correct and avoids the react-select scroll bug. Style consolidation is clean — both consumers of StyledUserCompanySelector now pass styles explicitly so removing the cop-border-primary CSS class override doesn't leave any component unstyled. The previous P1 hover-border concern is resolved in this commit. No P0/P1 findings remain. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant FilterSelector
participant FilterAssigneeSection
participant DOM
User->>FilterSelector: clicks "Filters → Assignee"
FilterSelector->>FilterSelector: setFilterMode(Assignee)
FilterSelector->>FilterAssigneeSection: render(autoFocus=true)
FilterAssigneeSection->>DOM: mount Box + StyledUserCompanySelector
FilterAssigneeSection->>DOM: useEffect → querySelector('input')
DOM-->>FilterAssigneeSection: input element
FilterAssigneeSection->>DOM: input.focus({ preventScroll: true })
User->>FilterAssigneeSection: types search query immediately
Reviews (3): Last reviewed commit: "fix(OUT-3450): address PR review feedbac..." | Re-trigger Greptile |
| control: (base) => ({ | ||
| ...base, | ||
| borderColor: '#EFF1F4', | ||
| backgroundColor: '#FFFFFF', | ||
| boxShadow: 'none', | ||
| '&:focus-within': { | ||
| borderColor: '#EFF1F4', | ||
| }, | ||
| }), |
There was a problem hiding this comment.
Missing
'&:hover' override may leave a residual border change
React-select v5's default control base styles include a '&:hover': { borderColor: ... } pseudo-selector rule. Spreading ...base brings that hover rule into the returned object, and CSS pseudo-class rules (:hover) have higher specificity than the plain borderColor: '#EFF1F4' set at the top level — so on mouse-over the border may still shift to react-select's default hover color (~#CCCCCC), contrary to the stated goal of keeping the border #EFF1F4 at all times.
Adding an explicit '&:hover' override would prevent that:
| control: (base) => ({ | |
| ...base, | |
| borderColor: '#EFF1F4', | |
| backgroundColor: '#FFFFFF', | |
| boxShadow: 'none', | |
| '&:focus-within': { | |
| borderColor: '#EFF1F4', | |
| }, | |
| }), | |
| control: (base) => ({ | |
| ...base, | |
| borderColor: '#EFF1F4', | |
| backgroundColor: '#FFFFFF', | |
| boxShadow: 'none', | |
| '&:hover': { | |
| borderColor: '#EFF1F4', | |
| }, | |
| '&:focus-within': { | |
| borderColor: '#EFF1F4', | |
| }, | |
| }), |
There was a problem hiding this comment.
Good catch — added an explicit '&:hover' override in d4d2f0c so the border stays #EFF1F4 regardless of hover state.
priosshrsth
left a comment
There was a problem hiding this comment.
Minor nitpick and awaiting Arpan's feedback on one possible regression?
- Add '&:hover' override to userCompanySelectorStyles control so the border stays #EFF1F4 on mouse-over (previously react-select's default hover rule leaked through via `...base` spread) - Change relative import of userCompanySelectorStyles to the '@' path alias in FilterAssigneeSection - Make auto-focus in FilterAssigneeSection opt-in via an `autoFocus` prop (default false); FilterSelector popper passes `autoFocus` so behavior is unchanged for the current caller, and inline usage will not steal focus on mount.
|
Deployment failed with the following error: Learn More: https://vercel.link/multiple-function-regions |
|
@greptileai PTAL |
Summary
Targeting two issues in the Assignee/Creator/Association filter selector:
input.focus({ preventScroll: true })instead of react-select'sautoFocusprop, because the latter scrolls the popover into view on mount.Also tidied up a couple of related visual details while the area was open:
#9B9FA3so it matches the lighter gray used by the top-bar search placeholder.focus-within/ hover border on the control; the border stays#EFF1F4regardless of state.The remaining design-system work (unifying the search box + options into a single seamless container, and making 13px the default in the DS) is tracked separately in POR-19462.
Test plan
Before

After

🤖 Generated with Claude Code