feat(share-pnl): add leverage to meta row and canvas-rendered logo#160
Merged
Conversation
Drop the asset coin icon from the meta row and replace the row with a single-line, synchronous text layout: direction in caps colored by position direction, leverage as xN.N, separator, ticker. Format reads LONG x2.5 | BTC or SHORT x2.5 | BTC and aligns with the convention used by Binance / MEXC / Hyperliquid share cards. Effective leverage is computed from (downPayment + totalDebt) / downPayment off LeaseDisplayData. The segment is omitted when downPayment is non-positive — defensive only; should not happen in practice. Slight upward drift from accrued interest is documented in a code comment and accepted for the lifetime of a share card. Collapse per-cover PnL colors to a single brand pair so the green and red read consistently across the share library: PNL_POSITIVE #1AB171 and PNL_NEGATIVE #AB1F3B. The orange cover may show low contrast on the brand red — known trade-off; the cover gets dropped from the options if it doesn't read in practice rather than forking colors per illustration. Canvas-render the Nolus logo top-left at 252x64. Light variant on the dark navy cover, dark variant on the three light covers. Slots into the existing per-canvas render chain (awaited inside renderCard before the meta row paints). Sits on top of the baked-in logo on the current cover assets — preview pass before the assets are re-exported without the logo. Add nolus.io as a small muted footer below the timestamp. Matches the brand placement pattern used on Nolus marketing creatives.
kostovster
added a commit
that referenced
this pull request
May 8, 2026
The light grey SVG cover (share-image-1.svg) had a different design language from the other three and was visually inconsistent in the share library. Drop it from the cover options entirely. Replace the remaining three PNG covers with re-exported versions that no longer bake in the Nolus logo. The canvas-rendered logo from #160 now stands alone instead of overlapping a baked-in twin. images and palettes arrays shrink from 4 to 3 entries in lockstep so their indices stay aligned. imageIndex defaults to 0, which now points at the dark navy cover (was the deleted SVG).
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
Third polish iteration for the Share PnL dialog. Drops the asset coin icon from the meta row in favor of a leverage-aware single-line layout, collapses PnL colors to a single brand pair across all four covers, and starts canvas-rendering the Nolus logo + a
nolus.iofooter.Changes
LONG x2.5 | BTC(SHORT x2.5 | BTCfor shorts). Direction in caps colored by position direction, leverage asxN.Nfrom(downPayment + totalDebt) / downPayment, separator|muted, ticker in primary text color. Leverage segment omits ifdownPaymentis non-positive.pnlPositive/pnlNegativefrom PR-A is removed. Two module-level constantsPNL_POSITIVE = #1AB171andPNL_NEGATIVE = #AB1F3Bapply to every cover. Visual consistency wins over the orange-cover contrast trade-off; if that cover ends up unreadable in practice it gets dropped from the options rather than forking the palette.setLogopaintslogo-light.svgon the dark cover andlogo-dark.svgon the three light covers, top-left at 252×64. Awaited insiderenderCardso it slots into the existing per-canvasWeakMapchain. Sits on top of the baked-in logo for now — this is a preview pass to validate placement before the cover assets are re-exported without the logo.nolus.iofooter: small muted text below the timestamp at bottom-left, matching the brand placement on Nolus marketing creatives.Verification
npm run lintcleannpm run format:checkcleannpm run buildcleannpm test760/760 passingFollow-ups