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

Merged
merged 4 commits into from
Feb 3, 2025

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%)

david0xd added a commit to MetaMask/snaps that referenced this pull request Jan 28, 2025
@david0xd david0xd force-pushed the dd/snap-ui-disabled-state branch from 662cbbf to 9d5a44f Compare February 3, 2025 12:53
@david0xd david0xd changed the base branch from main to fb/snaps-bump-v87 February 3, 2025 12:53
@david0xd david0xd force-pushed the dd/snap-ui-disabled-state branch from 9d5a44f to 0c64a8a Compare February 3, 2025 12:53
@david0xd david0xd marked this pull request as ready for review February 3, 2025 12:53
@david0xd david0xd requested a review from a team as a code owner February 3, 2025 12:53
@metamaskbot
Copy link
Collaborator

Builds ready [0c64a8a]
Page Load Metrics (1661 ± 68 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14942076166815374
domContentLoaded14832050164213967
load14962076166114268
domInteractive248837199
backgroundConnect96127188
firstReactRender15102402914
getState54911126
initialActions01000
loadScripts10301532117811153
setupStore680222412
uiStartup170924701930219105

@david0xd david0xd force-pushed the dd/snap-ui-disabled-state branch from 7b13847 to fa75db1 Compare February 3, 2025 15:18
@FrederikBolding FrederikBolding merged commit 7aac0a3 into fb/snaps-bump-v87 Feb 3, 2025
58 of 59 checks passed
@FrederikBolding FrederikBolding deleted the dd/snap-ui-disabled-state branch February 3, 2025 16:02
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [3059e34]
Page Load Metrics (2615 ± 275 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint38836772095958460
domContentLoaded159836332571577277
load165536792615573275
domInteractive25157683316
backgroundConnect14234544723
firstReactRender17166613416
getState7108302613
initialActions012131
loadScripts117528391963464223
setupStore97626168
uiStartup190843463032642308

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
3 participants