-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
Introduce layouts (formerly widgets) to prepare for redesign #1395
Conversation
5b075ba
to
bd2da0b
Compare
4bd2517
to
27d9211
Compare
6541908
to
ebc67c9
Compare
432b1e7
to
1cb7383
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
overall: why did you choose to have show_pubkey
accept str instead of bytes?
not saying it's wrong (i did the same in confirm_hex
or something), just wondering about reasoning and whether in case of show_pubkey
the hexlification could be done in the layout; we know that pubkey is bytes
otherwise basically LGTM, let's wait until the release branch, and then rebase&merge
1cb7383
to
379440b
Compare
Addressed the comments and rebased to master. Conflicts:
|
379440b
to
06d0156
Compare
Rebased on master to resolve conflicts in fixtures. Ready to merge? UI diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approval from me
but pinging @tsusanka, this is big enough that i'd like another pair of eyes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have skimmed through the code and discussed few things on-call with @mmilata. Let's merge it! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have skimmed through the code and discussed few things with @mmilata on-call. Let's merge this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have skimmed through the code and discussed few things with @mmilata on-call. Let's merge this!
Due to Github's 500 I have approved 3x times 🙄. |
sure, LGTM. |
f9f91a2
to
3504dae
Compare
They now live under trezor.ui.components.tt. Later trezor.ui.components.t1 will be added and application code will be rewritten to not use them directly in order to work on both TT and T1.
Layouts can be used by the application code to interact with user using small number of dialogs or other groups of UI components. Each layout is identified by name and takes some parameters. Most layouts will have an implementation for each hardware model, mechanism is provided to import the correct version so that application code can be oblivious to the model. This commit introduces the layout concept and converts a couple of dialogs to use it.
3504dae
to
2d92a49
Compare
Rebased and fixed a typing issue exposed by bf562cf.
The Cancel works in current master but was broken in this branch which was fixed. Or am I misunderstanding you? |
it works, but it's meaningless on a GetPublicKey message, because a potential attacker can obtain the pubkey silently anyway. I suppose we should remove the cancel button in the redesign. |
Most changes in this PR come from #1312, except there are no UI bits for T1, and the layouts have been tweaked to pass most UI tests.
Changes:
Layout
abstraction (formerlyWidget
)To be done:
app.*
code to useLayout
s, remove direct imports oftrezor.ui.components.tt.*
ButtonRequest
message to include string field "type" (currently it is just written to log)There are some spacing differences in the UI diff, if these are a problem they can probably be worked around.