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

Resuming deposit modal #138

Merged
merged 11 commits into from
Jan 29, 2024
Merged

Resuming deposit modal #138

merged 11 commits into from
Jan 29, 2024

Conversation

ioay
Copy link
Contributor

@ioay ioay commented Jan 7, 2024

Closes: #110

When a user leaves the staking flow, the user is asked for confirmation.

Figma: https://www.figma.com/file/OUdSfHsmgV8EJpWxAzXjl5/Design-Tasks?type=design&node-id=3799-15142&mode=design&t=1vG9C2eujbt5Q5tk-4

@ioay ioay self-assigned this Jan 7, 2024
@ioay ioay force-pushed the resuming-deposit-modal branch 2 times, most recently from dc84755 to a98ba62 Compare January 19, 2024 00:26
@ioay ioay marked this pull request as ready for review January 19, 2024 00:29
@ioay ioay force-pushed the resuming-deposit-modal branch from a98ba62 to 4b32328 Compare January 19, 2024 00:30
dapp/src/assets/images/staking-pause-circle.svg Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/Resume/index.tsx Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/Resume/index.tsx Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/Resume/index.tsx Outdated Show resolved Hide resolved
dapp/src/contexts/ModalFlowContext.tsx Outdated Show resolved Hide resolved
dapp/src/contexts/ModalFlowContext.tsx Outdated Show resolved Hide resolved
dapp/src/components/shared/ModalBase/index.tsx Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/Resume/index.tsx Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/index.tsx Outdated Show resolved Hide resolved
dapp/src/utils/customIcons.tsx Outdated Show resolved Hide resolved
@ioay ioay requested a review from kkosiorowska January 22, 2024 09:57
dapp/src/contexts/ModalFlowContext.tsx Outdated Show resolved Hide resolved
dapp/src/theme/Spinner.ts Outdated Show resolved Hide resolved
dapp/src/components/shared/ModalBase/index.tsx Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/index.tsx Outdated Show resolved Hide resolved
dapp/src/hooks/useDepositBTCTransaction.ts Outdated Show resolved Hide resolved
import { Pause } from "#/static/icons"
import { TextMd } from "#/components/shared/Typography"

export default function ResumeModal({
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can only name it as Resume. We are in the modals directory so it seems redundant to me. We had the same approach with MissingAccount or other modals declared here. The same goes for the file name.

Suggested change
export default function ResumeModal({
export default function Resume({

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can keep the file name without the suffix modal because we are in the modals directory, but I recommend staying with the current naming convention of components because such a name says more about the component type and will not be confused with the name of a function or other component if it appears and is not modal. I would even recommend such a change in other places as eg: MissingAccountModal.

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussion moved to discord

Copy link
Member

Choose a reason for hiding this comment

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

The suffix may be useful when we import this modal and use it elsewhere, it adds clarity.
On the other hand we've already got bunch of components that don't have the suffixes:
ActionForm, Overview, etc.
Also let's take Details list, should it be renamed to DetailsList?
Should Pause icon become a PauseIcon?

Copy link
Member

Choose a reason for hiding this comment

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

It feels like a deeper discussion to establish the common patterns, that we shouldn't block this PR with, unless we agree on the pattern and decide to refactor it across the board in a follow-up.

Copy link
Collaborator

@Shadowfiend Shadowfiend Jan 24, 2024

Choose a reason for hiding this comment

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

(I left some much more detailed thoughts in the Discord thread, but quick answers on the above two examples: Pause should be PauseIcon, and Details should have a more descriptive name than Details or DetailsList! Details of what?)

dapp/src/components/Modals/Staking/index.tsx Outdated Show resolved Hide resolved
dapp/src/static/icons/Pause.tsx Outdated Show resolved Hide resolved
dapp/src/components/Modals/Support/index.tsx Show resolved Hide resolved
@ioay ioay requested a review from kkosiorowska January 23, 2024 20:04
dapp/src/constants/staking.ts Outdated Show resolved Hide resolved
dapp/src/components/Modals/Staking/DepositBTC.tsx Outdated Show resolved Hide resolved
dapp/src/static/icons/Pause.tsx Outdated Show resolved Hide resolved
dapp/src/theme/Spinner.ts Outdated Show resolved Hide resolved
import { Pause } from "#/static/icons"
import { TextMd } from "#/components/shared/Typography"

export default function ResumeModal({
Copy link
Contributor

Choose a reason for hiding this comment

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

Discussion moved to discord

@ioay ioay requested a review from kkosiorowska January 25, 2024 15:51
Copy link
Contributor

@kkosiorowska kkosiorowska left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ioay ioay merged commit 3fe7567 into main Jan 29, 2024
11 checks passed
@ioay ioay deleted the resuming-deposit-modal branch January 29, 2024 16:25
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.

Implement staking flow pausing in Ledger Live dApp
4 participants