Skip to content

Commit 27e67db

Browse files
chore(home): remove unused home class selectors (#47675)
## **Description** Removes unused class selectors from `ui/pages/home/index.scss`. Owner set: `@MetaMask/core-extension-ux`. No component, HTML file, test, snapshot, story, or e2e selector applies these classes, and no stylesheet `@extend`s them. The tooltip theme rule is also dead: no `Tooltip` passes a `home__subheader-link--tooltip` theme, so react-tippy never adds `home__subheader-link--tooltip-theme`. The `.tippy-tooltip-content` and `.arrow-regular` rules nested under it go with it. Live siblings (`home__connected-status-popover`, `home__new-network-notification`, and `home__new-tokens-imported-notification` with `-title`, `-message`, `-icon`) are kept. | path | removed | why dead | | --- | --- | --- | | `ui/pages/home/index.scss` | `.home__connected-status-popover-bg`, `.home__connected-status-popover-bg-container` | unused class selector | | `ui/pages/home/index.scss` | `.home__new-network-notification-icon`, `.home__new-network-notification-close` | unused class selector | | `ui/pages/home/index.scss` | `.home__error-message` | unused class selector | | `ui/pages/home/index.scss` | `.home__new-tokens-imported-notification-close` | unused class selector | | `ui/pages/home/index.scss` | `.home__new-network-added` (+ `__check-circle`, `__switch-to-button`) | unused class selector | | `ui/pages/home/index.scss` | `.home__subheader-link` (+ `--tooltip-content*`, `--tooltip-theme`, `--text`) | unused class selector | No user-facing behavior change. Checks: `yarn lint:styles`, Sass compile of the file, `yarn test:unit --coverage=false ui/pages/home` (no snapshot updates). No JS/TS changed, so `yarn lint:tsc` and ESLint were not needed. Docs/comments updated: none ## **Changelog** CHANGELOG entry: null ## **Related issues** Refs: proactive dead-code cleanup (extension counterpart of metamask-mobile#37948) ## **Manual testing steps** N/A — deletes unreachable code. There is no user-facing behavior to click through. ## **Screenshots/Recordings** N/A — no UI change ### **Before** N/A — no UI change ### **After** N/A — no UI change ## **Pre-merge author checklist** - [x] 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). - [x] 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] > **Low Risk** > CSS-only deletion of unreachable selectors; no JS/TS or markup changes. > > **Overview** > Removes **dead SCSS** from `ui/pages/home/index.scss`—roughly 150 lines of class rules that nothing in the extension references (no JSX/HTML, tests, or `@extend`). > > Dropped blocks include connected-status popover background wrappers, notification icon/close variants, `home__error-message`, the “new network added” success panel styles, and the full `home__subheader-link` tooltip theme subtree. **Still styled** are the live pieces called out in the PR: `home__connected-status-popover`, the flex layout on `home__new-network-notification`, and `home__new-tokens-imported-notification` with `-title`, `-message`, and `-icon`. > > **No user-facing or runtime change**—stylesheet size and maintenance surface only. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f19a568. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
1 parent e4e3333 commit 27e67db

1 file changed

Lines changed: 0 additions & 106 deletions

File tree

‎ui/pages/home/index.scss‎

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,6 @@
8989
}
9090
}
9191

92-
&__connected-status-popover-bg {
93-
height: 55px;
94-
width: 120px;
95-
border-radius: 34px;
96-
position: absolute;
97-
top: 73px;
98-
opacity: 1;
99-
box-shadow: var(--shadow-size-lg) var(--color-shadow-default);
100-
background: none;
101-
}
102-
103-
&__connected-status-popover-bg-container {
104-
height: 100%;
105-
width: 100%;
106-
}
107-
10892
&__support {
10993
padding: 10px 0 20px 0;
11094
text-align: center;
@@ -122,24 +106,6 @@
122106
display: flex;
123107
flex-direction: row;
124108
align-items: center;
125-
126-
&-icon {
127-
display: flex;
128-
align-items: center;
129-
font-size: 16px;
130-
margin-right: 8px;
131-
color: var(--color-success-default);
132-
}
133-
134-
&-close {
135-
color: var(--color-icon-default);
136-
background: none;
137-
margin-left: 20px;
138-
}
139-
}
140-
141-
&__error-message {
142-
left: 8px;
143109
}
144110

145111
&__new-tokens-imported-notification {
@@ -167,77 +133,5 @@
167133
margin-inline-end: 12px;
168134
color: var(--color-success-default);
169135
}
170-
171-
&-close {
172-
color: var(--color-icon-default);
173-
background: none;
174-
margin-inline-start: 32px;
175-
}
176-
}
177-
178-
&__new-network-added {
179-
border-radius: 10px;
180-
text-align: center;
181-
182-
&__check-circle {
183-
color: var(--color-success-default);
184-
margin-top: 20px;
185-
}
186-
187-
&__switch-to-button {
188-
margin-bottom: 16px;
189-
}
190-
}
191-
192-
&__subheader-link {
193-
display: flex;
194-
padding: 12px 0;
195-
justify-content: center;
196-
color: var(--color-primary-default);
197-
align-items: center;
198-
cursor: pointer;
199-
200-
&--tooltip-content {
201-
&-header {
202-
display: flex;
203-
justify-content: space-between;
204-
margin-bottom: 8px;
205-
206-
&-text {
207-
font-size: 18px;
208-
line-height: 22.82px;
209-
font-weight: 700;
210-
}
211-
212-
&-button {
213-
background-color: var(--color-primary-default);
214-
color: var(--color-primary-inverse);
215-
border: 0;
216-
}
217-
}
218-
219-
&-text-bold {
220-
font-weight: 700;
221-
}
222-
}
223-
224-
&--tooltip-theme {
225-
background-color: var(--color-primary-default) !important;
226-
227-
& .tippy-tooltip-content {
228-
color: var(--color-primary-inverse) !important;
229-
}
230-
231-
& .arrow-regular {
232-
border-bottom-color: var(--color-primary-default) !important;
233-
}
234-
}
235-
236-
&--text {
237-
margin-left: 8px;
238-
font-weight: 400;
239-
font-size: 12px;
240-
line-height: 140.62%;
241-
}
242136
}
243137
}

0 commit comments

Comments
 (0)