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

Model R - smaller screen #2610

Merged
merged 1 commit into from
May 31, 2023
Merged

Model R - smaller screen #2610

merged 1 commit into from
May 31, 2023

Conversation

grdddj
Copy link
Contributor

@grdddj grdddj commented Nov 5, 2022

Replaces #2277 as the main PR for model R - this one already contains the smaller screen.

Below are the current screens for the user onboarding and input methods.

It does not completely correspond to Figma, some screens are missing - based on #2609 - we may want to add these to TT's design as well.

It also doesn't yet have the "arrow signaling content continues from the previous page". I am not even sure we want to have this, together with the "arrow signalling content continues" - the scrollbars could be enough (scrollbar is just not yet implemented for the tutorial).

image

All screens to be seen under https://satoshilabs.gitlab.io/-/trezor/trezor-firmware/-/jobs/3279593101/artifacts/test_ui_report/all_unique_screens.html

Tutorial:

image

Seed backup:

image

PIN:

image

Num of words + recovery:

image

Passphrase

image

@grdddj grdddj mentioned this pull request Nov 8, 2022
@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from 4ea394e to 6141ca7 Compare November 13, 2022 14:39
@grdddj grdddj mentioned this pull request Nov 14, 2022
@grdddj grdddj removed a link to an issue Dec 1, 2022
13 tasks
@grdddj grdddj linked an issue Dec 1, 2022 that may be closed by this pull request
@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from 5d5309b to e1f7d34 Compare January 1, 2023 13:22
@grdddj grdddj force-pushed the grdddj/model_r_smaller branch 2 times, most recently from 1ea7e79 to 3abb737 Compare January 17, 2023 10:56
@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from e4e3d92 to d5db922 Compare January 23, 2023 14:49
Base automatically changed from grdddj/tt_stuff_from_tr to master May 11, 2023 19:02
@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from dd1777a to eb4075f Compare May 12, 2023 09:20
@grdddj
Copy link
Contributor Author

grdddj commented May 12, 2023

Rebased on master. Will be pushing fixups with the review feedback

@Hannsek
Copy link
Contributor

Hannsek commented May 12, 2023

Good catch. In 9a72cc4 I am cancelling the whole wallet creation when users presses cancel on this screen. I cannot easily "not show" the cancel button in this configuration (ButtonPage component), but can make a custom layout for it. Do we want it?

Let's just cancel the whole wallet creation. This is the original behaviour how it was meant to be.

core/embed/rust/src/trace.rs Outdated Show resolved Hide resolved
core/embed/rust/src/trezorhal/wordlist.rs Outdated Show resolved Hide resolved
core/embed/rust/src/trezorhal/wordlist.rs Outdated Show resolved Hide resolved
core/embed/rust/src/trezorhal/wordlist.rs Outdated Show resolved Hide resolved
core/embed/rust/src/trezorhal/wordlist.rs Show resolved Hide resolved
Big, // O
Middle, // o
Small, // .
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Model T uses the same style of scrollbars, feel free to reuse the simpler rendering algorithm in ui/model_tt/component/scroll.rs.

core/embed/rust/src/ui/model_tr/component/share_words.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/homescreen.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/display/toif.rs Outdated Show resolved Hide resolved
Copy link
Member

@mmilata mmilata left a comment

Choose a reason for hiding this comment

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

Overall the PR looks alright and seems to work, my comments are mostly re: style and code dupliction. Done for now, might give it once-over after the comments are addressed.

core/src/apps/management/apply_settings.py Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/button.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/button.rs Outdated Show resolved Hide resolved
core/src/apps/base.py Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/layout.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/flow_pages.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/display/font.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/display/mod.rs Outdated Show resolved Hide resolved
core/embed/rust/src/trezorhal/wordlist.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/layout/util.rs Outdated Show resolved Hide resolved
core/src/apps/management/apply_settings.py Outdated Show resolved Hide resolved
core/src/apps/management/recovery_device/layout.py Outdated Show resolved Hide resolved
core/src/apps/management/apply_settings.py Outdated Show resolved Hide resolved
tests/upgrade_tests/test_passphrase_consistency.py Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/button.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/button.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/trace.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/trace.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/trace.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/component/homescreen.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/model_tr/bootloader/mod.rs Outdated Show resolved Hide resolved
tests/device_tests/test_msg_applysettings.py Outdated Show resolved Hide resolved
core/embed/rust/src/ui/display/mod.rs Outdated Show resolved Hide resolved
core/embed/rust/src/ui/layout/util.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@TychoVrahe TychoVrahe left a comment

Choose a reason for hiding this comment

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

few minor things with intention to make adding new models as easy and clean as possible

core/src/apps/base.py Outdated Show resolved Hide resolved
core/src/apps/base.py Outdated Show resolved Hide resolved
core/src/apps/common/request_pin.py Outdated Show resolved Hide resolved
core/src/apps/management/apply_settings.py Show resolved Hide resolved
core/src/apps/management/change_wipe_code.py Outdated Show resolved Hide resolved
core/src/apps/management/recovery_device/layout.py Outdated Show resolved Hide resolved
@grdddj
Copy link
Contributor Author

grdddj commented May 29, 2023

few minor things with intention to make adding new models as easy and clean as possible

Thanks for the suggestions.

I did all the changes in cd2b55c so we see how they look like. I am not sure I like the empty functions more than conditionals in the main code, but have no problem with that if we all agree.

Maybe name these functions "XXX_possibly_empty" so we see on first glance they can be unsupported for some models? This is my little worry that it will look like they are called everywhere even if they are not

@TychoVrahe
Copy link
Contributor

It looks better to me, but lets see what others think. I don't really see the need for a suffix, as the implementation is one click away, but i don't mind it either.

Btw. Is there some technical limitation why passphrase on device would not be supported on T1? Since its using TR gui in core we might as well get rid of these conditions too, unless there is another reason which i dont know of.

@grdddj
Copy link
Contributor Author

grdddj commented May 29, 2023

It looks better to me, but lets see what others think. I don't really see the need for a suffix, as the implementation is one click away, but i don't mind it either.

The "click to see the implementation" is not so straightforward in case of model-specific UI functions, as there is multiple of them. In my case, it always gets the TT's implementation, so then I need to manually check the TR (and other models in the future)

Btw. Is there some technical limitation why passphrase on device would not be supported on T1? Since its using TR gui in core we might as well get rid of these conditions too, unless there is another reason which i dont know of.

I think the T1 code in core does not even exist anymore, it was all replaced by TR. So the action here might be to remove all mentions of model == 1 in core

@mmilata
Copy link
Member

mmilata commented May 29, 2023

It looks better to me, but lets see what others think. I don't really see the need for a suffix, as the implementation is one click away, but i don't mind it either.

👍 from me, if MODEL conditions tend to make code hard to read.

Maybe name these functions "XXX_possibly_empty" so we see on first glance they can be unsupported for some models? This is my little worry that it will look like they are called everywhere even if they are not

Or a comment at the call site.

@matejcik
Copy link
Contributor

let's not forget that ui.layout namespace is about UI layout and not a model abstraction layer.

things like "confirm reenter pin" we discussed at standup. let's leave them in layout as-is, there's a bunch of things that shouldn't be there either but that's going to happen Soon(tm) anyway as part of the big layout unification.

please move the homescreen validation back to apply_settings -- it's clearly not a layout function, but there is currently no better place for it.

@grdddj
Copy link
Contributor Author

grdddj commented May 29, 2023

please move the homescreen validation back to apply_settings -- it's clearly not a layout function, but there is currently no better place for it.

Done in cf99167

@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from e1f2d1b to bda3e17 Compare May 30, 2023 12:17
@grdddj
Copy link
Contributor Author

grdddj commented May 30, 2023

CI is nicely green just with changelog check. BTW, should we put the changelog into code and python?

For the master difference, there are some small changes CC @Hannsek - https://satoshilabs.gitlab.io/-/trezor/trezor-firmware/-/jobs/4373819631/artifacts/master_diff/differing_screens.html

@Hannsek
Copy link
Contributor

Hannsek commented May 30, 2023

For the master difference, there are some small changes CC

From where these changes come from for model T?

@grdddj
Copy link
Contributor Author

grdddj commented May 30, 2023

For the master difference, there are some small changes CC

From where these changes come from for model T?

Coming from changes we did to TR but are common. Should I revert some of those (3) changes? (the last one is just UI test change, the screen was already there)

@Hannsek
Copy link
Contributor

Hannsek commented May 30, 2023

Ouch, ok, we will tackle the last one later.

image
change to this please
image

image
Put there Trezor Model T, please

Or we can do it later with larger copy fixup.

) -> None:
from ubinascii import hexlify

def handle_bytes(prop: PropertyType):
Copy link
Contributor

Choose a reason for hiding this comment

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

@grdddj please create a separate issue so we can resolve this

@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from df70201 to f1a7970 Compare May 30, 2023 16:04
@grdddj
Copy link
Contributor Author

grdddj commented May 30, 2023

Ouch, ok, the last one we would tackle it later.

image change to this please image

image Put there Trezor Model T, please

Or we can do it later with larger copy fixup.

Both the Coinjoin screen and the Trezor Model T(R) changes done

@grdddj grdddj force-pushed the grdddj/model_r_smaller branch from f1a7970 to f8e3ce1 Compare May 31, 2023 07:36
@grdddj grdddj merged commit da14c22 into master May 31, 2023
@grdddj grdddj deleted the grdddj/model_r_smaller branch May 31, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
5 participants