Commit 33db784
authored
feat: Add Skeleton to Snaps UI components (#29764)
## **Description**
Add Skeleton to Snaps UI components.
[](https://codespaces.new/MetaMask/metamask-extension/pull/29764?quickstart=1)
## **Related issues**
Fixes: MetaMask/snaps#2940
## **Related Pull Requests**
Snaps PR: MetaMask/snaps#3024
## **Manual testing steps**
1. Make and install test Snap with source code that uses Skeleton
component.
2. Check if it matches expectations.
Snap UI JSX code used for testing:
```typescript
<Container>
<Box>
<Text>Skeleton inside text component:</Text>
<Text>
<Skeleton />
</Text>
<Text>Classic Skeleton inside a box:</Text>
<Skeleton />
<Text>Top level Skeleton: </Text>
<Skeleton height={32} width="100%" />
<Skeleton height={16} width="50%" borderRadius="none" />
<Skeleton height={16} width="25%" borderRadius="medium" />
<Skeleton height={32} width={32} borderRadius="full" />
<Text>Skeleton inside Section: </Text>
<Section>
<Skeleton height={32} width="100%" />
<Skeleton height={16} width="50%" borderRadius="none" />
<Skeleton height={16} width="25%" borderRadius="medium" />
<Skeleton height={32} width={32} borderRadius="full" />
</Section>
<Text>Skeleton inside Row: </Text>
<Row label="Row">
<Skeleton height={22} width="30%" />
</Row>
<Row label="Row">
<Text>
<Skeleton height={22} width={40} />
</Text>
</Row>
</Box>
</Container>
```
## **Screenshots/Recordings**
### **Before**
Skeleton was not available before. Nothing to show here.
### **After**

## **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.1 parent 40cb868 commit 33db784
File tree
4 files changed
+49
-1
lines changed- ui/components/app
- metamask-template-renderer
- snaps/snap-ui-renderer
- components
4 files changed
+49
-1
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
63 | 65 | | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
0 commit comments