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

feat: recovery info modals + widgets #2843

Merged
merged 4 commits into from
Nov 22, 2023
Merged

Conversation

iamacook
Copy link
Member

What it solves

Resolves #2758 and #2759

How this PR fixes it

This adds full-screen modals that appear if/when a recovery proposal is either added to the queue (for an owner/guardian) or when none is queued (for guardian).

How to test it

  1. Open a Safe with recovery enabled, ensuring no recovery transactions are queued. As a guardian, observe the "proposal" modal.
  2. Open a Safe with recovery enabled, ensuring no recovery transactions are queued. As a owner/guardian, observe the "in-progress" modal.

Screenshots

image

image

image

image

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

github-actions bot commented Nov 21, 2023

Branch preview

✅ Deploy successful!

https://recovery_modal_widgets--walletweb.review-wallet-web.5afe.dev

Copy link

github-actions bot commented Nov 21, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Nov 21, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.44% (-0.06% 🔻)
10629/14090
🔴 Branches
50.29% (-0.11% 🔻)
2167/4309
🔴 Functions
58.4% (-0.06% 🔻)
1595/2731
🟡 Lines
76.94% (-0.09% 🔻)
9627/12512
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
91.67% 100% 86.67% 93.22%
🔴
... / useRecoveryQueue.ts
50% 0% 0% 50%
🟢
... / RecoveryInProgressCard.tsx
100% 100% 100% 100%
🟢
... / RecoveryProposalCard.tsx
100% 75% 100% 100%
🟡
... / index.tsx
70% 50% 33.33% 70%
🔴
... / RecoverAccountFlowReview.tsx
44.07% 0% 0% 44.83%
🟡
... / index.tsx
66.67% 0% 0% 66.67%
🔴
... / RecoverAccountFlowSetup.tsx
44.83% 0% 0% 46.43%
🟢
... / constants.ts
50% 100% 100% 100%
🟡
... / useIsGuardian.ts
57.14% 0% 0% 66.67%
🟢
... / index.tsx
90.48% 100% 50% 100%

Test suite run success

1212 tests passing in 171 suites.

Report generated by 🧪jest coverage report action from 165c9d3

@iamacook iamacook marked this pull request as ready for review November 22, 2023 12:23
Comment on lines +52 to +57
export const RecoveryHeader = madProps(_RecoveryHeader, {
isOwner: useIsSafeOwner,
isGuardian: useIsGuardian,
supportsRecovery: _useSupportedRecovery,
queue: useRecoveryQueue,
})
Copy link
Member

Choose a reason for hiding this comment

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

👍

)
}

// Appease TypeScript
Copy link
Member

Choose a reason for hiding this comment

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

Is it because it wants to have a name?

Copy link
Member Author

Choose a reason for hiding this comment

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

It complains about the rules of hooks as madProps is not a hook or component. I'd sooner extract it to a "middleman" hook than disabling the rule.

image

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Please make sure the icons work in dark mode.

@iamacook
Copy link
Member Author

Please make sure the icons work in dark mode.

I've made @TanyaEfremova aware of this. I'm going to merge this in the mean time and we can revisit it.

@iamacook iamacook merged commit 79b4f21 into recovery-epic Nov 22, 2023
6 of 11 checks passed
@iamacook iamacook deleted the recovery-modal-widgets branch November 22, 2023 17:23
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Recovery] Proposal in-progress modal/widget [Recovery] Proposal request modal/widget
2 participants