feat: add read-only email subscription settings #987
+210
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Toward https://github.com/snapshot-labs/workflow/issues/226
Depends on snapshot-labs/snapshot-hub#951
This PR shows a read-only email subscriptions settings. (will pull status from the hub, and show relevant form/message depending on the subscription status)
Forms are not active yet, and submit as well as error validation does not work yet.
This is the first PR, among 2 PRs, to complete https://github.com/snapshot-labs/workflow/issues/226 (second one will focus on write features)
See figma: https://www.figma.com/design/hmHTau1Y1KYzrBBKLQr5QV/%23design?node-id=8192-7466&node-type=text&m=dev (the iteration without modal was implemented)
How to test
NOT_SUBSCRIBED
When you're not subscribed or logged out, will show a form to subscribe
UNVERIFIED
When you're subscribed, but have not verified the email yet. Will show a message with the steps required to verify the email, with a button to resend the verification email. There's no button to edit email (not an existing feature).
Test by connecting as
0xab54624A67E8c018a06B176bAAE76a40a385A464
VERIFIED
When the email is verified, will show the list of possible subscription types, with a toggle to switch them on/off.
Test by connecting as
0x91FD2c8d24767db4Ece7069AA27832ffaf8590f3
To-Do
Next PR will implement write features