Repository navigation
Conversation
|
@Thadd102 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Hi @Thadd102, thanks for this PR! It currently deletes 5,988 lines of existing code, most likely because your branch is based on an older copy of main. Please rebase on the latest main and keep only the changes for your issue, then push again. We'll merge it as soon as that's done. 🙏 |
i resolved a conflict, check and merge |
…lesheets (CalloraOrg#1385) Extract marketplace, deposit, billing, landing, API detail, API usage, webhook, latency chart, and theme playground sections from src/index.css (8,108 -> 3,103 lines) into co-located CSS files imported by their owning components. - Remove exact duplicate Category Pills, Share Snapshot, LandingPage, and FiltersSidebar rules (verified 0 lost / 0 added rules via normalized AST diff). - Preserve cascade order for @layer focus, BillingHistory.css, ApiDetailStickyTOC.css, QuotaBanner.css, and DepositPreview.css. - Document the co-located stylesheet architecture in docs/UI-Design-System.md.
32f73c0 to
8f30a5b
Compare
Closes #1385
Splits the 8,108-line monolith
src/index.cssinto co-located per-feature and per-component stylesheets imported directly by their owning components, shrinkingsrc/index.cssto 3,103 lines (-61.7%) while keeping only global resets, design tokens,@layer focus, shared shell/button/badge/toast/skeleton utilities, and@media printrules insrc/index.css..lp-card*,.lp-footer*,@media.lp-*), and FiltersSidebar accessibility rules.@layer focus,src/styles/*, and existing co-located stylesheets (BillingHistory.css,ApiDetailStickyTOC.css,QuotaBanner.css,DepositPreview.css).docs/UI-Design-System.md.Stylesheet Inventory
@layer focus, shell, nav, buttons, status chips, toast, skeleton,@media printsrc/index.csssrc/main.tsxsrc/pages/MarketplacePage.csssrc/pages/MarketplacePage.tsx,src/pages/MarketplacePage.skeleton.tsxsrc/components/ApiCard.csssrc/components/ApiCard.tsx,src/pages/MarketplacePage.skeleton.tsxsrc/components/FiltersSidebar.csssrc/components/FiltersSidebar.tsxsrc/components/CategoryPills.csssrc/components/CategoryPills.tsxsrc/pages/SortMenu.csssrc/pages/SortMenu.tsxsrc/pages/ApiTagFilter.csssrc/pages/ApiTagFilter.tsxsrc/components/DepositPreview.csssrc/components/DepositPreview.tsx,src/App.tsx.billing-history.bh-page)src/pages/BillingHistory.csssrc/pages/BillingHistory.tsxsrc/pages/InvoiceCard.csssrc/pages/InvoiceCard.tsx.launch-home,.lp-*, deduplicated)src/app/landing.csssrc/app/LandingPage.tsxsrc/pages/ApiDetailPage.csssrc/pages/ApiDetailPage.tsx,src/pages/ApiDetailPage.skeleton.tsxsrc/pages/QuotaBanner.csssrc/pages/QuotaBanner.tsxsrc/components/EndpointGroupHover.csssrc/components/EndpointGroupHover.tsxsrc/components/EndpointPreview.csssrc/components/EndpointPreview.tsxsrc/components/ApiDetailStickyTOC.csssrc/components/ApiDetailStickyTOC.tsxsrc/components/WhyApi.csssrc/components/WhyApi.tsxsrc/pages/SubscribeCTA.csssrc/pages/SubscribeCTA.tsxsrc/pages/ApiUsage.csssrc/pages/ApiUsage.tsx,src/ApiUsage.tsxsrc/components/RequestHistoryPanel.csssrc/components/RequestHistoryPanel.tsxsrc/components/CallsHeatmap.csssrc/components/CallsHeatmap.tsxsrc/components/CallHistoryRow.csssrc/components/CallHistoryRow.tsxsrc/pages/WebhookDeliveries.csssrc/pages/WebhookDeliveries.tsxsrc/pages/LatencyChart.csssrc/pages/LatencyChart.tsxsrc/pages/ThemePlayground.csssrc/pages/ThemePlayground.tsxVerification
1. Rule-Set Diff (Zero Lost / Zero Added Rules)
Ran a Node.js CSS rule parser that strips comments, recursively tracks
@media/@supports/@layercontexts, splits comma-separated selectors, normalizes declarations, and diffs the sorted rule multiset before (src/index.css+ 4 existing component CSS files) vs. after (src/index.css+ all 24 co-located CSS files):002 → 1):25(Category Pills.pill-bar/.pill-bar::-webkit-scrollbar,.share-snapshot-button, duplicate.lp-card*/.lp-footer*/@media.lp-*/.app-shell, and duplicate.filter-*base rules)2. CSS Bundle Size Comparison (via
esbuildCSS minifier across all stylesheets)src/index.css: 8,108 lines)src/index.css: 3,103 lines)3. Tests (
npx vitest run)All CSS contract tests and touched component suites pass with zero assertion edits:
src/focus-layer.test.ts(18/18 passed)src/styles/patterns.test.tsx(6/6 passed)src/patterns.test.ts(11/11 passed)src/styles/forcedColors.test.ts(8/8 passed)src/coverage-config.test.ts(6/6 passed)src/pages/SortMenu.test.tsx(2/2 passed)src/components/DepositPreview.test.tsx(7/7 passed)src/pages/BillingHistory.test.tsx(73/73 passed)src/pages/InvoiceCard.test.tsx(14/14 passed)src/pages/ThemePlayground.test.tsx(25/25 passed)src/components/WhyApi.test.tsx(36/36 passed)src/components/CallsHeatmap.test.tsx(14/14 passed)src/pages/LatencyChart.test.tsx(12/12 passed)4. Visual Spot Checks
main's pre-existingHealthTimeline.tsx/CollectionsMenu.tsxsyntax errors are resolved.