fix: resolve overlapping buttons in Signature Message Details sheet#26040
fix: resolve overlapping buttons in Signature Message Details sheet#26040vinistevam merged 1 commit intomainfrom
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
All these signature types are covered by SmokeConfirmations tests. The changes are low-risk because:
No other tags are needed as the changes don't affect:
Performance Test Selection: |
| />, | ||
| ); | ||
| fireEvent.press(getByText('Open')); | ||
| expect(getByTestId('copyButtonTestId')).toBeDefined(); |
There was a problem hiding this comment.
New test uses weak toBeDefined matcher for element
Low Severity
The newly added test uses toBeDefined() to assert element presence, which is a weak matcher that the unit testing guidelines explicitly prohibit. Since getByTestId already throws if the element isn't found, the toBeDefined() assertion is effectively a no-op that can never fail — it doesn't actually verify the element is rendered on screen. The guidelines specify using toBeOnTheScreen() instead for robust element-presence assertions.
Triggered by project rule: Unit Testing Guidelines
|





Description
This PR fixes a UI regression where the "Copy" and "Close" buttons were overlapping in the Message Details bottom sheet of the Signature Request flow. This overlap prevented users from easily dismissing the details view or accessing the copy functionality.
Reason for change:
A recent update to the layout or design system tokens caused the button container to lose its proper spacing/flex configuration, leading to a stack-on-top layout rather than a side-by-side or properly spaced vertical layout.
Improvement/Solution:
Refactored the button container in the Signature Message Details component to use correct flexbox properties.
Applied design system tokens for spacing between the action buttons.
Ensured the container has adequate padding to prevent overlap with the sheet's edge on smaller devices.
Changelog
CHANGELOG entry: Fixed a UI issue where buttons in the signature message details view were overlapping.
Related issues
Fixes: #25783
Manual testing steps
Screenshots/Recordings
copy.webm
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI/layout and test updates only, with a small behavioral change to show a copy button when
copyTextis passed; minimal risk outside confirmations UI.Overview
Adds an optional
copyTextprop toExpandableto render a top-rightCopyButtoninside the expanded modal content, centralizing copy affordance placement for expandable sections.Makes
CopyButtonconfigurable via newsizeandiconColorprops (with updated snapshot), and updates tests to properly mock async clipboard writes and assert copy-button rendering whencopyTextis provided. The signature message expanded view drops its bespoke copy-button positioning and delegates copying toExpandable.Written by Cursor Bugbot for commit a89e636. This will update automatically on new commits. Configure here.