Skip to content

Comments

Minor UI issues fixes after QA#338

Merged
RanaBug merged 1 commit intostagingfrom
feat/px-points-migration-board
Jun 18, 2025
Merged

Minor UI issues fixes after QA#338
RanaBug merged 1 commit intostagingfrom
feat/px-points-migration-board

Conversation

@RanaBug
Copy link
Collaborator

@RanaBug RanaBug commented Jun 18, 2025

Description

  • Minor UI issues fixes after QA

How Has This Been Tested?

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

  • Style
    • Improved the responsiveness of the InfoBanner component for better layout and icon sizing across desktop, tablet, and mobile devices.
    • Updated header label alignment in the leaderboard's "My rank" section for clearer presentation on different screen sizes.
    • Enhanced PointsCard tooltip behavior, ensuring it displays above the card with improved positioning and hover animation.

@RanaBug RanaBug requested a review from IAmKio June 18, 2025 09:14
@RanaBug RanaBug self-assigned this Jun 18, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 18, 2025

Walkthrough

This update introduces responsive design improvements to the InfoBanner and LeaderboardTab components, adjusting layout, alignment, and icon sizing for different device breakpoints. The PointsCard component is also refactored to render its tooltip above the card with improved positioning and conditional rendering, enhancing the user interface without altering component APIs.

Changes

File(s) Change Summary
src/apps/leaderboard/components/InfoBanner/InfoBanner.tsx Updated container and icon classes for responsive padding, sizing, and alignment across breakpoints.
src/apps/leaderboard/components/LeaderboardTab/LeaderboardTab.tsx Adjusted header label alignment for "USD value" and "PX Points" in the "My rank" section.
src/apps/leaderboard/components/PointsCards/PointsCard.tsx Refactored tooltip: conditionally rendered above card, improved positioning, and hover animation.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant PointsCard
  participant Tooltip

  User->>PointsCard: Hover over card
  PointsCard->>Tooltip: Conditionally render if textTooltip exists
  Tooltip-->>User: Display tooltip above card with animation
Loading

Suggested reviewers

  • IAmKio
  • vignesha22

Poem

Hopping through code with a nimble delight,
Responsive banners now fit just right!
Tooltips float above with grace,
Points and ranks in their perfect place.
A carrot for you, for work so neat—
This leaderboard’s never been so sweet! 🥕✨

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 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-06-18T09_16_06_933Z-debug-0.log

✨ 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.

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

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: 1

🧹 Nitpick comments (1)
src/apps/leaderboard/components/LeaderboardTab/LeaderboardTab.tsx (1)

75-81: justify-* has no effect on non-flex elements – safe to drop

Body renders plain text (likely a <p>).
Tailwind’s justify-start / justify-end work only on flex containers, so these classes add noise without changing layout.

-              <Body className="text-white/[.5] text-left mobile:hidden desktop:flex tablet:flex justify-start">
+              <Body className="text-white/[.5] text-left mobile:hidden desktop:flex tablet:flex">
@@
-              <Body className="text-white/[.5] text-right mobile:hidden desktop:flex tablet:flex justify-end">
+              <Body className="text-white/[.5] text-right mobile:hidden desktop:flex tablet:flex">
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f7b1524 and c287203.

⛔ Files ignored due to path filters (2)
  • src/apps/leaderboard/components/PointsCards/tests/__snapshots__/PointsCard.test.tsx.snap is excluded by !**/*.snap
  • src/apps/pillarx-app/components/MediaGridCollection/tests/__snapshots__/DisplayCollectionImage.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • src/apps/leaderboard/components/InfoBanner/InfoBanner.tsx (2 hunks)
  • src/apps/leaderboard/components/LeaderboardTab/LeaderboardTab.tsx (1 hunks)
  • src/apps/leaderboard/components/PointsCards/PointsCard.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/apps/leaderboard/components/LeaderboardTab/LeaderboardTab.tsx (1)
src/apps/simpleswap/components/NewCoinsDropdown/styles.ts (1)
  • Body (29-35)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: unit-tests
  • GitHub Check: lint
  • GitHub Check: build
  • GitHub Check: Cloudflare Pages: x
🔇 Additional comments (1)
src/apps/leaderboard/components/PointsCards/PointsCard.tsx (1)

26-33: Tooltip is hover-only – add keyboard support & keep it non-interactive

The tooltip becomes visible on group-hover but stays hidden for keyboard users (Tab, Enter, screen-readers).
Also, without pointer-events-none, the tooltip can steal the cursor and flicker.

-      {textTooltip && (
-        <div className="absolute bottom-full mb-2 left-0 rounded-lg border border-white/[.05] bg-[#25232D] px-2.5 py-2 text-[10px] text-white italic font-normal opacity-0 group-hover:opacity-100 transition-all duration-200 z-10 max-w-max w-fit origin-bottom scale-y-0 group-hover:scale-y-100 transform">
+      {textTooltip && (
+        <div className="absolute bottom-full mb-2 left-0 rounded-lg border border-white/[.05] bg-[#25232D] px-2.5 py-2 text-[10px] text-white italic font-normal opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-all duration-200 z-10 max-w-max w-fit origin-bottom scale-y-0 group-hover:scale-y-100 group-focus-within:scale-y-100 transform pointer-events-none">

This keeps the UX identical for mouse users while exposing the tooltip on focus for accessibility and preventing hover-flicker.
[ suggest_essential_refactor ]

Comment on lines +26 to 28
<div className="flex-shrink-0 flex items-center justify-center rounded-full bg-[#3C80FF]/[.4] desktop:w-9 desktop:h-9 tablet:w-9 tablet:h-9 mobile:w-4 mobile:h-4">
<InfoIcon className="mobile:w-[2.3px] h-auto" />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

InfoIcon almost disappears on mobile – width 2.3px looks like a typo

mobile:w-[2.3px] renders a ~2-pixel wide SVG which is barely visible on any device.
Swap it for a more sensible size (≈ 8-10 px) to preserve recognisability while still keeping the icon smaller than on tablet/desktop.

-          <InfoIcon className="mobile:w-[2.3px] h-auto" />
+          <InfoIcon className="mobile:w-[9px] h-auto" />
🤖 Prompt for AI Agents
In src/apps/leaderboard/components/InfoBanner/InfoBanner.tsx around lines 26 to
28, the InfoIcon's mobile width is set to 2.3px, making it nearly invisible.
Increase the mobile:w-[2.3px] value to a more reasonable size between 8px and
10px to ensure the icon remains visible and recognizable on mobile devices while
still smaller than on larger screens.

@cloudflare-workers-and-pages
Copy link

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: c287203
Status: ✅  Deploy successful!
Preview URL: https://780dbe73.x-e62.pages.dev
Branch Preview URL: https://feat-px-points-migration-boa.x-e62.pages.dev

View logs

@RanaBug RanaBug merged commit 77016bc into staging Jun 18, 2025
7 of 8 checks passed
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