Page MenuHomePhabricator

[native] Make QR screen style consistent with the registration flow
ClosedPublic

Authored by tomek on Thu, Nov 28, 5:31 AM.
Tags
None
Referenced Files
F3521826: D14064.id46211.diff
Mon, Dec 23, 4:54 AM
F3521768: D14064.id46259.diff
Mon, Dec 23, 4:42 AM
Unknown Object (File)
Sat, Dec 21, 6:16 PM
Unknown Object (File)
Sat, Dec 21, 1:23 PM
Unknown Object (File)
Sat, Dec 21, 6:56 AM
Unknown Object (File)
Sat, Dec 21, 12:03 AM
Unknown Object (File)
Fri, Dec 20, 4:12 AM
Unknown Object (File)
Mon, Dec 16, 2:57 PM
Subscribers

Details

Summary

Avoid using hardcoded margin and make the styling consistent with the registration flow. In the following diffs new screens from the restoration flow are introduced and all of these should follow the same theme.

https://linear.app/comm/issue/ENG-8129/qr-code-design-doesnt-look-consistent-with-the-rest-of-the-app

qr.png (953×901 px, 373 KB)

Depends on D13906

Test Plan

Check if the screen looks correct.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek edited the summary of this revision. (Show Details)
tomek requested review of this revision.Thu, Nov 28, 5:50 AM
This revision is now accepted and ready to land.Sat, Nov 30, 8:09 AM
tomek requested review of this revision.Wed, Dec 4, 6:15 AM
tomek edited the summary of this revision. (Show Details)
tomek edited the summary of this revision. (Show Details)

Don't specify the safe area twice

native/account/sign-in-navigator.react.js
55

RegistrationContainer wraps its children with the SafeAreaView.

It looks weird that we're left-aligning the header and body, but the QR code and the graphic below it are centered. Do you think we can make it more consistent?

It looks weird that we're left-aligning the header and body, but the QR code and the graphic below it are centered. Do you think we can make it more consistent?

There are two directions in which we can improve the consistency:

  1. Make all the items on this screen centered, so that they are consistent with how we display the QR
  2. Make all the items left-aligned, so that this screen is consistent with other screens in this flow

It seems like the 2nd approach is better, because it will make the whole experience more consistent.

The problem with it is that the QR code doesn't look great (at least to me) when not centered:

left-qr.png (2×1 px, 157 KB)

One solution to that is making it bigger, to take the whole width:

qr-big.png (2×1 px, 158 KB)

But it looks quite big and might cause some issues depending on the aspect ratio.

We can also consider keeping just the QR at the center:

qr-center.png (2×1 px, 156 KB)

I don't have an intuition about other directions which we can take. One idea, how to make this centered and consistent is to pretend it's left-aligned by adding a padding around it, e.g.:

qr-background.png (2×1 px, 158 KB)

Regarding the instructions, we can remove the border, left-align them, and use secondary color for the title, and tertiary for the steps:

instructions.png (2×1 px, 163 KB)

Yet another option is to display the QR in a similar way to how we display big icons on the other registration-like screens:

qr-bottom.png (2×1 px, 161 KB)

I think these two options were the best:

Screenshot 2024-12-07 at 3.55.35 PM.png (1×1 px, 188 KB)

Maybe something in between, where the QR code is large and takes up most of the space, but not quite as much as in your largest example?

Worth considering how this looks on mini devices (eg. iPhone 12 mini) or devices with strange dimensions

One other thing is that it would be good to have bullet points for the three lines of instructions for finding the scanner.

The QR code size was made to depend on the screen width, which is always less than the height. This allows the user to always be able to see the full QR even for the most uncommon aspect rations (sometimes the user would need to scroll this screen). Tested on two devices, one of which has 16:9 aspect.

Added the bullet points - it seems like the common practice is to use Unicode chars for that.

Looks great! Thanks for iterating on this :)

This revision is now accepted and ready to land.Mon, Dec 9, 8:27 AM

Use window dimensions hook