Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snaps): Add loading variant to Snap UI button #28997

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

david0xd
Copy link
Contributor

@david0xd david0xd commented Dec 6, 2024

Description

This PR enables loading button variant for Snaps UI.

Open in GitHub Codespaces

Notes

Related issues

Fixes: MetaMask/snaps#2694

Related PR dependencies

Snaps monorepo: MetaMask/snaps#2930

Manual testing steps

  1. Create some example Snap for testing and add Snap UI Button with loading variant.
    Example:
<Button variant="loading">Loading button</Button>

Screenshots/Recordings

Before

Loading button variant was not available before.

After

Screen.Recording.2024-12-09.at.16.26.44.mov

Pre-merge author checklist

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.

@david0xd david0xd added the team-snaps-platform Snaps Platform team label Dec 6, 2024
@david0xd david0xd self-assigned this Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

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.

@metamaskbot
Copy link
Collaborator

Builds ready [346d6c6]
Page Load Metrics (1994 ± 83 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30023931766631303
domContentLoaded16462386196716881
load16822394199417283
domInteractive25563284
backgroundConnect889292311
firstReactRender1693272010
getState842971525727
initialActions01000
loadScripts12001958150916981
setupStore77713157
uiStartup193628562351231111
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 151 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

david0xd added a commit to MetaMask/snaps that referenced this pull request Dec 9, 2024
This PR adds loading variant for Snap UI button. This button shows
loading icon with an infinite animation.

Related ticket: #2694
Related extension PR:
MetaMask/metamask-extension#28997

Loading button in action:


https://github.com/user-attachments/assets/a2f15262-dc68-44cb-bbd2-22e288d9d09c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce loading states to our custom UI buttons
2 participants