Skip to content

Improve clarity of justification field in Permission Picker#282

Merged
jeffsmale90 merged 3 commits intomainfrom
feat/improve-justification-clarity
Mar 15, 2026
Merged

Improve clarity of justification field in Permission Picker#282
jeffsmale90 merged 3 commits intomainfrom
feat/improve-justification-clarity

Conversation

@jeffsmale90
Copy link
Contributor

@jeffsmale90 jeffsmale90 commented Mar 11, 2026

Description

  • Change label from 'Reason' to 'Justification'
  • Increase max length from 120 to 300
  • Increase max length that will be shown without ellipsis from 20 to 165
  • Stack components vertically to reduce whitespace

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

image image image

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.

Note

Low Risk
Low risk UI/i18n and validation limit updates; primary risk is a missing/incorrect locale key causing the label/tooltip to render improperly.

Overview
Improves clarity of the permission justification field by renaming the i18n keys and UI label/tooltip from Reason to Justification across the permission request flow and existing-permissions formatting.

Increases the allowed justification length in zSanitizedJustification from 120 to 300 characters and updates tests accordingly, while also showing more text before truncation (ShowMoreText 20 → 165) and stacking the justification label/value vertically to reduce whitespace.

Written by Cursor Bugbot for commit 6514f64. This will update automatically on new commits. Configure here.

- Change label from 'Reason' to 'Justification'
- Increase max length from 120 to 300
- Increase max length that will be shown without ellipsis from 20 to 165
- Stack components vertically to reduce whitespace
@jeffsmale90 jeffsmale90 requested a review from a team as a code owner March 11, 2026 21:16
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

mj-kiwi
mj-kiwi previously approved these changes Mar 12, 2026
cursoragent and others added 2 commits March 16, 2026 10:48
Co-authored-by: jeffsmale90 <jeffsmale90@users.noreply.github.com>
@jeffsmale90 jeffsmale90 force-pushed the feat/improve-justification-clarity branch from 636af3e to 6514f64 Compare March 15, 2026 21:48
@jeffsmale90 jeffsmale90 merged commit f6ef69e into main Mar 15, 2026
5 checks passed
@jeffsmale90 jeffsmale90 deleted the feat/improve-justification-clarity branch March 15, 2026 21:48
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Mar 17, 2026
…-13.23.0 (#40933)

<!--
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**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Bump @metamask/gator-permissions-snap from ^1.2.0 to ^1.3.0

https://github.com/MetaMask/snap-7715-permissions/releases/tag/v18.0.0

### Changed
- `justification` field may now be longer (up to 300 chars), and will be
more prominently displayed in the UI
([#282](MetaMask/snap-7715-permissions#282))

### Fixed
- Improve display of existing permissions before granting a new
permission
([#284](MetaMask/snap-7715-permissions#284),
[#283](MetaMask/snap-7715-permissions#283))
- Show all permissions from all chains granted to the requesting origin
  - Group existing permissions by granting account
- Improved validation and asyncronous loading with caching, and skeleton
UI

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

## **Changelog**

Changes to unreleased feature, and slight change to `justification`
field formatting.

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Advanced Permissions `justification` parameter now
accepts up to 300 chars, shown more clearly in confirmation.

## **Related issues**

Fixes:

## **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**

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

### **After**

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

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk dependency-only bump; primary risk is behavioral changes
inside the updated snap affecting permission flows at runtime.
> 
> **Overview**
> Updates the `@metamask/gator-permissions-snap` dependency from
`^1.2.0` to `^1.3.0`, with corresponding `yarn.lock` resolution/checksum
changes to pull the new package version.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e3a10c9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
runway-github bot added a commit to MetaMask/metamask-extension that referenced this pull request Mar 17, 2026
….0 cp-13.23.0 (#40933)

<!--
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**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Bump @metamask/gator-permissions-snap from ^1.2.0 to ^1.3.0

https://github.com/MetaMask/snap-7715-permissions/releases/tag/v18.0.0

### Changed
- `justification` field may now be longer (up to 300 chars), and will be
more prominently displayed in the UI
([#282](MetaMask/snap-7715-permissions#282))

### Fixed
- Improve display of existing permissions before granting a new
permission
([#284](MetaMask/snap-7715-permissions#284),
[#283](MetaMask/snap-7715-permissions#283))
- Show all permissions from all chains granted to the requesting origin
  - Group existing permissions by granting account
- Improved validation and asyncronous loading with caching, and skeleton
UI

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

## **Changelog**

Changes to unreleased feature, and slight change to `justification`
field formatting.

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Advanced Permissions `justification` parameter now
accepts up to 300 chars, shown more clearly in confirmation.

## **Related issues**

Fixes:

## **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**

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

### **After**

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

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk dependency-only bump; primary risk is behavioral changes
inside the updated snap affecting permission flows at runtime.
> 
> **Overview**
> Updates the `@metamask/gator-permissions-snap` dependency from
`^1.2.0` to `^1.3.0`, with corresponding `yarn.lock` resolution/checksum
changes to pull the new package version.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e3a10c9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
runway-github bot added a commit to MetaMask/metamask-extension that referenced this pull request Mar 17, 2026
….0 cp-13.23.0 (#40933)

<!--
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**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Bump @metamask/gator-permissions-snap from ^1.2.0 to ^1.3.0

https://github.com/MetaMask/snap-7715-permissions/releases/tag/v18.0.0

### Changed
- `justification` field may now be longer (up to 300 chars), and will be
more prominently displayed in the UI
([#282](MetaMask/snap-7715-permissions#282))

### Fixed
- Improve display of existing permissions before granting a new
permission
([#284](MetaMask/snap-7715-permissions#284),
[#283](MetaMask/snap-7715-permissions#283))
- Show all permissions from all chains granted to the requesting origin
  - Group existing permissions by granting account
- Improved validation and asyncronous loading with caching, and skeleton
UI

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

## **Changelog**

Changes to unreleased feature, and slight change to `justification`
field formatting.

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Advanced Permissions `justification` parameter now
accepts up to 300 chars, shown more clearly in confirmation.

## **Related issues**

Fixes:

## **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**

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

### **After**

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

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk dependency-only bump; primary risk is behavioral changes
inside the updated snap affecting permission flows at runtime.
>
> **Overview**
> Updates the `@metamask/gator-permissions-snap` dependency from
`^1.2.0` to `^1.3.0`, with corresponding `yarn.lock` resolution/checksum
changes to pull the new package version.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e3a10c9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
runway-github bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Mar 17, 2026
…snap from ^1.2.0 to ^1.3.0 cp-13.23.0 (#40933)

<!--
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**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Bump @metamask/gator-permissions-snap from ^1.2.0 to ^1.3.0

https://github.com/MetaMask/snap-7715-permissions/releases/tag/v18.0.0

### Changed
- `justification` field may now be longer (up to 300 chars), and will be
more prominently displayed in the UI
([#282](MetaMask/snap-7715-permissions#282))

### Fixed
- Improve display of existing permissions before granting a new
permission
([#284](MetaMask/snap-7715-permissions#284),
[#283](MetaMask/snap-7715-permissions#283))
- Show all permissions from all chains granted to the requesting origin
  - Group existing permissions by granting account
- Improved validation and asyncronous loading with caching, and skeleton
UI

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

## **Changelog**

Changes to unreleased feature, and slight change to `justification`
field formatting.

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Advanced Permissions `justification` parameter now
accepts up to 300 chars, shown more clearly in confirmation.

## **Related issues**

Fixes:

## **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**

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

### **After**

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

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk dependency-only bump; primary risk is behavioral changes
inside the updated snap affecting permission flows at runtime.
> 
> **Overview**
> Updates the `@metamask/gator-permissions-snap` dependency from
`^1.2.0` to `^1.3.0`, with corresponding `yarn.lock` resolution/checksum
changes to pull the new package version.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e3a10c9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
chloeYue pushed a commit to MetaMask/metamask-extension that referenced this pull request Mar 17, 2026
…snap from ^1.2.0 to ^1.3.0 cp-13.23.0 (#40942)

- chore: Bump @metamask/gator-permissions-snap from ^1.2.0 to ^1.3.0
cp-13.23.0 (#40933)

<!--
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**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Bump @metamask/gator-permissions-snap from ^1.2.0 to ^1.3.0

https://github.com/MetaMask/snap-7715-permissions/releases/tag/v18.0.0

### Changed
- `justification` field may now be longer (up to 300 chars), and will be
more prominently displayed in the UI
([#282](MetaMask/snap-7715-permissions#282))

### Fixed
- Improve display of existing permissions before granting a new
permission
([#284](MetaMask/snap-7715-permissions#284),
[#283](MetaMask/snap-7715-permissions#283))
- Show all permissions from all chains granted to the requesting origin
  - Group existing permissions by granting account
- Improved validation and asyncronous loading with caching, and skeleton
UI

[![Open in GitHub

Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/40933?quickstart=1)

## **Changelog**

Changes to unreleased feature, and slight change to `justification`
field formatting.

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Advanced Permissions `justification` parameter now
accepts up to 300 chars, shown more clearly in confirmation.

## **Related issues**

Fixes:

## **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**

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

### **After**

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

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk dependency-only bump; primary risk is behavioral changes
inside the updated snap affecting permission flows at runtime.
> 
> **Overview**
> Updates the `@metamask/gator-permissions-snap` dependency from
`^1.2.0` to `^1.3.0`, with corresponding `yarn.lock` resolution/checksum
changes to pull the new package version.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e3a10c9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[7d516fc](7d516fc)

---------

Co-authored-by: jeffsmale90 <6363749+jeffsmale90@users.noreply.github.com>
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
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.

3 participants