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

add segmented control layout #175

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Conversation

dreacot
Copy link
Member

@dreacot dreacot commented Oct 11, 2023

This PR adds segmented control to the cryptomaterial package, i was working on this as part of #166, but due to some changes to that PR and the fact that several other layouts would be needing it, i decided to add it as a standalone implementation.

This PR does not include the dragging animation which some segmented controls have, if it is desired it can be added at a later time. but for the sake of avoiding unnecessary delays, i have intentionally left it out

Screenshot from 2023-10-11 03-03-51

@dreacot dreacot added the enhancement New feature or request label Oct 11, 2023
@dreacot dreacot self-assigned this Oct 11, 2023
ui/cryptomaterial/segmented_control.go Show resolved Hide resolved
ui/cryptomaterial/segmented_control.go Show resolved Hide resolved
ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
@Sirmorrison
Copy link
Collaborator

Do we really need a segmented control widget? we currently have a widget similar to this that is used on the send page.
cryptomaterial.SwitchButtonText.

@dreacot
Copy link
Member Author

dreacot commented Oct 11, 2023

They are both different control layouts, what you are referring to is a button. The segmented control is used several places in the app, seems reasonable to make it a widget

Copy link
Collaborator

@itswisdomagain itswisdomagain left a comment

Choose a reason for hiding this comment

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

Looks okay, but could be improved maybe?

ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@crux25 crux25 left a comment

Choose a reason for hiding this comment

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

Except for what has been pointed out by other reviewers, the PR LGTM.

Copy link
Collaborator

@Sirmorrison Sirmorrison left a comment

Choose a reason for hiding this comment

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

This and we are good to go.

ui/cryptomaterial/segmented_control.go Outdated Show resolved Hide resolved
@Sirmorrison
Copy link
Collaborator

Since we are now using this, we will need to depreciate the switch text widget. So I recommend using this widget on the send page so we can test the implementation so far.

@dreacot
Copy link
Member Author

dreacot commented Oct 17, 2023

This PR adds segmented control to the cryptomaterial package, i was working on this as part of #166, but due to some changes to that PR and the fact that several other layouts would be needing it, i decided to add it as a standalone implementation.

based on my original comment, i brought the segmented control widget out of my previous PR to make it non blocking. so trying to use it on another page takes us back the original problem

Since we are now using this, we will need to depreciate the switch text widget. So I recommend using this widget on the send page so we can test the implementation so far.

correct, the text widget would be deprecated, but not as part of this PR. the work on the send page can be done in another PR

- create a decorated text widget
- further code cleanup
@dreacot dreacot merged commit b64d3b3 into crypto-power:master Oct 18, 2023
1 check passed
@dreacot dreacot deleted the segmented_control branch October 18, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants