Performance sharing FEDEV-2835#2620
Open
qwinndev wants to merge 11 commits into
Open
Conversation
Deploying gmx-interface-home with
|
| Latest commit: |
201c493
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e8fa4380.gmx-interface-home.pages.dev |
| Branch Preview URL: | https://performance-sharing-fedev-28.gmx-interface-home.pages.dev |
Deploying gmx-interface with
|
| Latest commit: |
201c493
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f82560bd.gmx-interface.pages.dev |
| Branch Preview URL: | https://performance-sharing-fedev-28.gmx-interface.pages.dev |
…cycle - pnlSummaryBuckets: match the selected period by local calendar day (differenceInCalendarDays / startOfYear) instead of UTC-day truncation, so today/week/month/year no longer become unreachable for UTC-ahead users and the 7d/30d presets stay stable across DST. Add a spec. - PerformanceShareCard: hide the Win rate stat when winsLossesRatioBps is undefined (no closed trades) instead of showing a false "0.00%", matching GeneralPerformanceDetails. - PerformanceShare: look up the referral code on the connected wallet chain (where CreateReferralCode registers) rather than the dashboard ?network= chain, so the create-code prompt and shared code match the wallet. - DailyAndCumulativePnL: unmount the share modal after it closes so its referral polling and PnL queries stop in the background, refresh the period bucket on reopen, and reset state when the account is no longer own.
Playwright Component Test ReportAll tests passed. Commit 201c493 |
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.
FEDEV-2835
Adds a "Share PnL" action to the Daily and Cumulative PnL card on the Account Dashboard, opening a share modal with a 460x240 performance card.
/tradeshare infrastructure: same image upload + share link flow (uploadElementAsShareImage/getShareURL), referral code behavior including the create-code prompt, and action labels (Copy link, Copy image/Share, Share on X)accountPnlSummaryStatsbuckets; the chart's selected from-date maps to a bucket by UTC day boundaries (today / last 7d / last 30d / this year / all time), other periods fall back to all time so the card's stats, period label, and chart stay consistentSharePositionClickanalytics event like the other share entry pointsusePnlHistoricalDataextracted fromDailyAndCumulativePnL.tsxunchanged so the modal can reuse it; bucket labels shared withGeneralPerformanceDetailsShared share-modal code extracted into
components/ShareModal/and reused by bothPositionShareandPerformanceShare(no behavior changes for/tradesharing):useShareReferralCodeState— affiliate/used code resolution, create-code card + skip-prompt state and analyticsuseShareCardActions— image upload, copy link / copy image / tweet handlers with analyticsShareCardActionButtons,SkipReferralCodeBanner,ShareCardFrame,ShareCardStat,ShareCardReferralCodeStat,ShareCardQRCode,ShareCardPnlValue— shared modal/card UI piecesCreateReferralCodemoved fromcomponents/PositionShare/tocomponents/ShareModal/