-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: design changes in signature paged message section #28038
Conversation
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. |
Builds ready [c2aef7b]
Page Load Metrics (2103 ± 86 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
@@ -40,6 +40,7 @@ export type ConfirmInfoRowProps = { | |||
copyEnabled?: boolean; | |||
copyText?: string; | |||
'data-testid'?: string; | |||
collapsible?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not re-use the existing ui/components/app/confirm/info/row/expandable-row.tsx
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The designs are very different from expandable row.
alignItems={AlignItems.flexStart} | ||
color={color} | ||
> | ||
<Box display={Display.Flex} alignItems={AlignItems.center}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming this behaviour is different to the expandable row, while it's nice to add configuration to the core row, this adds a lot of logic and complexity, so would it be better to create an alternate component that potentially inherits the same properties of row? Or a wrapper component?
Or at the very least, should we break this very large schema up with local components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are required in info row requires to support collapsible row, it is hard to only wrap into row and make it collapsible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, could we split this for readability into some local components (in this file) such as Container
, CopyIcon
, Tooltip
, Content
, CollapsibleIcon
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, let me create a followup PR to do that, and avoid in this PR to change the scope here.
Builds ready [ac11fc3]
Page Load Metrics (2038 ± 77 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
- Checked collapse icon svg and that it renders in storybook correctly ✅
- Checked collapse icon exists in Figma icon library for 1:1 match ✅
- Did not check any other part of the code ❌
@@ -0,0 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="m422 64c5 0 9 2 13 5 7 8 7 19 0 26l-107 107 66 0c11 0 19 7 19 18 0 12-8 19-19 19l-110 0c-2 0-6 0-8-2-2 0-3-2-5-4-2-1-4-3-4-5-2-2-2-6-2-8l0-110c0-11 8-19 19-19 11 0 18 8 18 19l0 66 107-107c4-3 7-5 13-5z m-194 193l-110 0c-11 0-19 8-19 19 0 11 8 18 19 18l66 0-107 107c-7 7-7 19 0 26 8 7 19 7 26 0l107-107 0 66c0 11 7 19 18 19 11 0 19-8 19-19l0-110c0-2 0-6-2-8 0-1-2-3-4-5-2-2-3-4-5-4-2-2-6-2-8-2z"/></svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right: 0, | ||
top: 2, | ||
...style, | ||
}} | ||
onClick={handleClick} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking: Is there any reason we aren't using the ButtonIcon
component here? The current implementation has poor accessibility as it renders a span
instead of a button
, and it lacks an aria-label
, making it inaccessible for screen reader users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree button icon is good idea. Let me create separate PR for this as it would need lot of snapshot updates in confirmation pages.
Builds ready [44ec97d]
Page Load Metrics (1961 ± 101 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Make message section in signature collapsible and add copy option.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3477
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist