-
Notifications
You must be signed in to change notification settings - Fork 12
feat(pulse): Mobile-responsive token search UI with blockchain filter… #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vignesha22
merged 20 commits into
staging
from
feature/pulse-search-ui-mobile-refinements
Dec 1, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c1148b1
feat(pulse): Mobile-responsive token search UI with blockchain filter…
aldin4u 8751c12
fix: ensure refresh and chain selector buttons visible on mobile
aldin4u 4fa6f62
test: fix Search.test.tsx - all tests passing
aldin4u 19e99f3
test: fix AppWrapper.test.tsx - all tests passing
aldin4u 3d329f6
fix: resolve all real lint errors manually (no auto-fix)
aldin4u 17cce36
fix: disable Prettier ESLint rule and resolve all lint errors
aldin4u 08f1c2d
fix: correct chain filter logic in parseMarketPairs
aldin4u f0357d0
fix: address all PR #461 review comments
aldin4u 7b5c2d0
Merge branch 'staging' into feature/pulse-search-ui-mobile-refinements
aldin4u d3be9cd
fix: restore ESC button in Sell mode, address PR comments (lint/unuse…
aldin4u 1d700d5
fix: remove unused getTokenBalance function and tokenBalance variable
aldin4u 7be09b6
fix: resolve lint errors in ChainOverlay and MarketList, update CardS…
aldin4u 14081f3
changes for unit tests and a few feedback changes
vignesha22 b0fa0b9
changed styles
vignesha22 d98fd81
updated snapshop
vignesha22 94adff1
added specific width and height
vignesha22 9467f03
fixed lint issue
vignesha22 78ed786
fixed test
vignesha22 bae51b0
changes as per feedback
vignesha22 a0bcfb4
added error handling
vignesha22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| import React from 'react'; | ||
| import { chainNameToChainIdTokensData } from '../../../../services/tokensData'; | ||
| import { getLogoForChainId } from '../../../../utils/blockchain'; | ||
| import RandomAvatar from '../../../pillarx-app/components/RandomAvatar/RandomAvatar'; | ||
| import { formatBigNumber } from '../../utils/number'; | ||
| import { Market } from '../../utils/parseSearchData'; | ||
| import TokenPriceChange from '../Price/TokenPriceChange'; | ||
|
|
||
| export interface MarketListProps { | ||
| markets: Market[]; | ||
| handleMarketSelect: (market: Market) => void; | ||
| } | ||
|
|
||
| export default function MarketList({ | ||
| markets, | ||
| handleMarketSelect, | ||
| }: MarketListProps) { | ||
| if (!markets || markets.length === 0) { | ||
| return null; | ||
| } | ||
|
|
||
| return ( | ||
| <> | ||
| {markets.map((market) => { | ||
| const chainId = chainNameToChainIdTokensData(market.blockchain); | ||
|
|
||
| return ( | ||
| <button | ||
| key={`${market.address}-${market.blockchain}`} | ||
| className="flex w-full h-9 my-2.5" | ||
| onClick={() => { | ||
| handleMarketSelect(market); | ||
| }} | ||
| type="button" | ||
| data-testid={`pulse-market-${market.blockchain.toLowerCase()}-${market.pairName.toLowerCase()}`} | ||
| > | ||
| <div className="relative inline-block"> | ||
| {/* Token0 Logo */} | ||
| {market.token0.logo ? ( | ||
| <img | ||
| src={market.token0.logo || ''} | ||
| className="w-9 h-9 ml-2.5 rounded-full" | ||
| alt="token0 logo" | ||
| /> | ||
| ) : ( | ||
| <div className="w-9 h-9 ml-2.5 overflow-hidden rounded-full"> | ||
| <RandomAvatar name={market.token0.name || ''} /> | ||
| <span className="absolute inset-0 flex items-center justify-center text-white text-lg font-bold ml-2.5"> | ||
| {market.token0.symbol?.slice(0, 2)} | ||
| </span> | ||
| </div> | ||
| )} | ||
| {/* Chain Logo */} | ||
| <img | ||
| src={getLogoForChainId(chainId)} | ||
| className="absolute -bottom-0.5 -right-0.5 w-3.75 h-3.75 rounded-full" | ||
| alt="chain logo" | ||
| width="14px" | ||
| height="14px" | ||
| /> | ||
| </div> | ||
| <div className="flex flex-col flex-1 min-w-0 ml-2.5"> | ||
| <div className="flex"> | ||
| <p className="text-[13px] font-normal">{market.pairName}</p> | ||
| <p className="text-[12px] font-normal ml-0.75 text-gray-400"> | ||
| {market.exchange.name} | ||
| </p> | ||
| </div> | ||
| <div className="flex"> | ||
| <p className="text-[13px] font-normal text-gray-400">Liq:</p> | ||
| <p className="text-[13px] font-normal ml-0.75"> | ||
| {formatBigNumber(market.liquidity || 0)} | ||
| </p> | ||
| <p className="text-[13px] font-normal ml-0.75 text-gray-400"> | ||
| Vol: | ||
| </p> | ||
| <p className="text-[13px] font-normal ml-0.75"> | ||
| {formatBigNumber(market.volume24h || 0)} | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <div className="flex flex-col ml-auto mr-2.5"> | ||
| <div> | ||
| <p className="text-[13px] font-normal"> | ||
| ${formatBigNumber(market.liquidity || 0)} | ||
| </p> | ||
| </div> | ||
| {market.priceChange24h !== null && ( | ||
| <div className="ml-auto"> | ||
| <TokenPriceChange value={market.priceChange24h} /> | ||
| </div> | ||
| )} | ||
| </div> | ||
| </button> | ||
| ); | ||
| })} | ||
| </> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.