-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
layouts: simple confirmations and warnings #1480
Conversation
Looking at the UI changes, I can see that the rendering mechanism adds a space after each parameter, e.g. |
because otherwise there will be two spaces. |
So let me rephrase the question. Why do we add the spaces? Do we have any examples that rely on this behavior? |
I don't know the original reasoning but at this point I'd say we add the spaces in We probably could change the behavior and update all invocations to be like
|
It seems to me that the correct solution would be not to strip spaces and not to add them at all. That way, if |
So I removed the spaces in 2febef0 and not much was needed to make UI tests pass: UI diff from master. Still this change probably introduces some corner case that will break something not covered by test. The code converted to layouts mostly uses |
Added two more commits to finish |
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 with the exception of the "require" usage. As discussed on standup it seems safer to have "require" by default and explicitly omit "requiredness" if necessary.
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 did not test, but it LGTM and solves what I meant. I am not sure about the naming not_cancelled
, maybe can_cancel
sounds better? But I don't want to hold up this PR on that so let's merge unless @matejcik objects.
I'd prefer to look this over before it is merged. If I'm blocking something, I'll move this up my priority list :) just let me know |
@matejcik I apologize, I thought you saw it already. No prob, let's wait for you :). |
Mind if I rebase this to master? |
go ahead |
28ec3a8
to
c3e5a04
Compare
Rebased. UI diff Compared to master the total allocation count in device tests increased by 42488 (0.3 %). master -> this branch |
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.
Many comments that are actually one comment: ISTM there is a better alternative to not_cancelled
function.
Larger comment: confirm_action
has way too many parameters now that should go away in the future. I am assuming all the "TODO cleanup" means that you're leaving them in for now for the sake of a clean UI diff?
For the most part though, this is shaping up wonderfully.
Thanks for the review @matejcik! Yes, the parameters with the comment are expected to disappear but exist for the sake of changing the UI as little as possible. Any idea how to verify that the PR doesn't make our fragmentation issues worse? Checking whether individual tests pass/fail on an actual hardware is very time consuming. Perhaps we can run the tests on an emulator repeatedly, decreasing the heap size each iteration until some number of tests start to fail, then compare with master? |
this is reasonable. for starters, i'd like to get also i wouldn't merge this into the upcoming release, which means we will most likely get the workflow-restart thing so that fragmentation is much less of an issue |
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.
the sdcard
thing is looking much neater now ❤️
i believe this is it. but let's discuss before merging if we want this to go to the upcoming release
So I've tested this with
and it works but with |
let's get this merged @mmilata please squash, rebase and fix conflicts |
82b6905
to
3b4eea1
Compare
Rebased, squashed, tests pass. Re-ran the heap sanity test, minimum |
This generalizes the
confirm_action
layout a bit and most of the relevant application code is modified to use it. Same withshow_success
/show_warning
/show_error
.UI diff