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 disabled state for Snap UI interactive components #29896

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

Conversation

david0xd
Copy link
Contributor

@david0xd david0xd commented Jan 24, 2025

Description

This PR integrates new Snaps UI feature for disabling interactive UI components.

Open in GitHub Codespaces

Related issues

Fixes: #29669

Related Pull Requests

MetaMask/snaps#3030

Manual testing steps

  1. Make new Snap with custom UI using interactive UI components specified in the task linked under "related issues".
  2. Add flag disabled={true} to these components.
  3. Check that components with disabled flag are not clickable and their styling is different (opacity 0.5).

Screenshots/Recordings

Before

disabled state was not available before, nothing to show here.

After

Screenshot 2025-01-24 at 16 35 56

Screen.Recording.2025-01-24.at.16.53.37.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 Jan 24, 2025
@david0xd david0xd self-assigned this Jan 24, 2025
Copy link
Contributor

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 [6c745ce]
Page Load Metrics (1858 ± 84 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint25122491649550264
domContentLoaded15172226180715474
load15312255185817484
domInteractive278541157
backgroundConnect13292565828
firstReactRender16110422914
getState5104252612
initialActions01000
loadScripts10981705133414067
setupStore880222211
uiStartup175627672146254122
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 988 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [662cbbf]
Page Load Metrics (1684 ± 90 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22723511614367176
domContentLoaded14732260164817484
load14912356168418790
domInteractive257742199
backgroundConnect797412914
firstReactRender1682392311
getState35415136
initialActions01000
loadScripts9931707120015373
setupStore75914147
uiStartup166426851932224107
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 1.01 KiB (0.01%)
  • common: 0 Bytes (0.00%)

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.

Add a disabled state to all of our interactive components
2 participants