Repository navigation
feat(web): per-component loading and mobile polish pass - #36
Merged
Merged
Conversation
New primitives: - Skeleton: Tailwind animate-pulse block with rounded corners - ChartSkeleton: SVG area-chart silhouette with shimmer sweep, axis ticks, grid lines, and a dashed secondary line - ChartCardSkeleton: full card placeholder (header + chart) for use in future dynamic loaders
StatCard now shows a small spinner in the value slot when
loading={true} (keeps label/icon visible). SortableTable renders
skeleton rows when loading and supports a new mobileOnly column
meta. Removed the sticky thead and the per-row border-b — moved
dividers to td.border-t for cleaner hover.
LavaAmount measures its container against the full text via a hidden off-screen duplicate; switches to the KMB-shortened form when full would overflow. Re-measures on parent resize and font load. formatNumberKMB now also supports trillions.
Charts show the new ChartSkeleton (animated area silhouette) while loading, replacing the generic spinner + text. All chart card headers and content use the same p-4/md:p-6 padding so the layout doesn't shift when the chart mounts.
Removed the page-level `if (isLoading) return <Loading />` in every page. Each page now renders its shell + all components immediately; loading flags are passed down per component so stat cards show spinners, tables show skeleton rows, pie charts show a donut skeleton, and charts show their own area-shape skeleton. Charts are imported directly (no more next/dynamic wrapper) so the chart card shell — title, description, range buttons, ChainSelect — renders immediately alongside everything else; only the plot area waits on data. Provider detail: always render Commission (and drop Claimable Rewards entirely) so the card count doesn't change between loading and loaded states. Header renders a skeleton for the moniker until the provider arrives, and the 'Not Found' fallback only fires after loading completes.
On mobile, replace the cramped services table with a bigger, tappable card list: chain icon + specId + health chip, total stake on the right, rotating chevron. Tap to expand a detail panel with the full stats grid (Self Stake, Delegation, Commission, Location, Addons/Extensions) and stacked interface cards. Expand content is upsized (text-base, px-3 py-1.5 pills, w-2.5 dots) to be comfortably readable on a phone. Desktop table is unchanged.
Mirrors the provider detail treatment: mobile gets a tappable card list (provider avatar, moniker, truncated lava@ address below, health chip, total stake on the right, expand chevron). Mobile rows are pre-sorted by total stake desc. Tap to expand a detail panel matching the provider-side styling. Desktop table unchanged.
Providers and chains list pages bumped on both mobile and desktop: 44px avatars/icons, text-lg moniker/name, text-xs truncated address, text-sm meta line, text-base total. Desktop tables go from text-sm to text-base with py-4 cell padding.
Mobile header is now 72px tall. Hamburger icon 24→28px, search magnifier 22→26px. Drawer spans the full width below the header with a solid bg-background (no bleed-through). Nav items are text-lg in rounded-xl rows with an accent left bar on the active route; network toggle is py-4 with shadow-inner. Safe-area inset padding added at the bottom so the last item isn't obscured by iOS home indicator.
On screens <768px the amount is rendered as the compact form unconditionally (skipping the measurement); desktop keeps the adaptive full-vs-compact behavior.
apps/web and apps/api import from @info/shared subpath exports (./utils, ./types) whose package.json export maps point at dist/*.js. Without a build, vitest cannot resolve them at test time — fixes ERR_MODULE_NOT_FOUND in apps/web format tests.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Second pass on the mobile experience, built around per-component loading and consistent mobile card lists.
Loading
Skeletonprimitive +ChartSkeleton(SVG area silhouette with shimmer sweep).StatCardandSortableTablegained aloadingprop — spinner and skeleton rows respectively.if (isLoading) return <Loading />. Each page renders its shell + all components immediately; loading state is passed per component. Chart shell (title, range buttons, filter) renders instantly — no morenext/dynamicloading gaps.Mobile structure
text-basewithpy-4cells.formatNumberKMBnow includesT.Header / side drawer
bg-background(no bleed-through). Rounded-xl nav items attext-lg, accent left bar on the active route, network toggle atpy-4withshadow-inner, safe-area padding at the bottom.Misc
Test plan
X.XM LAVAetc.