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: cardano modal with governance #16003

Closed

Conversation

vladimirvolek
Copy link
Contributor

@vladimirvolek vladimirvolek commented Dec 17, 2024

Adding a new Cardano withdrawal modal.

image

@jirih-stsh jirih-stsh requested a review from tomasklim December 17, 2024 15:36
@vladimirvolek vladimirvolek changed the title feat: cardano review modal with governance feat: cardano modal with governance Dec 17, 2024
Copy link
Member

@tomasklim tomasklim left a comment

Choose a reason for hiding this comment

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

Please improve commit texts

We do not use
fix: modal heading
fix: text

Maybe just squash it all into one or better separate it into some logical parts. Thanks!

@tomasklim tomasklim added the cardano Related to Cardano (ADA) blockchain platform label Dec 30, 2024
@enjojoy
Copy link
Contributor

enjojoy commented Jan 2, 2025

@vladimirvolek Please use NewModal component with its props instead of custom styling

If you're not sure about what components are available and how to use them you can run storybook locally
yarn nx run @trezor/components:storybook
And see what's available
Screenshot 2025-01-02 at 14 11 48

@enjojoy
Copy link
Contributor

enjojoy commented Jan 2, 2025

Also I see that conventional commits check failed

We use it like that, for example:

fix(suite): desc of the change
https://www.conventionalcommits.org/en/v1.0.0/

@vladimirvolek vladimirvolek force-pushed the trezor-withdraw-modal branch from 135321b to 2a0724b Compare January 3, 2025 00:58
@vladimirvolek
Copy link
Contributor Author

Next round please? ✨

@enjojoy
Copy link
Contributor

enjojoy commented Jan 3, 2025

I think you shouldn't pass that big piece of text as a description, it meant to be rather a one sentence summary of the modal.

As you can see it moves the close button down and it looks misaligned (1st pic)

Please pass this text as a child so it's aligned better (2nd pic). If you want to make the text secondary you can wrap it into Text component.

<Text variant="tertiary">
    <Translation id="TR_CARDANO_WITHDRAW_MODAL_TITLE_DESCRIPTION" />
</Text>
Screenshot 2025-01-03 at 08 49 00 Screenshot 2025-01-03 at 08 55 41

Comment on lines +45 to +53
drep: {
drep_id: string;
hex: string;
amount: string;
active: boolean;
active_epoch: number | null;
has_script: boolean;
} | null;
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 this field is not optional. doesn't it require db migration?

Copy link
Contributor

Choose a reason for hiding this comment

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

I might not be seeing the full picture so I'd like to ask what the staking object was added to this type here https://github.com/trezor/trezor-suite/pull/16003/files#diff-590423282c67d295c7292f90e100f2863ea22b056e49ae02f135a5840475fb9bR172 (actually full misc object). was it a bug? how come anybody did not miss it there before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it was missing.

@vladimirvolek vladimirvolek force-pushed the trezor-withdraw-modal branch 3 times, most recently from b2b1418 to 05ac752 Compare January 3, 2025 14:33
@vladimirvolek
Copy link
Contributor Author

Anything else to improve or fix?

@mroz22
Copy link
Contributor

mroz22 commented Jan 3, 2025

should there be more changes to this branch, please stop using force pushes for each of them. It makes the review slightly less enjoyable. Also please leave resolving of comments to their authors.

@vladimirvolek
Copy link
Contributor Author

@adamhavel 8b5cd37

@adamhavel
Copy link
Contributor

8b5cd37

Thanks! One last thing, use NewModal.Button instead of Button in the bottomContent

@vladimirvolek
Copy link
Contributor Author

8b5cd37

Thanks! One last thing, use NewModal.Button instead of Button in the bottomContent

cdead7b

@mroz22
Copy link
Contributor

mroz22 commented Jan 6, 2025

not sure what about other guys think but I'd say that there should not be any "fix" commits for previous commits in the same PR. fix commit should be reserved for fixing anything that is already in develop.

image

doing it like this doesn't really help when writing changelogs - I don't want to state that I am fixing something which in fact hadn't been broken before this PR.

edit: lets please go with fix-ups for the purpose of review. they should be squashed later ofc.

@vladimirvolek
Copy link
Contributor Author

not sure what about other guys think but I'd say that there should not be any "fix" commits for previous commits in the same PR. fix commit should be reserved for fixing anything that is already in develop.

image doing it like this doesn't really help when writing changelogs - I don't want to state that I am fixing something which in fact hadn't been broken before this PR.

edit: lets please go with fix-ups for the purpose of review. they should be squashed later ofc.

The review is done, so I can squash this into one commit, right?

@tomasklim
Copy link
Member

@vladimirvolek

You can squash it but better is to separate it into some logical parts. Thanks!

e.g. blockchain-link changes in separate commit

fix: modal heading

fix: text

Update packages/suite/src/components/suite/modals/ReduxModal/CardanoWithdrawModal.tsx

Co-authored-by: Marek Mahut <[email protected]>

review

fix: new modal

fix: modal

fix: migration

fix(suite): Cardano withdraw modal UI

fix(suite): Cardano withdraw modal UI - buttons
@vladimirvolek vladimirvolek force-pushed the trezor-withdraw-modal branch from cdead7b to ef6f94f Compare January 7, 2025 10:55
@tomasklim tomasklim mentioned this pull request Jan 7, 2025
@tomasklim
Copy link
Member

Closing in favor of #16228 to run CI and separate commits

@tomasklim tomasklim closed this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cardano Related to Cardano (ADA) blockchain platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants