fix: Blockaid disable disclosure scrollToBottom
Description
Replaces default Disclosure scrollToBottom behavior to fix issue where opening Blockaid Banner Alert "See Details" would scroll to the bottom
Adds tests for Disclosure component
Related issues
Fixes: https://github.com/MetaMask/metamask-extension/issues/21187
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] I've clearly explained what problem this PR is solving and how it is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
- [ ] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft".
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.
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.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
391e9e7) 68.55% compared to head (a4be5c5) 68.55%. Report is 16 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #22932 +/- ##
========================================
Coverage 68.55% 68.55%
========================================
Files 1088 1088
Lines 42907 42906 -1
Branches 11415 11412 -3
========================================
Hits 29411 29411
+ Misses 13496 13495 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [533198b]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1057 ± 67 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 123 | 264 | 177 | 38 | 18 |
| domContentLoaded | 10 | 86 | 29 | 20 | 9 | ||
| load | 809 | 1528 | 1057 | 139 | 67 | ||
| domInteractive | 10 | 86 | 29 | 20 | 9 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 120 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [a4be5c5]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (962 ± 57 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 136 | 294 | 188 | 31 | 15 |
| domContentLoaded | 9 | 86 | 38 | 26 | 13 | ||
| load | 763 | 1407 | 962 | 119 | 57 | ||
| domInteractive | 9 | 86 | 38 | 26 | 13 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 176 Bytes (0.00%)
- common: 0 Bytes (0.00%)