-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
RustLayout rework, Global Layout object #3686
Conversation
11180d3
to
5c45151
Compare
|
|
UI changes summary:
Learn moreReviewer instructionsI strongly recommend going by commits. There's a big one that does most of the things (b75dbe1), the other ones are more reasonable. Please also point out if you feel that something is not documented that should be. |
TODO: this definitely wants a changelog entry |
seems that there's a progress related piece of code that I didn't manage to commit. stay tuned for fixes. |
also this does not feel like I added 11k of code, not sure what is going on... |
9177d75
to
f535960
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.
Mostly nits, let's fix the backlight & tests and merge soon so it gets some testing before next release.
// invoke the initial placement | ||
new.root_mut().obj_place(constant::screen()); | ||
// cause a repaint pass to update the number of pages | ||
let msg = new.obj_event(Event::RequestPaint); |
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.
I think until now Event::Attach
was the first event sent after construction, pleasantly surprised this change did not break anything.
@@ -27,6 +27,7 @@ | |||
MessageType.DoPreauthorized, | |||
MessageType.WipeDevice, | |||
MessageType.SetBusy, | |||
MessageType.Ping, |
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.
We can ask Suite just to be sure but given that it's this way on T1 they probably don't rely on it.
// Trezor T < 2.6.0 only - wait until reset word position is requested | ||
optional bool wait_word_pos = 2 [deprecated=true]; | ||
// trezor-core only - wait until current layout changes | ||
// changed in 2.6.4: multiple wait types instead of true/false. |
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.
Nit: version does not match anymore
tests/device_handler.py
Outdated
self.debuglink().wait_layout(wait_for_external_change=True) | ||
|
||
# make sure we start the wait while a layout is up | ||
# TODO should this be part of "wait_for_layout_change"? |
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.
Nit: TODO
@@ -0,0 +1,196 @@ | |||
# UI Layout Lifecycle |
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.
IIRC you mentioned that this is now outdated, though it doesn't seems so on the first look.
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.
Some points, mostly nits.
In addition: docs/event-loop.msd
could be updated with mailbox
description.
f84d33e
to
5d9d97e
Compare
[no changelog]
[no changelog]
Submodule update only. [no changelog]
- some non-english texts do not fit on the screen and are paginated, these tests cannot handle it - commented out not to block GFL PR, to be resolved later
80fef26
to
9297722
Compare
…eRequest legacy < 1.11.0 will never answer those because PinRequest and PassphraseRequest block waiting for PinAck / PassphraseAck over wirelink and ignore debuglink
9297722
to
6b8585b
Compare
Ladies and gentlemen, this is what you've been waiting for
fixes #2299
fixes #3280
Main features:
ui.Layout
andui.ProgressLayout
classesRustLayout
that is kind-of-but-not-really a copypaste jobui.CURRENT_LAYOUT
that always unambiguously refers to the layout that is on the screen, orNone
if the screen is darkclient.debug.wait_layout()
is now almost never needed, except in very special cases.read_layout()
Does The Right Thing.Minor niceties
loop.wait()
so you usually don't need to useloop.race(xyz, loop.wait(...))
e8990celoop.chan
is unused now. I left it in just in case but we can probably remove it 9f01c9fhandle_session
now that it does not need to support debuglink 06cad6fmake test_emu_ui
in zsh not being random is fixed eb65cf6WipeDevice
will show a progress screen for the 2 seconds it takes to wipe storage. c98e54bSupersedes
#2335
#3083
#3665