Skip to content

Comments

Wallet Portfolio Tile - ui minor fixes after QA#313

Merged
RanaBug merged 4 commits intostagingfrom
feat/PRO-3182/portfolio-tile-refactor
May 23, 2025
Merged

Wallet Portfolio Tile - ui minor fixes after QA#313
RanaBug merged 4 commits intostagingfrom
feat/PRO-3182/portfolio-tile-refactor

Conversation

@RanaBug
Copy link
Collaborator

@RanaBug RanaBug commented May 22, 2025

Description

  • Minor UI fixes after QA review

How Has This Been Tested?

  • Existing unit tests and manual testing

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary by CodeRabbit

  • New Features

    • Receive modal can now be closed by pressing the ESC key or clicking outside the modal area.
    • Top Tokens list allows navigation to token detail pages by clicking on a token row.
    • Support added for Binance Smart Chain bridged USDC and USDT tokens.
  • Improvements

    • Loading states for token balances and top tokens now display skeleton loaders for better user feedback.
    • Wallet portfolio balance changes always display two decimal places for consistency.
    • Graphs and portfolio components default to showing the latest available value and have improved responsive layouts across devices.
  • Bug Fixes

    • Improved error and empty state handling for Top Tokens and portfolio components.
  • Tests

    • Expanded and updated tests to cover new modal close interactions, updated formatting, and navigation features.

@RanaBug RanaBug requested a review from IAmKio May 22, 2025 14:32
@RanaBug RanaBug self-assigned this May 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 22, 2025

Walkthrough

This update introduces enhanced UI responsiveness, improved modal accessibility, and refined data handling for portfolio and token components. It includes new event-driven modal close behaviors, responsive layout adjustments across breakpoints, precise balance formatting, and expanded token support. Associated test suites are updated to reflect these changes and ensure proper functionality.

Changes

File(s) Change Summary
src/apps/pillarx-app/components/PrimeTokensBalance/PrimeTokensBalance.tsx, test/PrimeTokensBalance.test.tsx PrimeTokensBalance now checks and displays a loading skeleton while the wallet portfolio is loading. Tests updated to mock the new loading state structure.
src/apps/pillarx-app/components/ReceiveModal/ReceiveModal.tsx, test/ReceiveModal.test.tsx ReceiveModal now closes on ESC key press or outside click, using refs and event listeners. Tests added for these interactions.
src/apps/pillarx-app/components/TopTokens/TopTokens.tsx, test/TopTokens.test.tsx TopTokens now uses useNavigate for navigation, refines loading/error/empty state handling, and improves responsive layout. Tests updated to wrap component in MemoryRouter.
src/apps/pillarx-app/components/WalletPortfolioBalance/WalletPortfolioBalance.tsx, test/WalletPortfolioBalance.test.tsx USD change text now always shows two decimal places; test updated to match new formatting.
src/apps/pillarx-app/components/WalletPortfolioGraph/BalancePnlGraph.tsx Introduces a latestValue state to display the most recent graph value by default, updating display logic accordingly.
src/apps/pillarx-app/components/TokensWithMarketDataTile/TokensWithMarketDataTile.tsx Adjusts responsive layout classes for token rows, clarifying visibility across mobile, tablet, and desktop breakpoints.
src/apps/pillarx-app/components/WalletPortfolioGraph/WalletPortfolioGraph.tsx Refines responsive classes for toggle button containers to explicitly control visibility on desktop, tablet, and mobile.
src/apps/pillarx-app/components/WalletPortfolioTile/WalletPortfolioTile.tsx Updates responsive display classes for several internal containers to clarify component visibility by breakpoint.
src/apps/pillarx-app/utils/constants.ts Adds Binance Smart Chain bridged USDC and USDT assets to the PRIME_ASSETS_MOBULA array.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ReceiveModal
  participant ReduxStore

  User->>ReceiveModal: Open modal
  alt Press ESC key
    User-->>ReceiveModal: Keydown (ESC)
    ReceiveModal->>ReduxStore: setIsReceiveModalOpen(false)
  else Click outside modal
    User-->>ReceiveModal: Mousedown (outside)
    ReceiveModal->>ReduxStore: setIsReceiveModalOpen(false)
  end
Loading

Suggested reviewers

  • IAmKio

Poem

Hopping through the code so neat,
Responsive layouts—what a treat!
Modals close with just a tap,
Or ESC key—no more trap.
Tokens added, numbers shine,
In this patch, the features align.
🐰✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm warn config production Use --omit=dev instead.
npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-05-22T15_19_14_258Z-debug-0.log

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 22, 2025

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: a078ad7
Status: ✅  Deploy successful!
Preview URL: https://05e6d8a9.x-e62.pages.dev
Branch Preview URL: https://feat-pro-3182-portfolio-tile.x-e62.pages.dev

View logs

@github-actions github-actions bot temporarily deployed to Preview (feat/PRO-3182/portfolio-tile-refactor) May 22, 2025 14:37 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (9)
src/apps/pillarx-app/components/ReceiveModal/ReceiveModal.tsx (2)

39-51: Great addition of ESC key handling for modal dismissal!

The implementation properly adds and removes the event listener with the useEffect cleanup function. Consider adding the handleOnCloseReceiveModal function to the dependency array instead of using the eslint-disable comment, to ensure the latest version of the function is always used.

-  // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, []);
+  }, [handleOnCloseReceiveModal]);

53-65: Good implementation of click-outside-to-close functionality.

The click-outside pattern follows best practices with proper event cleanup. Similar to the ESC key handler, consider adding handleOnCloseReceiveModal to the dependency array instead of disabling the eslint rule.

-  // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, []);
+  }, [handleOnCloseReceiveModal]);
src/apps/pillarx-app/components/ReceiveModal/test/ReceiveModal.test.tsx (1)

138-157: Good test for click-outside dismissal.

The test verifies that clicking outside the modal triggers the close action. For a more accurate test, consider simulating the click outside the modal element rather than on the document.

You could improve the test to better simulate clicking outside specifically:

- fireEvent.mouseDown(document); // simulates clicking outside modal
+ // Get the modal backdrop element and fire event on it, not on the modal itself
+ const modalBackdrop = document.querySelector('#wallet-portfolio-tile-receive-modal');
+ if (modalBackdrop) {
+   fireEvent.mouseDown(modalBackdrop);
+ }

This would more accurately test the real user behavior of clicking on the backdrop.

src/apps/pillarx-app/components/PrimeTokensBalance/test/PrimeTokensBalance.test.tsx (1)

86-93: Consider restoring the original mock after each case

jest.clearAllMocks() resets call history but not mockImplementation.
If another test (inside this describe or elsewhere) relies on the default selector implementation it may inadvertently receive this mocked state.

afterEach(() => {
   jest.resetAllMocks();   // resets implementation & call counts
 });

This is inexpensive insurance against test bleed-through.

src/apps/pillarx-app/components/WalletPortfolioGraph/BalancePnlGraph.tsx (2)

88-89: latestValue state is helpful but make the initial value explicit

useState<number | undefined>() will start as undefined; declaring that explicitly clarifies intent:

- const [latestValue, setLatestValue] = useState<number | undefined>();
+ const [latestValue, setLatestValue] = useState<number | undefined>(undefined);

Tiny clarity win, no functional change.


341-359: Array dependencies will retrigger effect on every render

walletHistoryGraph?.balance_history and walletPortfolioWithPnl?.pnl_history are new array instances whenever Redux delivers fresh objects, causing the effect to fire even if their contents did not change.
If you only care about the latest point consider depending on their .length (or a memoised selector).

-  walletHistoryGraph?.balance_history,
-  walletPortfolioWithPnl?.pnl_history,
+  walletHistoryGraph?.balance_history?.length,
+  walletPortfolioWithPnl?.pnl_history ? Object.keys(walletPortfolioWithPnl.pnl_history).length : 0,

Reduces unnecessary state churn and paints.

src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (3)

104-106: Duplicate key prop

Both the <React.Fragment> and the inner <div> use key={index}. The inner key is unnecessary and React will warn in StrictMode.

- <div key={index} className="flex …">
+ <div className="flex …">

148-155: Consider ARIA semantics for clickable rows

<div> with onClick is not keyboard-accessible. Converting to a <button> or adding role="button" plus tabIndex={0} and key handlers will improve accessibility.


160-188: Triangle icon colour calculation duplicates logic

Colour and rotation are recalculated twice (here and above). Extracting a tiny helper (e.g., getTrendProps(value)) would DRY up the code and keep JSX lean.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 55abe3d and bd47791.

⛔ Files ignored due to path filters (4)
  • src/apps/pillarx-app/components/MediaGridCollection/tests/__snapshots__/DisplayCollectionImage.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/TokenMarketDataRow/tests/__snapshots__/LeftColumnTokenMarketDataRow.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/TokensWithMarketDataTile/test/__snapshots__/TokensWithMarketDataTile.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/TopTokens/test/__snapshots__/TopTokens.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (10)
  • config-overrides.js (1 hunks)
  • src/apps/pillarx-app/components/PrimeTokensBalance/PrimeTokensBalance.tsx (2 hunks)
  • src/apps/pillarx-app/components/PrimeTokensBalance/test/PrimeTokensBalance.test.tsx (2 hunks)
  • src/apps/pillarx-app/components/ReceiveModal/ReceiveModal.tsx (3 hunks)
  • src/apps/pillarx-app/components/ReceiveModal/test/ReceiveModal.test.tsx (1 hunks)
  • src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (4 hunks)
  • src/apps/pillarx-app/components/TopTokens/test/TopTokens.test.tsx (6 hunks)
  • src/apps/pillarx-app/components/WalletPortfolioBalance/WalletPortfolioBalance.tsx (2 hunks)
  • src/apps/pillarx-app/components/WalletPortfolioBalance/test/WalletPortfolioBalance.test.tsx (1 hunks)
  • src/apps/pillarx-app/components/WalletPortfolioGraph/BalancePnlGraph.tsx (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
src/apps/pillarx-app/components/PrimeTokensBalance/PrimeTokensBalance.tsx (1)
src/apps/pillarx-app/hooks/useReducerHooks.tsx (1)
  • useAppSelector (6-6)
src/apps/pillarx-app/components/ReceiveModal/ReceiveModal.tsx (2)
src/apps/pillarx-app/reducer/WalletPortfolioSlice.ts (1)
  • setIsReceiveModalOpen (128-130)
src/apps/simpleswap/hooks/useComponentVisible.js (1)
  • handleClickOutside (7-14)
src/apps/pillarx-app/components/WalletPortfolioBalance/WalletPortfolioBalance.tsx (1)
src/utils/number.tsx (1)
  • limitDigitsNumber (42-69)
src/apps/pillarx-app/components/WalletPortfolioGraph/BalancePnlGraph.tsx (1)
src/utils/number.tsx (1)
  • limitDigitsNumber (42-69)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unit-tests
  • GitHub Check: build
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (20)
src/apps/pillarx-app/components/ReceiveModal/ReceiveModal.tsx (2)

84-86: The modalRef is correctly applied to the modal container.

This properly connects the ref to the DOM element for the click-outside detection.


92-92: Good simplification of onClick handler.

Directly passing the handler function rather than wrapping it in an arrow function is more efficient.

src/apps/pillarx-app/components/ReceiveModal/test/ReceiveModal.test.tsx (1)

117-136: Great test for ESC key dismissal behavior.

The test properly verifies that pressing the Escape key triggers the modal close action. It follows the test patterns established in the file with appropriate mocks and assertions.

src/apps/pillarx-app/components/WalletPortfolioBalance/test/WalletPortfolioBalance.test.tsx (1)

120-120: Updated test assertion to match new formatting

The test assertion now expects -$500.00 with two decimal places, which aligns with the updated formatting in the component where the USD change text now uses .toFixed(2). Good consistency between component implementation and test.

src/apps/pillarx-app/components/TopTokens/test/TopTokens.test.tsx (6)

2-2: Added MemoryRouter import for router context in tests

The import of MemoryRouter is necessary to provide router context for the component during testing.


59-64: Wrapped component in MemoryRouter for router context

The TopTokens component now requires router context, likely because it uses navigation hooks internally. This change ensures the component has the necessary context during testing.


81-85: Wrapped component in MemoryRouter for loading state test

Consistent application of the router context in the loading state test case.


102-106: Wrapped component in MemoryRouter for error state test

Consistent application of the router context in the error state test case.


139-143: Wrapped component in MemoryRouter for empty tokens test

Consistent application of the router context in the empty tokens test case.


164-168: Wrapped component in MemoryRouter for token data test

Consistent application of the router context in the token data rendering test case.

src/apps/pillarx-app/components/WalletPortfolioBalance/WalletPortfolioBalance.tsx (2)

76-77: Improved formatting consistency with two decimal places

The change ensures that both positive and negative balance changes are displayed with consistent decimal precision (always two decimal places) by applying .toFixed(2) after the limitDigitsNumber function. This improves UI consistency and readability.


103-103: Updated flex item alignment from baseline to center

Changed the alignment of flex items from items-baseline to items-center for better vertical alignment of the balance change and percentage elements.

src/apps/pillarx-app/components/PrimeTokensBalance/PrimeTokensBalance.tsx (2)

31-33: Added loading state selector

Added a selector to get the isWalletPortfolioLoading flag from the Redux store, enabling better loading state handling in the component.


50-54: Added skeleton loader during loading state

Added conditional rendering to show a skeleton loader placeholder when data is loading, which prevents premature rendering of incomplete data and improves user experience during data fetching.

src/apps/pillarx-app/components/PrimeTokensBalance/test/PrimeTokensBalance.test.tsx (1)

52-59: Mock wrapper shape now mirrors reducer – good catch

Switching from a flat object to the nested shape { walletPortfolio: { … } } keeps the test aligned with the updated selector logic and avoids silent undefined assertions.
Looks correct and keeps the test resilient to further state‐shape changes.

src/apps/pillarx-app/components/WalletPortfolioGraph/BalancePnlGraph.tsx (1)

341-359: Verify direction of “latest” PnL value

For balance you take the last point (graphValues[graphValues.length-1]), but for PnL you take the first (graphValues[0]).
Unless the PnL dataset comes in reverse chronological order this will display the oldest value. Please confirm ordering; if both datasets are ascending in time, use the last element for both.

- const latestGraphValue = isBalanceGraph
-   ? graphValues[graphValues.length - 1]
-   : graphValues[0];
+ const latestGraphValue = graphValues[graphValues.length - 1];
src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (3)

26-34: useNavigate integration looks good

Injecting routing directly into the component removes prop-drilling and keeps navigation concerns local.


53-69: Boolean flags read well – nice consolidation

Deriving isLoading, isError, and showEmptyState here simplifies the JSX flow and prevents deep nested ternaries later on.


70-79: Loading skeleton ✅

Early return keeps the DOM shallow and avoids multiple conditional branches.

config-overrides.js (1)

30-39:

Details

❓ Verification inconclusive

Disabling custom chunk splitting may affect bundle sizes and loading performance.

Commenting out the splitChunks configuration removes the custom chunking strategy that was previously limiting vendor chunks from node_modules to 50KB. This change will revert to webpack's default chunking behavior.

Please verify that this change resolves the UI issues identified in QA without negatively impacting:

  1. Initial load performance
  2. Bundle sizes
  3. Caching effectiveness

🏁 Script executed:

#!/bin/bash
# Check the impact on bundle sizes before and after this change

# Look for build size information in recent builds
echo "Searching for build size information in logs..."
git log -n 10 --grep="build size" --pretty=format:"%h %s %b"

# Check webpack config in package.json
echo -e "\nChecking webpack configurations in package.json..."
cat package.json | grep -A 10 -B 10 webpack

Length of output: 976


Action Required: Verify Impact of Removing Custom Chunk Splitting

Removing the splitChunks override in config-overrides.js falls back to webpack’s default chunking, which may increase vendor bundle sizes and affect load performance or caching. There are no recent “build size” entries in git logs and no webpack settings in package.json, so please verify manually:

• Run a production build (e.g. npm run build) before/after this change and compare bundle artifact sizes
• Measure initial load performance (Lighthouse, Web Vitals)
• Confirm effective caching (inspect fingerprinted filenames and cache-control headers)

@github-actions github-actions bot temporarily deployed to Preview (feat/PRO-3182/portfolio-tile-refactor) May 22, 2025 15:18 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (1)

110-111: Navigation URL has a redundant & and should be encoded

The generated URL starts with ?&asset=… which is syntactically valid but untidy. Also, addresses may contain characters requiring encoding.

- `/token-atlas?${`&asset=${token.contract.address}`}&blockchain=${parseInt(token.contract.chainId.split(':')[1], 10)}`
+ `/token-atlas?asset=${encodeURIComponent(
+     token.contract.address
+   )}&blockchain=${parseInt(token.contract.chainId.split(':')[1], 10)}`
🧹 Nitpick comments (2)
src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (2)

93-93: Fix the missing space in className

There's a missing space in the className property which could cause styling issues.

- <div className="tablet:hidden mobile:hidden desktop:flextext-[13px] font-normal text-white/[.5] text-end">
+ <div className="tablet:hidden mobile:hidden desktop:flex text-[13px] font-normal text-white/[.5] text-end">

105-107: Remove redundant key prop

The div has a redundant key prop since the parent React.Fragment already has a key.

  <React.Fragment key={`${token.asset.symbol}-${index}`}>
    <div
-     key={index}
      className="flex items-center flex-1 min-w-0 overflow-hidden cursor-pointer"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd47791 and 64a6e74.

⛔ Files ignored due to path filters (4)
  • src/apps/pillarx-app/components/MediaGridCollection/tests/__snapshots__/DisplayCollectionImage.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/TokensWithMarketDataTile/test/__snapshots__/TokensWithMarketDataTile.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/WalletPortfolioGraph/tests/__snapshots__/WalletPortfolioGraph.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/WalletPortfolioTile/test/__snapshots__/WalletPortfolioTile.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • src/apps/pillarx-app/components/TokensWithMarketDataTile/TokensWithMarketDataTile.tsx (2 hunks)
  • src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (4 hunks)
  • src/apps/pillarx-app/components/WalletPortfolioGraph/WalletPortfolioGraph.tsx (2 hunks)
  • src/apps/pillarx-app/components/WalletPortfolioTile/WalletPortfolioTile.tsx (1 hunks)
  • src/apps/pillarx-app/utils/constants.ts (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • src/apps/pillarx-app/utils/constants.ts
  • src/apps/pillarx-app/components/WalletPortfolioGraph/WalletPortfolioGraph.tsx
  • src/apps/pillarx-app/components/TokensWithMarketDataTile/TokensWithMarketDataTile.tsx
  • src/apps/pillarx-app/components/WalletPortfolioTile/WalletPortfolioTile.tsx
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unit-tests
  • GitHub Check: build
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
src/apps/pillarx-app/components/TopTokens/TopTokens.tsx (3)

54-68: Well-structured loading and error state handling

The refactored loading, error, and empty state logic is clear and provides a better user experience by correctly prioritizing the display of different states. This makes the component more robust and maintainable.


70-79: Good implementation of loading skeleton

The loading skeleton provides excellent visual feedback to users while data is being fetched. This is a great improvement to the user experience.


88-102: Well-structured responsive layout

The grid structure with responsive column definitions for different screen sizes enhances the usability across devices. The conditional display of elements based on screen size is well implemented.

// ESC key listener
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

always a personal favourite

Copy link
Collaborator

@IAmKio IAmKio left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot temporarily deployed to Preview (feat/PRO-3182/portfolio-tile-refactor) May 23, 2025 08:30 Inactive
@RanaBug RanaBug merged commit 5cbf111 into staging May 23, 2025
7 of 8 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 10, 2026
3 tasks
@coderabbitai coderabbitai bot mentioned this pull request Jan 20, 2026
3 tasks
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