perf(governance): fix #236 proposal list layout shift and #239 lucide tree shaking#259
Open
Dopezapha wants to merge 1 commit into
Open
Conversation
…ow-Network#239 lucide direct imports Co-authored-by: Cursor <cursoragent@cursor.com>
|
@Dopezapha 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! 🚀 |
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.
Closes #236
Closes #239
PR Description
This PR closes frontend performance work for #236 and #239 on the four admin feature pages (governance, contracts, staking, consumers).
#236 — Eliminating layout shift on active proposal lists
Governance proposal cards previously risked cumulative layout shift when addresses were shortened during render, when active ballots showed a ledger countdown row that archived ballots did not, and when tab filters changed visible items without a reserved list surface. The list now pre-allocates vertical space for the full proposal stack, uses fixed card heights with overflow clipping, pre-computes shortened proposer addresses at module load, reserves a ledger countdown slot on every card (hidden when not active), and filters proposals by tab via
useMemowhile keeping the outer list container height stable.#239 — Streamlining Lucide icon imports via tree shaking
The four pages no longer import from the
lucide-reactbarrel. Each icon is pulled fromlucide-react/dist/esm/icons/<name>, and unused icons were removed from governance and contracts so production bundles do not retain dead icon modules.Why it matters: Reviewers and users on the governance flow see stable card geometry during hydration and live ledger ticks, and production builds avoid pulling the full Lucide namespace on these high-traffic admin routes.
Scope: Frontend-only. No backend, contract, or env changes.
Changed
src/app/governance/page.tsx: module-levelTRANSFORMED_PROPOSALS, fixed list/card dimensions, reserved ledger slot, tab filtering with stable list surfacesrc/app/governance/page.tsx: direct Lucide ESM icon imports; removed unused barrel iconssrc/app/contracts/page.tsx: direct Lucide ESM icon importssrc/app/staking/page.tsx: direct Lucide ESM icon importssrc/app/consumers/page.tsx: direct Lucide ESM icon imports