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

Make 'WordPress is better with Jetpack' bottom sheet text and button fully visible with big fonts #17503

Merged
merged 4 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
21.3
-----
* [*] [Jetpack-only] Comments: fix a crash in My Site > Comments with Jetpack standalone plugins. [https://github.com/wordpress-mobile/WordPress-Android/pull/17456]
* [*] [internal] Fix an issue preventing the text and button on the 'WordPress is Better with Jetpack' overlay to be entirely visible with big fonts. [https://github.com/wordpress-mobile/WordPress-Android/pull/17503]

21.2
-----
Expand Down
120 changes: 69 additions & 51 deletions WordPress/src/main/res/layout-land/jetpack_powered_bottom_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_extra_extra_medium_large"
android:paddingEnd="@dimen/margin_extra_extra_medium_large"
android:background="@color/jetpack_powered_bottom_sheet_background">

<include
Expand All @@ -18,59 +16,79 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.airbnb.lottie.LottieAnimationView
android:id="@+id/illustration_view"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_extra_medium_large"
android:scaleType="centerCrop"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/handle"
app:layout_constraintStart_toStartOf="parent"
app:lottie_rawRes="@raw/wp2jp_left"
app:lottie_enableMergePathsForKitKatAndAbove="true"
app:lottie_autoPlay="true"
app:lottie_loop="false" />
app:layout_constraintBottom_toBottomOf="parent">

<TextView
android:id="@+id/title"
style="@style/TextAppearance.Material3.HeadlineMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
android:text="@string/wp_jetpack_powered_better_with_jetpack"
android:textFontWeight="700"
app:layout_constraintTop_toBottomOf="@id/illustration_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:targetApi="p" />
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">

<TextView
android:id="@+id/caption"
style="?attr/textAppearanceBody1"
android:text="@string/wp_jetpack_powered_features"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_extra_extra_medium_large"
android:paddingEnd="@dimen/margin_extra_extra_medium_large"
android:paddingBottom="@dimen/margin_extra_extra_large">

<com.google.android.material.button.MaterialButton
android:id="@+id/primary_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_extra_large"
android:layout_marginBottom="@dimen/margin_64dp"
android:backgroundTint="@color/jetpack_green_40"
android:gravity="center"
android:minHeight="@dimen/margin_64dp"
app:cornerRadius="@dimen/margin_small_medium"
android:text="@string/wp_jetpack_get_new_jetpack_app"
android:textAppearance="?attr/textAppearanceSubtitle2"
android:textColor="?attr/colorOnSecondary"
app:layout_constraintTop_toBottomOf="@id/caption"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/illustration_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_extra_medium_large"
android:scaleType="centerCrop"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:lottie_rawRes="@raw/wp2jp_left"
app:lottie_enableMergePathsForKitKatAndAbove="true"
app:lottie_autoPlay="true"
app:lottie_loop="false" />

<TextView
android:id="@+id/title"
style="@style/TextAppearance.Material3.HeadlineMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
android:text="@string/wp_jetpack_powered_better_with_jetpack"
android:textFontWeight="700"
app:layout_constraintTop_toBottomOf="@id/illustration_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:targetApi="p" />

<TextView
android:id="@+id/caption"
style="?attr/textAppearanceBody1"
android:text="@string/wp_jetpack_powered_features"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

<com.google.android.material.button.MaterialButton
android:id="@+id/primary_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_extra_extra_medium_large"
android:layout_marginEnd="@dimen/margin_extra_extra_medium_large"
android:layout_marginBottom="@dimen/margin_extra_extra_medium_large"
android:backgroundTint="@color/jetpack_green_40"
android:gravity="center"
android:minHeight="@dimen/margin_64dp"
app:cornerRadius="@dimen/margin_small_medium"
android:text="@string/wp_jetpack_get_new_jetpack_app"
android:textAppearance="?attr/textAppearanceSubtitle2"
android:textColor="?attr/colorOnSecondary"
app:layout_constraintBottom_toBottomOf="parent"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
122 changes: 70 additions & 52 deletions WordPress/src/main/res/layout/jetpack_powered_bottom_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_extra_extra_medium_large"
android:paddingEnd="@dimen/margin_extra_extra_medium_large"
android:background="@color/jetpack_powered_bottom_sheet_background">

<include
Expand All @@ -18,60 +16,80 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.airbnb.lottie.LottieAnimationView
android:id="@+id/illustration_view"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_64dp"
android:scaleType="centerCrop"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/handle"
app:layout_constraintStart_toStartOf="parent"
app:lottie_rawRes="@raw/wp2jp_left"
app:lottie_enableMergePathsForKitKatAndAbove="true"
app:lottie_autoPlay="true"
app:lottie_loop="false" />
app:layout_constraintBottom_toBottomOf="parent">

<TextView
android:id="@+id/title"
style="@style/TextAppearance.Material3.HeadlineMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
android:text="@string/wp_jetpack_powered_better_with_jetpack"
android:textSize="@dimen/m3_sys_typescale_headline_large_text_size"
android:textFontWeight="700"
app:layout_constraintTop_toBottomOf="@id/illustration_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:targetApi="p" />
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">

<TextView
android:id="@+id/caption"
style="?attr/textAppearanceBody1"
android:text="@string/wp_jetpack_powered_features"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/margin_extra_extra_medium_large"
android:paddingEnd="@dimen/margin_extra_extra_medium_large"
android:paddingBottom="@dimen/jetpack_banner_height">

<com.google.android.material.button.MaterialButton
android:id="@+id/primary_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/jetpack_banner_height"
android:layout_marginBottom="@dimen/margin_64dp"
android:backgroundTint="@color/jetpack_green_40"
android:gravity="center"
android:minHeight="@dimen/margin_64dp"
app:cornerRadius="@dimen/margin_small_medium"
android:text="@string/wp_jetpack_get_new_jetpack_app"
android:textAppearance="?attr/textAppearanceSubtitle2"
android:textColor="?attr/colorOnSecondary"
app:layout_constraintTop_toBottomOf="@id/caption"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/illustration_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_64dp"
android:scaleType="centerCrop"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:lottie_rawRes="@raw/wp2jp_left"
app:lottie_enableMergePathsForKitKatAndAbove="true"
app:lottie_autoPlay="true"
app:lottie_loop="false" />

<TextView
android:id="@+id/title"
style="@style/TextAppearance.Material3.HeadlineMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
android:text="@string/wp_jetpack_powered_better_with_jetpack"
android:textSize="@dimen/m3_sys_typescale_headline_large_text_size"
android:textFontWeight="700"
app:layout_constraintTop_toBottomOf="@id/illustration_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:targetApi="p" />

<TextView
android:id="@+id/caption"
style="?attr/textAppearanceBody1"
android:text="@string/wp_jetpack_powered_features"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_extra_medium_large"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

<com.google.android.material.button.MaterialButton
android:id="@+id/primary_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_extra_extra_medium_large"
android:layout_marginEnd="@dimen/margin_extra_extra_medium_large"
android:layout_marginBottom="@dimen/margin_64dp"
android:backgroundTint="@color/jetpack_green_40"
android:gravity="center"
android:minHeight="@dimen/margin_64dp"
app:cornerRadius="@dimen/margin_small_medium"
android:text="@string/wp_jetpack_get_new_jetpack_app"
android:textAppearance="?attr/textAppearanceSubtitle2"
android:textColor="?attr/colorOnSecondary"
app:layout_constraintBottom_toBottomOf="parent"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>