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

Support "Unlimited" display values in Redesign TypedSign pages #13022

Closed
9 tasks
digiwand opened this issue Jan 16, 2025 · 0 comments · Fixed by #13030
Closed
9 tasks

Support "Unlimited" display values in Redesign TypedSign pages #13022

digiwand opened this issue Jan 16, 2025 · 0 comments · Fixed by #13030
Assignees
Labels
release-7.39.0 Issue or pull request that will be included in release 7.39.0 team-confirmations Push issues to confirmations team

Comments

@digiwand
Copy link
Contributor

What is this about?

Similarly to the extension implementation, for large numbers past a certain threshold, we want to display "Unlimited"

Related extension PR: MetaMask/metamask-extension#29102
Related extension Issue: https://github.com/MetaMask/MetaMask-planning/issues/3763

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

  • Engineering (needed in most cases)
  • Design
  • Product
  • QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • Security
  • Legal
  • Marketing
  • Management (please specify)
  • Other (please specify)

References

No response

@digiwand digiwand added the team-confirmations Push issues to confirmations team label Jan 16, 2025
@digiwand digiwand self-assigned this Jan 16, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2025
## **Description**

Add Signature Decoding Simulation UI

This logic mirrors the extension with slight modifications due to
mobile/extension parity differences.

In addition: 
- updated ValueDisplay value logic to no longer use useMemo

Todo in follow-up PRs: 
- Add additional tests
#13023
- Add "Unlimited" text support
#13022
- Investigate "useExternalServices" setting. This does not seem to exist
in mobile #13024

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3876
Related: #12994
(Replaces Ramp/Box usages with View)

## **Manual testing steps**

1. Set REDESIGNED_SIGNATURE_REQUEST to true in js.env
2. Enable confirmation_redesign in Launch Darkly
3. Turn on Improved Signatures setting
4. Turn on Simulation setting
5. Test various v3 and v4 signTypedData signatures
- Example dapp: https://develop.d3bkcslj57l47p.amplifyapp.com/ → "Permit
2 - Single" button

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**
<img width="320"
src="https://github.com/user-attachments/assets/4b511681-66d3-47c4-8807-5ea227a9eaa9">
<img width="320"
src="https://github.com/user-attachments/assets/439477e6-b02f-4b46-9660-dd1e77d4df2a">

The values in this screenshot will be replaced by "Unlimited"
<img width="320"
src="https://github.com/user-attachments/assets/0f37d8cd-7817-4d88-a4ab-79356268265d">

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/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.
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2025
…odal UI/UX updates (#13030)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Feat:
- Support "Unlimited" display values in decoding simulation
- Update account detail and message modals to have transparent
backgrounds and enable click to close on background


Note: It might be helpful to walk through the commits to review

## **Related issues**

Fixes: #13022
Relates to: #12994

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

![CleanShot 2025-01-16 at 03 23
30](https://github.com/user-attachments/assets/fd192b87-c5b7-4bb8-9d35-509b8c6bd55a)
![CleanShot 2025-01-16 at 04 12
30](https://github.com/user-attachments/assets/3468d59b-f045-4f5a-8669-09de78b7b7d1)

### **After**

![CleanShot 2025-01-16 at 03 22
54](https://github.com/user-attachments/assets/4a02032e-92bb-4579-aebf-311dab8e3184)
![CleanShot 2025-01-16 at 03 20
50](https://github.com/user-attachments/assets/9dd7b37c-8ced-4f50-b247-fdd7cd698247)

### **Before without "Unlimited" support**

<img width="320"
src="https://github.com/user-attachments/assets/cd0864e5-5497-4e5a-8507-3e5a2ef0b812">

### **After "Unlimited" support**

<img width="320"
src="https://github.com/user-attachments/assets/99d68e50-e381-42cd-b88f-724278fbd597">

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/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.
@metamaskbot metamaskbot added the release-7.39.0 Issue or pull request that will be included in release 7.39.0 label Jan 16, 2025
nickewansmith pushed a commit that referenced this issue Jan 17, 2025
## **Description**

Add Signature Decoding Simulation UI

This logic mirrors the extension with slight modifications due to
mobile/extension parity differences.

In addition: 
- updated ValueDisplay value logic to no longer use useMemo

Todo in follow-up PRs: 
- Add additional tests
#13023
- Add "Unlimited" text support
#13022
- Investigate "useExternalServices" setting. This does not seem to exist
in mobile #13024

## **Related issues**

Fixes: MetaMask/MetaMask-planning#3876
Related: #12994
(Replaces Ramp/Box usages with View)

## **Manual testing steps**

1. Set REDESIGNED_SIGNATURE_REQUEST to true in js.env
2. Enable confirmation_redesign in Launch Darkly
3. Turn on Improved Signatures setting
4. Turn on Simulation setting
5. Test various v3 and v4 signTypedData signatures
- Example dapp: https://develop.d3bkcslj57l47p.amplifyapp.com/ → "Permit
2 - Single" button

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**
<img width="320"
src="https://github.com/user-attachments/assets/4b511681-66d3-47c4-8807-5ea227a9eaa9">
<img width="320"
src="https://github.com/user-attachments/assets/439477e6-b02f-4b46-9660-dd1e77d4df2a">

The values in this screenshot will be replaced by "Unlimited"
<img width="320"
src="https://github.com/user-attachments/assets/0f37d8cd-7817-4d88-a4ab-79356268265d">

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/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.
nickewansmith pushed a commit that referenced this issue Jan 17, 2025
…odal UI/UX updates (#13030)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Feat:
- Support "Unlimited" display values in decoding simulation
- Update account detail and message modals to have transparent
backgrounds and enable click to close on background


Note: It might be helpful to walk through the commits to review

## **Related issues**

Fixes: #13022
Relates to: #12994

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

![CleanShot 2025-01-16 at 03 23
30](https://github.com/user-attachments/assets/fd192b87-c5b7-4bb8-9d35-509b8c6bd55a)
![CleanShot 2025-01-16 at 04 12
30](https://github.com/user-attachments/assets/3468d59b-f045-4f5a-8669-09de78b7b7d1)

### **After**

![CleanShot 2025-01-16 at 03 22
54](https://github.com/user-attachments/assets/4a02032e-92bb-4579-aebf-311dab8e3184)
![CleanShot 2025-01-16 at 03 20
50](https://github.com/user-attachments/assets/9dd7b37c-8ced-4f50-b247-fdd7cd698247)

### **Before without "Unlimited" support**

<img width="320"
src="https://github.com/user-attachments/assets/cd0864e5-5497-4e5a-8507-3e5a2ef0b812">

### **After "Unlimited" support**

<img width="320"
src="https://github.com/user-attachments/assets/99d68e50-e381-42cd-b88f-724278fbd597">

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/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
release-7.39.0 Issue or pull request that will be included in release 7.39.0 team-confirmations Push issues to confirmations team
Projects
None yet
2 participants