Skip to content

Conversation

@sophieqgu
Copy link
Contributor

@sophieqgu sophieqgu commented Nov 13, 2025

Description

https://consensyssoftware.atlassian.net/browse/RWDS-793
Allow rewards badge to be hidden

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

Screenshot 2025-11-12 at 9 44 59 PM

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Adds a closeable Rewards badge that persists hidden state and updates rendering logic to respect it.

  • UI/Components
    • RewardsBadge: supports allowHideBadge; shows a close icon on hover; hides on click via setRewardsBadgeHidden(true) and persists REWARDS_BADGE_HIDDEN to storage; minor structure/class tweaks.
    • RewardsPointsBalance: reads REWARDS_BADGE_HIDDEN from storage on mount; conditionally renders badge/skeleton based on rewardsBadgeHidden; adjusts onboarding "seen" handling via setOnboardingModalRendered.
  • State (ducks)
    • Adds rewardsBadgeHidden to RewardsState with action setRewardsBadgeHidden and selector selectRewardsBadgeHidden; initializes to true.
    • Exposes REWARDS_BADGE_HIDDEN constant.
  • Tests
    • Updates/extends tests for reducers/selectors (setRewardsBadgeHidden, selectRewardsBadgeHidden).
    • RewardsBadge.test: mocks useDispatch; verifies rendering and image/error behavior.

Written by Cursor Bugbot for commit a7209b6. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-rewards Rewards team label Nov 13, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [2f85d95]
UI Startup Metrics (1235 ± 80 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1235109914968012861386
load105592612697611011191
domContentLoaded104788612527710961185
domInteractive221492171971
firstPaint63991126742110611197
backgroundConnect23121631314235248
firstReactRender27179092943
getState2276092840
initialActions001001
loadScripts824669101477877968
setupStore1277981325
numNetworkReqs1367619670
BrowserifyPower User HomeuiStartup16421474212020418912120
load1030902135516412671355
domContentLoaded1023898135016412601350
domInteractive421512641103126
firstPaint4408313573689241357
backgroundConnect23321825811240258
firstReactRender27263522735
getState16812521219182212
initialActions001001
loadScripts800674112116110391121
setupStore12102741127
numNetworkReqs1267325067187250
WebpackStandard HomeuiStartup8166991159768251002
load60555895668607796
domContentLoaded59755392564597782
domInteractive171181121447
firstPaint24258928222207785
backgroundConnect251078152960
firstReactRender3017158153436
getState1263451318
initialActions001001
loadScripts59455291562595772
setupStore1162431316
numNetworkReqs1367519872
WebpackPower User HomeuiStartup1070880182629712141826
load661567974139847974
domContentLoaded645557932129808932
domInteractive36131584368158
firstPaint30161852255569852
backgroundConnect44161775438177
firstReactRender27242912729
getState1368416125152161
initialActions001001
loadScripts641555922126798922
setupStore1562992529
numNetworkReqs1086822353163223
FirefoxBrowserifyStandard HomeuiStartup14761304200512415281737
load1243110315209012981414
domContentLoaded1243110215199012981413
domInteractive1063532349111216
firstPaint------
backgroundConnect4424181214980
firstReactRender26215162641
getState1173041117
initialActions001001
loadScripts1218108615018912801395
setupStore157201211332
numNetworkReqs1266615756
BrowserifyPower User HomeuiStartup22031823322951125683229
load13931152205327017112053
domContentLoaded13931152205227017112052
domInteractive20384545175419545
firstPaint------
backgroundConnect11730744168143744
firstReactRender473073125273
getState1286719232143192
initialActions101011
loadScripts13341131176822116181768
setupStore4052515961251
numNetworkReqs1317032787172327
WebpackStandard HomeuiStartup16051452227714816181964
load13661197191311314061636
domContentLoaded13651197191211314051636
domInteractive963257661102165
firstPaint------
backgroundConnect46261372448111
firstReactRender332482103641
getState1275081229
initialActions001001
loadScripts13361179189110813701545
setupStore17679181270
numNetworkReqs1367018766
WebpackPower User HomeuiStartup23401909354454628383544
load15221298202323817562023
domContentLoaded15221298202223717562022
domInteractive19345630198427630
firstPaint------
backgroundConnect1083528776177287
firstReactRender47341151948115
getState13710227349150273
initialActions106116
loadScripts14741277195922717231959
setupStore17554151654
numNetworkReqs1346533392230333
📊 Page Load Benchmark Results

Current Commit: 2f85d95 | Date: 11/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±37ms) 🟢 | historical mean value: 721ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±9ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.01s 1.32s 1.07s 1.32s
domContentLoaded 722ms 37ms 697ms 991ms 738ms 991ms
firstPaint 76ms 9ms 60ms 144ms 84ms 144ms
firstContentfulPaint 76ms 9ms 60ms 144ms 84ms 144ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Copy link
Contributor

@Montoya Montoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is just one issue with this implementation.

After dismissing, upon opening the extension, the button appears briefly and then disappears. It should default to hidden and check if the user has dismissed before showing it, instead.

@Montoya
Copy link
Contributor

Montoya commented Nov 13, 2025

post-dismiss.mov

@sophieqgu sophieqgu requested a review from Montoya November 13, 2025 03:48
@metamaskbot
Copy link
Collaborator

Builds ready [a7209b6]
UI Startup Metrics (1281 ± 107 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12811123182910713501463
load109691115519711711236
domContentLoaded108990615279611641229
domInteractive231485171975
firstPaint63991156344910931228
backgroundConnect2392212709245255
firstReactRender2919109113345
getState24872122645
initialActions001001
loadScripts857679127593934995
setupStore1162741121
numNetworkReqs1367519669
BrowserifyPower User HomeuiStartup16891515230825120062308
load1052914146319213031463
domContentLoaded1044907145718912961457
domInteractive39151163793116
firstPaint71613414674689611467
backgroundConnect2342262548238254
firstReactRender27243532735
getState16910820220184202
initialActions001011
loadScripts816679121518610671215
setupStore1292841228
numNetworkReqs1417133777173337
WebpackStandard HomeuiStartup755634107080761923
load54449986265540695
domContentLoaded53749484462534668
domInteractive15114981441
firstPaint18450848186162668
backgroundConnect261263123254
firstReactRender3016161203251
getState1152831216
initialActions001001
loadScripts53449283761532661
setupStore1152641216
numNetworkReqs1467520872
WebpackPower User HomeuiStartup1073907160023213351600
load671586941116772941
domContentLoaded652574854101750854
domInteractive43131905294190
firstPaint36880860283610860
backgroundConnect47101725157172
firstReactRender29254852948
getState1419516225159162
initialActions001011
loadScripts64857284497739844
setupStore1363182431
numNetworkReqs1216924859167248
FirefoxBrowserifyStandard HomeuiStartup15211345206513715781817
load1278114515969713291476
domContentLoaded1278114415969713291476
domInteractive1103631851114226
firstPaint------
backgroundConnect4523178225294
firstReactRender27225352738
getState1174151221
initialActions001001
loadScripts1252112215589313071435
setupStore157214221233
numNetworkReqs1266416760
BrowserifyPower User HomeuiStartup21401772285632524142856
load13671142173619816341736
domContentLoaded13671141173619816341736
domInteractive20978633188478633
firstPaint------
backgroundConnect1034123565145235
firstReactRender45311121951112
getState1278425536134255
initialActions001011
loadScripts13251117168419716041684
setupStore4151423962142
numNetworkReqs1566738390235383
WebpackStandard HomeuiStartup16051377202814316441942
load13631197166710614151593
domContentLoaded13621197166710614151592
domInteractive963137547103219
firstPaint------
backgroundConnect49241322453115
firstReactRender352490143678
getState1276391224
initialActions001001
loadScripts1332117915869713841554
setupStore167226241342
numNetworkReqs1366817764
WebpackPower User HomeuiStartup22711904324735024803247
load15051278209123216712091
domContentLoaded15051278209023216702090
domInteractive17963771190198771
firstPaint------
backgroundConnect953529473135294
firstReactRender48321121851112
getState1207618929133189
initialActions304010140
loadScripts14701258206622516212066
setupStore4271984976198
numNetworkReqs1316225468214254
📊 Page Load Benchmark Results

Current Commit: a7209b6 | Date: 11/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±38ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±36ms) 🟢 | historical mean value: 721ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±14ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 38ms 1.01s 1.32s 1.07s 1.32s
domContentLoaded 723ms 36ms 702ms 990ms 747ms 990ms
firstPaint 77ms 14ms 60ms 196ms 88ms 196ms
firstContentfulPaint 77ms 14ms 60ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants