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

Add disabled states to all input components #3030

Merged
merged 4 commits into from
Jan 28, 2025
Merged

Conversation

david0xd
Copy link
Contributor

@david0xd david0xd commented Jan 22, 2025

Add disabled state to all input-related Snaps UI components.

Related task: MetaMask/metamask-extension#29669

Extension integration PR: MetaMask/metamask-extension#29896

Screenshot 2025-01-24 at 16 35 56

Screen.Recording.2025-01-24.at.16.53.37.mov

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.80%. Comparing base (c348998) to head (a2e93c2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3030   +/-   ##
=======================================
  Coverage   94.80%   94.80%           
=======================================
  Files         503      503           
  Lines       10996    10996           
  Branches     1685     1685           
=======================================
  Hits        10425    10425           
  Misses        571      571           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@david0xd david0xd marked this pull request as ready for review January 24, 2025 15:58
@david0xd david0xd requested a review from a team as a code owner January 24, 2025 15:58
@david0xd david0xd force-pushed the dd/add-disabled-states branch from 0471a57 to a2ec7ba Compare January 27, 2025 11:22
@david0xd david0xd force-pushed the dd/add-disabled-states branch from a2ec7ba to a2e93c2 Compare January 28, 2025 10:48
@david0xd david0xd merged commit 01ff383 into main Jan 28, 2025
167 checks passed
@david0xd david0xd deleted the dd/add-disabled-states branch January 28, 2025 11:04
FrederikBolding pushed a commit to MetaMask/metamask-extension that referenced this pull request Feb 3, 2025
…9896)

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

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29896?quickstart=1)

## **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](https://github.com/user-attachments/assets/b7f55722-9865-4ec6-8069-6dfb2c13b354)


https://github.com/user-attachments/assets/5c8a0404-a7d6-49f1-8e8d-041daaa3b09b

## **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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants