Skip to content

fix(pagefilter) increase hitBox, add infoTop and search clear#108422

Draft
JonasBa wants to merge 5 commits intomasterfrom
jb/pagefilters/polish-interaction
Draft

fix(pagefilter) increase hitBox, add infoTop and search clear#108422
JonasBa wants to merge 5 commits intomasterfrom
jb/pagefilters/polish-interaction

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Feb 18, 2026

Small UX improvements to the projectFilters component:

  • Added InfoTip to explain the shift and cmd click (these were previously ephemeral with their dismiss state stored in localstorage)
CleanShot 2026-02-17 at 16 58 47@2x
  • Increased hitbox of Checkbox - this component is very rough in the sense that you need surgical precision to click on the checkbox directly or risk applying changes you did not want to make. A clear example is clicking one or two rows, then misclicking the 3rd and losing the selection as click applies the single selection immediately

  • Fixed a bug with shift click where after selecting a project and performing a search, the shift click would highlight hidden elements that were invisible to the user (stale reference to last selected item)

…ange

Prevents stale anchors from triggering unexpected range selection across
menu sessions, and ensures shift+click ranges only span visible options
when the list is filtered by search.
@JonasBa JonasBa requested review from a team as code owners February 18, 2026 01:04
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 18, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

<InfoTip
size="xs"
variant="muted"
title="Shift + click to select a range of environments or cmd + click to select multiple environments at once."
Copy link
Contributor

Choose a reason for hiding this comment

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

InfoTip titles missing internationalization wrapper

Medium Severity

The InfoTip title strings in both environmentPageFilter.tsx and projectPageFilter.tsx are plain string literals instead of being wrapped in t() for internationalization. Every other user-facing string in these same files (e.g., t('Filter Environments'), t('No projects found')) uses t(), and t is already imported. These tooltip texts will not be translated for non-English users.

Additional Locations (1)

Fix in Cursor Fix in Web

} & CheckboxProps
) {
return <CheckboxWithIncreasedHitArea {...props} />;
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Type intersection negates Omit, unused prop declared

Low Severity

The HybridFilterComponents.Checkbox type DistributedOmit<CheckboxProps, 'size'> & { withIncreasedHitArea?: boolean } & CheckboxProps is contradictory — the final & CheckboxProps re-adds size, completely negating the DistributedOmit. Additionally, withIncreasedHitArea is declared in the type but never read in the implementation; the styled component is always applied regardless. Both are dead/ineffective code.

Fix in Cursor Fix in Web

position: absolute;
inset: -${p => p.theme.space.md};
}
`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Hit area pseudo-element won't work on input element

Medium Severity

CheckboxWithIncreasedHitArea uses input[type='checkbox']::after to expand the clickable area, but ::after pseudo-elements are not reliably generated on <input> elements because they are void/replaced elements. This works in Chrome (non-standard) but not in Firefox. Additionally, NativeHiddenCheckbox doesn't set appearance: none, further reducing the chances of the pseudo-element being rendered. The PR's core goal of increasing the checkbox hitbox will silently fail for non-Chromium users.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

Progressive enhancement? We could make the checkbox larger, but it starts to get really busy with the project icon there as well...

image

@JonasBa JonasBa marked this pull request as draft February 18, 2026 04:27
@JonasBa
Copy link
Member Author

JonasBa commented Feb 18, 2026

@cursoragent apply suggestions from PR review

@cursor
Copy link
Contributor

cursor bot commented Feb 18, 2026

I've successfully applied all the suggestions from the PR review. Here's what was fixed:

Fixed Issues:

  1. Internationalization - Wrapped InfoTip title strings in t() function in both environmentPageFilter.tsx and projectPageFilter.tsx so the tooltip text will be translatable

  2. Cross-browser checkbox hitbox - Replaced the ::after pseudo-element approach (which doesn't work on <input> elements in Firefox) with a wrapper div that uses padding and negative margins to expand the clickable area reliably across all browsers

  3. Type definitions - Cleaned up the contradictory type intersection that was re-adding the size prop after omitting it, and removed the unused withIncreasedHitArea prop declaration

  4. Unused import - Removed the unused Checkbox import from projectPageFilter.tsx that was causing TypeScript CI failures

All changes have been committed and pushed to the jb/pagefilters/polish-interaction branch.

Open in Cursor Open in Web

- Wrap InfoTip titles in t() for internationalization
- Fix checkbox hitbox implementation for cross-browser compatibility
- Clean up type definitions and remove unused withIncreasedHitArea prop
- Remove unused Checkbox import from projectPageFilter

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants