Repository navigation
Conversation
MikitasK
left a comment
There was a problem hiding this comment.
great job 👍
just a few things comments from my side:
MikitasK
left a comment
There was a problem hiding this comment.
- updated implementation to preserve consumer layout styles on outer wrapper while keeping focus-margin animation on a separate Reanimated view
- expanded
HORIZONTAL_MARGIN_KEYSto includemarginInline,marginInlineStart,marginInlineEnd - added regression tests & updated snapshots
|
@MikitasK can you resolve the comments that were addressed? |
|
@MikitasK just one comment this time ☝️ |
104ed60 to
98e4a84
Compare
|
This branch has a copy of built docs committed to id with 900+ files, please remove it 🙏 And also please resolve the conflicts, there've been some changes on main that will also influence this branch, like dropping default test IDs |
671768a to
0c82a80
Compare
0c82a80 to
de46718
Compare
|
Review by Claude iOS
Steps: open the Searchbar example, scroll to "With results", type What happens: the results surface spans the full screen width and its corners touch the screen edges. The contained bar above it has 24dp side margins, so the two do not line up. What should happen: the results container lines up with the bar, as in the MD3 docked search view. (via Claude, verify if it makes sense) Android
Steps: open the Searchbar example, scroll to "With results", type What happens: the bar is focused with 12dp side margins, and the results surface below it has none. What should happen: the results container lines up with the bar. (via Claude, verify if it makes sense) Web
Steps: open What happens: same as on native. The results surface is full width and the bar has 12dp side margins while focused. What should happen: the results container lines up with the bar. (via Claude, verify if it makes sense) A click on the outer part of the clear button does not clear the text Steps: focus the first bar under "Contained mode", type some text, then press the clear button within about 12px of its outer edge and release after about 100ms. What happens: on mouse down the button takes focus and the input blurs. The bar animates back from 12dp to 24dp margins, so the clear button moves 12px inward while the button is held. The release lands outside the button and the text stays. Pressing Tab from the input to the clear button also collapses the bar while focus is still inside it. What should happen: the bar stays expanded while focus is inside it, and the clear button clears the text wherever it is clicked. (via Claude, verify if it makes sense) |
satya164
left a comment
There was a problem hiding this comment.
Review by Claude
See the inline comments. (via Claude, verify if it makes sense)
|
Found potential problems with the pull request:
|
|
/review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on af55889. The verdict and the full list are in the summary comment.
|
Thanks for the review! All comments are addressed. Searchbar.Results now takes a mode prop, so mode="divided" renders full width under the divider. The example shows a Results label as a List.Subheader, which I kept as content rather than a prop since the spec fills the container with list components. Happy to add a label prop if you'd prefer. "Deprecated" is now "not recommended", and the color changes are documented in migration.md. |
…into refactor/searchbar
kachmashk
left a comment
There was a problem hiding this comment.
Thanks for addressing the feedback!
| React.useEffect(() => { | ||
| if (!focusHeldInside || Platform.OS !== 'web') { | ||
| return; | ||
| } |
| style, | ||
| ]} | ||
| // `Surface` applies its own duration after `style`, hence the prop. | ||
| transitionDuration={reduceMotion ? 0 : theme.motion.duration.medium2} |
| }, | ||
| }); | ||
|
|
||
| export default SearchbarResults; |
|
/review |
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
src/components/Searchbar/Searchbar.tsx:468 |
🆕 Clear icon ignores the iconColor prop it used to follow; undocumented change |
Not in the reviewers' scope (2 files)
src/components/__tests__/Appbar/__snapshots__/Appbar.test.tsx.snap: generated or a lockfile, so its lines were left outsrc/components/__tests__/__snapshots__/Searchbar.test.tsx.snap: generated or a lockfile, so its lines were left out
1 finding below minor hidden (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (63a3d5acf854).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 776f040. The verdict and the full list are in the summary comment.
| <IconButton | ||
| borderless | ||
| aria-label={clearAccessibilityLabel} | ||
| iconColor={value ? iconColor : 'rgba(255, 255, 255, 0)'} | ||
| iconColor={value ? trailingIconColor : 'rgba(255, 255, 255, 0)'} |
There was a problem hiding this comment.
🆕 🟡 Minor · Clear icon ignores the iconColor prop it used to follow; undocumented change
<Searchbar iconColor="purple" value="value" /> no longer tints the clear icon—it stays onSurfaceVariant while the magnify icon turns purple. The migration guide's "keep the 5.x colors" snippet tells callers to pass iconColor, but never mentions the clear icon, so a caller following it loses the 5.x tint with no note.
Suggested change
State in the migration guide's Searchbar section that iconColor now affects only the leading icon, and that the clear icon follows the trailing-icon color (set trailingIconColor to keep a 5.x tint on it).
Details
Also raised here
Also raised at this location by persona senior-developer: iconColor no longer tints the clear icon; migration note tells users it does — In 5.x the clear (X) button used customIconColor || colors.onSurfaceVariant, so an app that passed iconColor got a matching clear icon. It now uses trailingIconColor (colors.onSurfaceVariant) and ignores iconColor entirely (src/components/Searchbar/Searchbar.tsx:471), so that app's clear icon changes color on upgrade. The new Searchbar section of docs/6.x/docs/guides/migration.md (lines 995-1047) only mentions input, placeholder and leading-icon colors and tells readers to "keep the 5.x colors" by passing inputStyle, placeholderTextColor and iconColor — following that advice does not restore the 5.x clear icon, and the migration doc for this component never states that iconColor stopped affecting it. Add that line to the section (the clear icon follows trailingIconColor now).
Also raised at this location by persona maintainability: Clear icon no longer respects iconColor — undocumented breaking change — A consumer passing iconColor="purple" previously got a purple clear icon (because iconColor = customIconColor || theme.colors.onSurfaceVariant fed both leading and clear icons). The new code always uses trailingIconColor (= onSurfaceVariant) for the clear icon regardless of customIconColor. This is an intentional separation per the test, but the migration guide section on Searchbar colors only mentions input/placeholder/leading icon changes — the clear icon color change is undocumented, so callers upgrading from v5 will see an unexpected visual difference with no migration note.
persona: react-native-paper, senior-developer, maintainability, javascript
Useful? Reply @apex-sentinel-staging like, or @apex-sentinel-staging dislike <why> if it is not.
Reply @apex-sentinel-staging note ... to add context, or @apex-sentinel-staging pivot ... if it is wrong — I will re-check the cited code.









Motivation
Modernizes Searchbar to the MD3 Expressive spec using the shared theme tokens, like TextInput/Switch/Checkbox/FAB.
Changes
onSurface, placeholderonSurfaceVariant, leading icononSurface.Searchbar.Results, a results surface aligned with the focused bar.src/components/Searchbar/withtokens.tsandutils.ts.Breaking change
Mode values are renamed to MD3 terminology
Contained mode (the default) now has 24dp side margins, where the old bar mode was full-width. Pass style={{ marginHorizontal: 0 }} to keep it full-width.
Related issue
#4978
Test plan
yarn typecheck,yarn lint,yarn testsearchbar.mp4