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

Add the FTUE use case screen for new users. #5467

Merged
merged 4 commits into from
Feb 10, 2022
Merged

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jan 31, 2022

Fixes #5160. I will add analytics separately in another PR

Additionally adds InlineTextButton and StyledText SwiftUI views and replaces some custom code in the Analytics prompt with this button.

Light Mode Dark Mode
Simulator Screen Shot - iPhone 12 Pro - 2022-02-01 at 16 19 04 Simulator Screen Shot - iPhone 12 Pro - 2022-02-01 at 16 19 17
Large Phone Small Phone Small Phone scrolled
Simulator Screen Shot - iPhone 12 Pro Max - 2022-02-01 at 16 20 22 Simulator Screen Shot - iPod touch (7th generation) - 2022-02-01 at 16 24 59 Simulator Screen Shot - iPod touch (7th generation) - 2022-02-01 at 16 25 01
11" iPad 11" iPad Landscape 12" iPad
Simulator Screen Shot - iPad Pro (11-inch) (3rd generation) - 2022-02-01 at 16 28 46 Simulator Screen Shot - iPad Pro (11-inch) (3rd generation) - 2022-02-01 at 16 28 48 Simulator Screen Shot - iPad Pro (12 9-inch) (5th generation) - 2022-02-01 at 16 27 01

@amshakal
Copy link

amshakal commented Feb 1, 2022

LGTM. The only feedback I have is that at some point of time we changed the options to:

Friends and family
Teams
Communities

Besides that, all looks fine to me. TY!

@pixlwave
Copy link
Member Author

pixlwave commented Feb 1, 2022

A couple of points to note so far @amshakal:

  1. The design deviates from the Figma when it comes to the navigation bar colour. Should this be white for the whole flow?
  2. Unlike the splash screen I've removed the maximum height of the content container, so everything is at the top of the screen on iPad. I'm split on whether it looks better or not.

@amshakal
Copy link

amshakal commented Feb 2, 2022

  1. Yeah, would prefer it being white for the whole flow but it's not essential from a UX or a UI standpoint.
  2. I think it looks fine on ipad. In fact, the information being on top and not being spread throughout the app is nicer in this case since the user has to read (follow instructions) and then interact with the components right below it.

@pixlwave pixlwave force-pushed the doug/5160_ftue_use_case branch 3 times, most recently from 743f574 to 26258c3 Compare February 4, 2022 10:17
Update strings.
Show the custom server field as needed.
Enable scroll edges appearance for white navigation bar.
@pixlwave
Copy link
Member Author

pixlwave commented Feb 4, 2022

Updated strings and navigation bar colour is visible in this recording along with what the navigation looks like from the Custom server button:

UseCase1080.mp4

@github-actions
Copy link

github-actions bot commented Feb 4, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/xYJsPK

Riot/Managers/UserSessions/UserSessionProperties.swift Outdated Show resolved Hide resolved
@@ -62,6 +62,10 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc
authenticationViewController.authType = authenticationType
}

func showCustomServer() {
authenticationViewController.hideCustomServers(false)
Copy link
Member

Choose a reason for hiding this comment

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

We should probably rename this to something along the lines of setCustomServersVisibility(_ visible: Bool)

Copy link
Member Author

@pixlwave pixlwave Feb 10, 2022

Choose a reason for hiding this comment

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

I went with setCustomServerFieldsVisible(_ isVisible: Bool) in the end and left it as it on the Coordinator for now - there will be further changes to this when AuthVC is replaced so probably makes sense to hold back and see what makes sense at that stage.

Riot/Managers/UserSessions/UserSession.swift Outdated Show resolved Hide resolved
Riot/Modules/Onboarding/OnboardingCoordinator.swift Outdated Show resolved Hide resolved
/// - tappableText: The tappable text that will be substituted into the `%@` placeholder.
/// - action: The action to perform when tapping the button.
internal init(_ mainText: String, tappableText: String, action: @escaping () -> Void) {
guard let range = mainText.range(of: "%@") else {
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if a better interface here would be to receive both the full string and the tappable string and search for the range of one in the other, instead of relying on a %@ format placeholder.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes far more sense now that you mention it 🙈

Copy link
Member Author

@pixlwave pixlwave Feb 10, 2022

Choose a reason for hiding this comment

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

Although... In theory this could produce the wrong result if the tappable text is repeated and the first occurrence isn't meant to be the one to tap on. 🤔

Terrible contrived example:

For more information tap the link below, otherwise contact us via this link.

Copy link
Member

Choose a reason for hiding this comment

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

Yep, no, that makes sense. Perhaps then the full text and the tappable range?

Copy link
Member Author

@pixlwave pixlwave Feb 10, 2022

Choose a reason for hiding this comment

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

This just pushes the issue further up but it still exists. If you have VectorL10n.descriptionMainText and VectorL10n.descriptionTappableText, you would need to either

  1. Get the main string with the placeholder as %@.
  2. Create a range from the start of the placeholder and the length of the tappable string.
  3. Manually substitute the placeholder with the tappable string
  4. Pass those to InlineTextButton

or

  1. Get the main string with the tappable string already substituted.
  2. Somehow handle the case of multiple occurrences of the tappable string (in all languages).

I agree it isn't particularly tidy this way, but not sure of any other options really 😕

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

🙌

@pixlwave pixlwave merged commit 3943b17 into develop Feb 10, 2022
@pixlwave pixlwave deleted the doug/5160_ftue_use_case branch February 10, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build FTUE Use Case screen
3 participants