Commit a571f5f
feat: added sidepanel icon (#37777)
This PR is to add sidepanel/popup icon to the DS component library.
It also fixes an edge case with the Advanced Settings `Show extension in
full-size view` button where users who have turned sidepanel on after
enabling this will see sidepanel by default.
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:null
## **Related issues**
Fixes:
[https://consensyssoftware.atlassian.net/browse/CEUX-684](https://consensyssoftware.atlassian.net/browse/CEUX-684)
)
## **Manual testing steps**
1. In storybook, check sidepanel icon
2. Go to popup view or sidepanel and check the icon in global menu
## **Screenshots/Recordings**
### **Before**
NA
### **After**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->


## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds popup/sidepanel icons to the design system, uses them for the
view toggle in the global menu, and enables the full-size opening
behavior from sidepanel too.
>
> - **Design System / Icons**:
> - Add `app/images/icons/popup.svg` and
`app/images/icons/sidepanel.svg`.
> - Expose `IconName.Popup` and `IconName.Sidepanel` in
`ui/components/component-library/icon/icon.types.ts`.
> - **Global Menu**
(`ui/components/multichain/global-menu/global-menu.tsx`):
> - Replace viewport toggle to use `IconName.Popup`/`IconName.Sidepanel`
and `isSidePanelDefault` logic; update metrics payload and close
behavior.
> - Add divider after notifications section.
> - **Routing / Behavior** (`ui/pages/routes/routes.component.tsx`):
> - Extend "Show extension in full-size view" to trigger when in
`ENVIRONMENT_TYPE_SIDEPANEL` as well as popup.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
592283c. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: ameliejyc <amelie.chan@gmail.com>1 parent c3cb78d commit a571f5f
File tree
5 files changed
+51
-30
lines changed- app/images/icons
- ui
- components
- component-library/icon
- pages/routes
5 files changed
+51
-30
lines changedLoading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
339 | 344 | | |
340 | 345 | | |
341 | 346 | | |
| |||
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
397 | 428 | | |
398 | 429 | | |
399 | 430 | | |
| |||
416 | 447 | | |
417 | 448 | | |
418 | 449 | | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
618 | 622 | | |
619 | 623 | | |
620 | 624 | | |
| |||
0 commit comments