Skip to content

refactor: extract token search input and button#7093

Merged
i1skn merged 1 commit intodevelopfrom
02-05-chrore_extract_token_search_input_and_button
Feb 10, 2026
Merged

refactor: extract token search input and button#7093
i1skn merged 1 commit intodevelopfrom
02-05-chrore_extract_token_search_input_and_button

Conversation

@i1skn
Copy link
Copy Markdown
Contributor

@i1skn i1skn commented Feb 5, 2026

TL;DR

This is a refactor for reuse in upcoming token selectors (Perps/Polymarket) with no intended behavior change.
Refactored the SearchInput component to create a reusable base component that can be used across the app.

What changed (plus any additional context for devs)

  • Extracted the swap-specific search input into a shared component: src/components/token-search/SearchInput.tsx.
  • Moved SearchInputButton into shared token-search components and added explicit typing for animated style props.
  • Updated swap input/output token search to use the shared component via props (placeholder, paste enablement, button visibility, selected-asset state).
  • Moved shared token-search layout/style constants to src/components/token-search/constants.ts and src/components/token-search/styles.ts.
  • Moved NAVBAR_HEIGHT_WITH_PADDING to src/components/navbar/constants.ts and updated swap token-list/layout usage.
  • Extracted getDefaultKeyboardHeight to src/utils/keyboardHeight.ts and reused it in swaps + Dapp Browser search context.
  • Renamed handleExitSearchWorklet=> onCancelOrClosePressWorklet and handleFocusSearchWorklet => onSearchFocusWorklet to better reflect what they are doing.

Screen recordings / screenshots

N/A (refactor-only; no intended UI change).

@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from 047d376 to eb555ab Compare February 5, 2026 17:49
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from eb555ab to aadcd11 Compare February 6, 2026 14:13
@i1skn i1skn changed the base branch from develop to graphite-base/7093 February 6, 2026 16:17
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from aadcd11 to 8af25b3 Compare February 6, 2026 16:18
@i1skn i1skn changed the base branch from graphite-base/7093 to 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants February 6, 2026 16:18
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from 8af25b3 to f522b25 Compare February 6, 2026 16:24
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from fac61c9 to 99d66fd Compare February 6, 2026 16:24
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from f522b25 to c7c4643 Compare February 6, 2026 16:26
@i1skn i1skn changed the title chore: extract token search input and button refactor: extract token search input and button Feb 6, 2026
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch 2 times, most recently from e1cd85d to bf0335c Compare February 6, 2026 20:34
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from 14baf6a to a25cc22 Compare February 6, 2026 20:34
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from a25cc22 to e965854 Compare February 9, 2026 12:38
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from bf0335c to ca32478 Compare February 9, 2026 12:38
@i1skn i1skn marked this pull request as ready for review February 9, 2026 13:12
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

Launch in simulator or device for 9cb630f

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

🧪 Flashlight Performance Report (AWS Device Farm)

🔀 Commit: 6c95391

📎 View Artifacts

Metric Current Δ vs Baseline
Time to Interactive (TTI) 5471 ms ⚪ +39.3 ms (+0.7%)
Average FPS 57.01 ⚪ +0.1 (+0.3%)
Average RAM 397.7 MB 🔴 +11.0 MB (+2.8%)

@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from ca32478 to 85ced13 Compare February 9, 2026 14:34
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from e965854 to 0f052a9 Compare February 9, 2026 14:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

Launch in simulator or device for 56d922a

@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from 85ced13 to 9914c1c Compare February 9, 2026 16:34
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from 0f052a9 to 60cb700 Compare February 9, 2026 16:34
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from 9914c1c to f3aba07 Compare February 9, 2026 16:39
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from 60cb700 to f21c6b5 Compare February 9, 2026 16:39
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from f3aba07 to ef30149 Compare February 9, 2026 16:55
Copy link
Copy Markdown
Contributor

@maxbbb maxbbb left a comment

Choose a reason for hiding this comment

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

Lgtm, nice job!

@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 1ad4be4

@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from ef30149 to c6e2bde Compare February 10, 2026 16:54
@i1skn i1skn force-pushed the 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants branch from f21c6b5 to d725ca7 Compare February 10, 2026 16:54
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 299a768

@i1skn i1skn changed the base branch from 02-06-refactor_move_shared_border_and_separator_constants_to_styles_constants to graphite-base/7093 February 10, 2026 17:36
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from c6e2bde to 485c252 Compare February 10, 2026 17:37
@i1skn i1skn force-pushed the graphite-base/7093 branch from d725ca7 to 0ef99de Compare February 10, 2026 17:37
@graphite-app graphite-app Bot changed the base branch from graphite-base/7093 to develop February 10, 2026 17:38
@i1skn i1skn force-pushed the 02-05-chrore_extract_token_search_input_and_button branch from 485c252 to 7b2c046 Compare February 10, 2026 17:38
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 6c95391

@i1skn i1skn merged commit a81824f into develop Feb 10, 2026
19 checks passed
@i1skn i1skn deleted the 02-05-chrore_extract_token_search_input_and_button branch February 10, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants