-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
[draft] Introduce trait UIFirmware #4322
Draft
obrusvit
wants to merge
36
commits into
main
Choose a base branch
from
obrusvit/ui-features-firmware3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obrusvit
added
core
Trezor Core firmware. Runs on Trezor Model T and T2B1.
blocked
Blocked by external force. Third party inputs required.
code
Code improvements
labels
Nov 5, 2024
|
|
obrusvit
force-pushed
the
obrusvit/ui-features-firmware3
branch
2 times, most recently
from
November 6, 2024 11:25
65751cc
to
5181685
Compare
This was referenced Nov 11, 2024
Open
obrusvit
force-pushed
the
obrusvit/ui-features-firmware3
branch
from
November 11, 2024 15:58
fd527ba
to
b3db3af
Compare
obrusvit
force-pushed
the
obrusvit/mercury/refactor-rust-layout-upy-parsing
branch
5 times, most recently
from
November 19, 2024 13:38
bbb65ed
to
320eb1f
Compare
obrusvit
force-pushed
the
obrusvit/mercury/refactor-rust-layout-upy-parsing
branch
from
November 19, 2024 14:39
320eb1f
to
abc7203
Compare
Base automatically changed from
obrusvit/mercury/refactor-rust-layout-upy-parsing
to
main
November 19, 2024 15:19
The new module is the place for type definitions of the interface between rust and micropython world. The goal is to replace `trezorui2` with `trezorui_api` without duplicated definitions.
This commit introduces a trait defining high level UI building blocks. The trait is common for all models. trezorui_api module exposes these functions to MicroPython world. `show_info` is implemented as a first function.
Make layouts utilizing keyboards a part of UiFeaturesFirmware
- disable_animations - check_homescreen_format
- this commit does not compile for mercury
- implement Confirm Homescreen for mercury according to Figma - implementation as SwipeFlow also allows using it as `impl LayoutMaybeTrace` return type for the UiFeatures
- in addition, to unify the trait function arguments, ButtonRequest was moved from Rust side to uPy side for mercury
- checklist is now fixed to 3 items as they are not used in other way, it can be switched to use heapless::Vec if the need for more items appears.
- unify param to just one bool `recovery` - title and button is determined in Rust based on the argument
- unsupported on model_t
- only supported for model_t - dependence on Obj
- return type is Gc<LayoutObj> - new_show_modal removed from model_t layout.rs
- replace `show_passphrase` of model_r with `show_simple`
obrusvit
force-pushed
the
obrusvit/ui-features-firmware3
branch
from
November 19, 2024 15:48
b3db3af
to
6bffb8e
Compare
obrusvit
removed
the
blocked
Blocked by external force. Third party inputs required.
label
Nov 19, 2024
ibz
reviewed
Nov 20, 2024
// UIFeaturesFirmware` | ||
// NOTE: `disable_animation` not a part of trait UiFeaturesFirmware | ||
|
||
extern "C" fn new_confirm_action(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj { |
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.
Would this be a good time to drop the new_
prefix? Or is there a reason to still keep it around?
obrusvit
force-pushed
the
obrusvit/ui-features-firmware3
branch
from
November 21, 2024 09:06
6bffb8e
to
ce1f988
Compare
- `confirm_recovery` of model_t and model_r merged with `flow_continue_recovery` of mercury into a `continue_recovery_homepage` trait function - parameters were renamed to be more descriptive - model_t has also the remaining shares info passed in, but not used
- still uses Gc<List> for now
- model_t version was moved from using plain Paragraph to a dedicated component `ShareWords` so that it's consistent with other models. This allowed to move formatting to Rust and allowed the trait function to have `words` parameter of type `Vec<TString, 33>` - model_r ShareWords::render slightly refactored to be consistent with the new model_t version - mercury uses a unique version. The reason is that mercury SwipeFlow contains also the initial screen with instructions and prompt screen at the end.
- decided to import stuff from micropython so that I don't have to write `crate::micropython::yadayada` everywhere. I'll remove that from other functions later during squash.
- not implemented for model_r
- model_t `ConfirmBlobParams` copied for now and the return type of `into_layout` changed to `Result<Gc<LayoutObj>>`
- model_t ConfirmBlobParams removed from layout.rs
obrusvit
force-pushed
the
obrusvit/ui-features-firmware3
branch
from
November 21, 2024 12:38
ce1f988
to
5d009d8
Compare
- not implemented for mercury
- model_r `confirm_backup` and mercury `flow_prompt_backup` merged into `prompt_backup` - not implemented for model_t
- this fn is basically the same as confirm_action_simple for mercury because the demibold font is the same as normal - not implemented for model_r
obrusvit
force-pushed
the
obrusvit/ui-features-firmware3
branch
from
November 25, 2024 07:23
8ff9b58
to
97ec123
Compare
obrusvit
changed the title
Introduce UiFeaturesFirmware trait
[draft] Introduce trait UIFirmware
Nov 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DRAFT