Skip to content

Commit cbbe8a1

Browse files
authored
feat: added sidepanel (#38550)
This PR is to enable sidepanel ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38550?quickstart=1) ## **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: sidepanel enabled ## **Related issues** Fixes: ## **Manual testing steps** 1. Switch to sidepanel via global menu 2. Install fresh build, after onboarding we should be redirected to sidepanel ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **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] > Enable side panel by adding manifest permission/config and setting IS_SIDEPANEL=true in builds and E2E workflow. > > - **Manifests**: > - `app/manifest/v3/_base.json`: Add `"sidePanel"` permission. > - `app/manifest/v3/chrome.json`: Add `"side_panel"` with `default_path` to `sidepanel.html`. > - **Builds**: > - `builds.yml`: Set `IS_SIDEPANEL: true` for `main`, `beta`, `experimental`, `flask`, and global `env`. > - **CI**: > - `.github/workflows/run-e2e.yml`: Set `IS_SIDEPANEL: true` in job `env`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d193d56. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent f2fa96c commit cbbe8a1

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/run-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
RUN_ID: ${{ github.run_id }}
7575
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
7676
TEST_SUITE_NAME: ${{ inputs.test-suite-name }}
77-
IS_SIDEPANEL: false
77+
IS_SIDEPANEL: true
7878
steps:
7979
- name: Checkout and setup environment
8080
uses: MetaMask/action-checkout-and-setup@v1

app/manifest/v3/_base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"unlimitedStorage",
8888
"webRequest",
8989
"offscreen",
90-
"identity"
90+
"identity",
91+
"sidePanel"
9192
],
9293
"sandbox": {
9394
"pages": ["snaps/index.html"]

app/manifest/v3/chrome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"matches": ["http://*/*", "https://*/*"],
1111
"ids": ["*"]
1212
},
13-
"minimum_chrome_version": "115"
13+
"minimum_chrome_version": "115",
14+
"side_panel": {
15+
"default_path": "sidepanel.html"
16+
}
1417
}

builds.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ buildTypes:
3434
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
3535
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
3636
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
37-
- IS_SIDEPANEL: false
37+
- IS_SIDEPANEL: true
3838
- EXTENSION_UX_PNA25: true
3939
# for seedless onboarding (social login)
4040
- GOOGLE_PROD_CLIENT_ID
@@ -69,7 +69,7 @@ buildTypes:
6969
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
7070
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
7171
- ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management
72-
- IS_SIDEPANEL: false
72+
- IS_SIDEPANEL: true
7373
- EXTENSION_UX_PNA25: true
7474
# for seedless onboarding (social login)
7575
- GOOGLE_BETA_CLIENT_ID
@@ -100,7 +100,7 @@ buildTypes:
100100
- INFURA_ENV_KEY_REF: INFURA_EXPERIMENTAL_PROJECT_ID
101101
- SEGMENT_WRITE_KEY_REF: SEGMENT_EXPERIMENTAL_WRITE_KEY
102102
- ALLOW_LOCAL_SNAPS: false
103-
- IS_SIDEPANEL: false
103+
- IS_SIDEPANEL: true
104104
- REQUIRE_SNAPS_ALLOWLIST: true
105105
- REJECT_INVALID_SNAPS_PLATFORM_VERSION: true
106106
- IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/10.2.3/index.html
@@ -140,7 +140,7 @@ buildTypes:
140140
- SEGMENT_WRITE_KEY_REF: SEGMENT_FLASK_WRITE_KEY
141141
- ACCOUNT_SNAPS_DIRECTORY_URL: https://metamask.github.io/snaps-directory-staging/main/account-management
142142
- EIP_4337_ENTRYPOINT: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
143-
- IS_SIDEPANEL: false
143+
- IS_SIDEPANEL: true
144144
- EXTENSION_UX_PNA25: true
145145
# for seedless onboarding (social login)
146146
- GOOGLE_FLASK_CLIENT_ID
@@ -467,4 +467,4 @@ env:
467467

468468
# PNA25 (Privacy Notice)
469469
- EXTENSION_UX_PNA25: true
470-
- IS_SIDEPANEL: false
470+
- IS_SIDEPANEL: true

0 commit comments

Comments
 (0)