Skip to content

fix(apollo-wind): suppress native search clear button to avoid duplicate#972

Merged
david-rios-uipath merged 2 commits into
mainfrom
fix/search-duplicate-clear-button
Jul 25, 2026
Merged

fix(apollo-wind): suppress native search clear button to avoid duplicate#972
david-rios-uipath merged 2 commits into
mainfrom
fix/search-duplicate-clear-button

Conversation

@david-rios-uipath

@david-rios-uipath david-rios-uipath commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

<Search> renders two clear buttons whenever the field has a value: the small native one and the component's own styled one.

Root cause: the component sets type="search" on the inner InputGroupInput, so Chromium/WebKit (Chrome, Edge, Safari — and therefore any Chromium webview) automatically renders a native ::-webkit-search-cancel-button. The component also renders its own clear control (InputGroupButton with <X/>, gated on showClearButton && value, default on). Nothing suppresses the native pseudo-element, so both appear.

Before

2026-07-24 10 54 07

After

2026-07-24 10 53 06

Notes

  • Chromium/WebKit-only symptom (Firefox never renders a native search-cancel button), but the suppression is harmless everywhere.
  • Behavior is otherwise unchanged: the styled clear button, onClear, showClearButton, and onChange all work as before.
  • biome check passes on the changed file (lint + format clean).

Testing

  • biome check clean on the changed file
  • Visual: type into a <Search> in a Chromium browser → exactly one (styled) clear button

…ate in Search

The Search component sets type="search" on the input, so Chromium/WebKit
renders a native ::-webkit-search-cancel-button in addition to the component's
own InputGroupButton clear control — two clear buttons whenever the field has a
value. Hide the native pseudo-elements so only the styled button shows, while
keeping type="search" semantics.
Copilot AI review requested due to automatic review settings July 24, 2026 14:42
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Jul 24, 2026, 07:51:49 AM
apollo-docs Ready Preview · Logs Jul 24, 2026, 07:51:49 AM
apollo-landing Ready Preview · Logs Jul 24, 2026, 07:51:49 AM
apollo-vertex Ready Preview · Logs Jul 24, 2026, 07:51:49 AM

@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1950 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1720
ISC 89
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.2 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a UI duplication issue in apollo-wind’s <Search> component where Chromium/WebKit browsers can render a native search cancel button in addition to the component’s styled clear button. The fix keeps type="search" semantics while suppressing the native ::-webkit-search-* decorations via Tailwind selector utilities.

Changes:

  • Compose className with cn() to add WebKit-only suppression for ::-webkit-search-cancel-button and ::-webkit-search-decoration.
  • Preserve existing <Search> clear button behavior while preventing duplicate clear controls in supported browsers.

Comment thread packages/apollo-wind/src/components/ui/search.tsx
…n classes

Regression guard so a future refactor can't drop the
::-webkit-search-cancel-button / ::-webkit-search-decoration suppression and
reintroduce the duplicate clear button.
Copilot AI review requested due to automatic review settings July 24, 2026 14:48
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 9.0% 43.84 MB 57.45 MB ±0
@uipath/apollo-react 38.7% 7.45 MB 28.56 MB +38 B
@uipath/apollo-wind 41.5% — (4 untracked) 401.7 KB 2.60 MB +110 B
@uipath/ap-chat 85.8% 43.44 MB 55.94 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

@github-actions github-actions Bot added size:S 10-29 changed lines. and removed size:XS 0-9 changed lines. labels Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@david-rios-uipath
david-rios-uipath marked this pull request as ready for review July 24, 2026 14:54
@david-rios-uipath david-rios-uipath changed the title fix(apollo-wind): suppress native search clear button to avoid duplicate in Search fix(apollo-wind): suppress native search clear button to avoid duplicate Jul 24, 2026
@david-rios-uipath
david-rios-uipath merged commit 33dcba9 into main Jul 25, 2026
50 of 52 checks passed
@david-rios-uipath
david-rios-uipath deleted the fix/search-duplicate-clear-button branch July 25, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-wind size:S 10-29 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants