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

FTUE Splash carousel MVP #4727

Merged
merged 19 commits into from
Jan 7, 2022
Merged

FTUE Splash carousel MVP #4727

merged 19 commits into from
Jan 7, 2022

Conversation

ouchadam
Copy link
Contributor

@ouchadam ouchadam commented Dec 15, 2021

Part of #4584

  • Adds a MVP splash carousel behind a WIP flag
  • Will add a changelog once all the TODOs are done and the feature is enabled

TODO

  • Style the title fullstops
  • Automatic rotation of the carousel pages
  • Dark mode gradient (+ gradient tweaks from design)
  • Add phone landscape support
  • Replace temporary images
GIF
after-carousel
10" TABLET PORTRAIT 10" TABLET LANDSCAPE
Screenshot_20211215_144613 Screenshot_20211215_144605
3.4" PHONE SMALL 6.5" PHONE MID/LARGE
small-carousel carousel_mid-large

@ouchadam ouchadam added the Z-FTUE Issue is relevant to the first time use project or experience label Dec 15, 2021
@ouchadam ouchadam closed this Dec 15, 2021
@ouchadam ouchadam reopened this Dec 15, 2021
@ouchadam ouchadam marked this pull request as draft December 15, 2021 16:31
@github-actions
Copy link

github-actions bot commented Dec 15, 2021

Unit Test Results

  66 files  ±0    66 suites  ±0   50s ⏱️ -5s
135 tests ±0  135 ✔️ ±0  0 💤 ±0  0 ±0 
418 runs  ±0  418 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 785a142. ± Comparison against base commit f24c962.

♻️ This comment has been updated with latest results.

@Inject lateinit var vectorPreferences: VectorPreferences
@Inject lateinit var vectorFeatures: VectorFeatures
@Inject lateinit var carouselController: SplashCarouselController
@Inject lateinit var stringProvider: StringProvider
Copy link
Member

Choose a reason for hiding this comment

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

Why not injected in the constructor?

Copy link
Member

Choose a reason for hiding this comment

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

(Also a stringProvider here is a bit useless)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wasn't sure if we wanted to use it for consistency (can be helpful if the string provider ends up with extra behaviour)

didn't realise we had setup fragment constructor injection, will try it

Copy link
Member

Choose a reason for hiding this comment

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

1- You are directly using getString() later in the file :)
2- Cool thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done and done! 311474d cb88bfd

@bmarty
Copy link
Member

bmarty commented Dec 16, 2021

Maybe update this file to explain how to generate webp image and in which case?

@ouchadam ouchadam force-pushed the feature/adm/i-already-have-an-account branch from 6846cf2 to 4d02621 Compare December 16, 2021 10:35
@ouchadam ouchadam force-pushed the feature/adm/i-already-have-an-account branch from 4d02621 to 8814cd4 Compare December 16, 2021 11:14
@ouchadam ouchadam force-pushed the feature/adm/i-already-have-an-account branch from 854953e to 801a02e Compare December 16, 2021 12:22
This was referenced Dec 16, 2021
@ouchadam
Copy link
Contributor Author

ouchadam commented Jan 5, 2022

Maybe update this file to explain how to generate webp image and in which case?

design doc updated bb356ba

@ouchadam ouchadam force-pushed the feature/adm/i-already-have-an-account branch from 801a02e to 6fbf8fa Compare January 6, 2022 10:03
}

class DefaultVectorFeatures : VectorFeatures {
override fun onboardingVariant(): VectorFeatures.OnboardingVariant = BuildConfig.ONBOARDING_VARIANT
override fun isAlreadyHaveAccountSplashEnabled() = true
override fun isSplashCarouselEnabled() = false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

whilst the carousel is still WIP it's not enabled by default for the FTUE_AUTH variant

enum class OnboardingVariant {
LEGACY,
LOGIN_2,
FTUE_AUTH
}

enum class NotificationSettingsVersion {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was unused

Base automatically changed from feature/adm/i-already-have-an-account to develop January 6, 2022 17:11
@ouchadam ouchadam marked this pull request as ready for review January 6, 2022 18:12
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Nice work thanks. Just a few minor remarks

- right clicking the image file within the project file explorer
- select `Convert to WebP`

https://developer.android.com/studio/write/convert-webp
Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

views.splashCarousel.adapter = carouselController.adapter
TabLayoutMediator(views.carouselIndicator, views.splashCarousel) { _, _ -> }.attach()
carouselController.setData(SplashCarouselState(
items = listOf(
Copy link
Member

Choose a reason for hiding this comment

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

Since this state is static, maybe move all this to the constructor of SplashCarouselState?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

<gradient
android:endColor="#3372C7DA"
android:startColor="#33BBE7CF" />
</shape>
Copy link
Member

Choose a reason for hiding this comment

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

I do not have a strong opinion on it, but maybe move the new drawables to the module ui-styles? The webp images could stay in the vector project. IDK...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good to me 👍
785a142

<string name="ftue_auth_carousel_2_body">Element lets you choose where you messages are stored, keeping you in control of your data.</string>
<string name="ftue_auth_carousel_3_title">Connect with anyone.</string>
<string name="ftue_auth_carousel_3_body">Element works with all Matrix-based apps and can even bridge into proprietary messengers.</string>
<string name="ftue_auth_carousel_4_title">Cut the slack from teams.</string>
Copy link
Member

Choose a reason for hiding this comment

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

Wow :p

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's very subtle 😂

@bmarty
Copy link
Member

bmarty commented Jan 6, 2022

As a side remark, I am wondering if we could have some sort of parallax effect for the background gradient. It looks a bit too simple like this.

@ouchadam
Copy link
Contributor Author

ouchadam commented Jan 7, 2022

As a side remark, I am wondering if we could have some sort of parallax effect for the background gradient. It looks a bit too simple like this.

it's definitely something we could iterate on

@ouchadam ouchadam merged commit 28f6d10 into develop Jan 7, 2022
@ouchadam ouchadam deleted the feature/adm/splash-carousel branch January 7, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-FTUE Issue is relevant to the first time use project or experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants