Skip to content

fix: markets loading state uses full width to align with filters#374

Merged
antoncoding merged 1 commit intomasterfrom
fix/markets-loading-width
Feb 7, 2026
Merged

fix: markets loading state uses full width to align with filters#374
antoncoding merged 1 commit intomasterfrom
fix/markets-loading-width

Conversation

@starksama
Copy link
Copy Markdown
Collaborator

@starksama starksama commented Feb 7, 2026

Problem

When the markets view is loading, the loading card had adaptive width, causing misalignment with the filter bar.

Solution

Changed the containerClassName logic to always use the passed className prop (defaults to w-full) instead of replacing it with container items-center during loading states.

Before: Loading state replaces className → width inconsistency
After: Loading state keeps className + adds items-center → consistent full width

Summary by CodeRabbit

Release Notes

  • Refactor
    • Enhanced markets table container styling by refactoring how conditional CSS classes are composed and applied across different component states (loading, empty, or displaying data). The updated approach improves code maintainability and clarity.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monarch Ready Ready Preview, Comment Feb 7, 2026 7:32am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 7, 2026

📝 Walkthrough

Walkthrough

The MarketsTable component's className construction logic was refactored. Instead of concatenating conditional classes with the provided className, it now builds an array that includes a default 'w-full' class, conditionally adds 'items-center', and filters empty values before joining.

Changes

Cohort / File(s) Summary
MarketsTable className composition
src/features/markets/components/table/markets-table.tsx
Updated how container classes are built—changed from string concatenation to array-based approach with conditional 'items-center' and default 'w-full' class.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main fix: the markets loading state now uses full width to align with filters, which matches the changeset that updates className composition logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/markets-loading-width

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner

@antoncoding antoncoding left a comment

Choose a reason for hiding this comment

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

LGTM

@antoncoding antoncoding merged commit 566770c into master Feb 7, 2026
4 checks passed
@antoncoding antoncoding deleted the fix/markets-loading-width branch February 7, 2026 07:42
@coderabbitai coderabbitai Bot mentioned this pull request Feb 27, 2026
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