-
Notifications
You must be signed in to change notification settings - Fork 731
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
Updated splash carousel images and copy #4880
Conversation
private val stringProvider: StringProvider | ||
) { | ||
|
||
fun create() = SplashCarouselState(listOf( |
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 state creation has been extracted out to a dedicated factory as we need to apply some span logic to the terminating .
@@ -39,7 +39,7 @@ | |||
|
|||
<ImageView | |||
android:id="@+id/carousel_item_image" | |||
android:layout_width="wrap_content" | |||
android:layout_width="match_parent" |
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.
now that we have consistent bounding boxes we can matching the parent (which is constrained by gutters)
|
||
private fun Int.colorTerminatingFullStop(@AttrRes color: Int): EpoxyCharSequence { | ||
val string = stringProvider.getString(this) | ||
val fullStop = "." |
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.
this is incredibly decoupled from the input text to allow languages which don't use full stops to be skipped, maybe a good idea or a terrible one, I'm not sure yet.
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.
It looks acceptable to me like this. Not a big deal anyway.
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.
Thanks, just some thoughts.
|
||
private fun Int.colorTerminatingFullStop(@AttrRes color: Int): EpoxyCharSequence { | ||
val string = stringProvider.getString(this) | ||
val fullStop = "." |
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.
It looks acceptable to me like this. Not a big deal anyway.
private fun Int.colorTerminatingFullStop(@AttrRes color: Int): EpoxyCharSequence { | ||
val string = stringProvider.getString(this) | ||
val fullStop = "." | ||
val charSequence = if (string.endsWith(fullStop)) { |
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.
Wondering how it will work with RTL languages. Not critical anyway.
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.
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.
What is "Pseudo RTL"? Even when forcing RTL from the developer option of my phone, is does not reverse the Strings like that.
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.
they're fake languages for testing locales https://developer.android.com/guide/topics/resources/pseudolocales
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.
TIL. But seems quite not useful if it breaks fun like endsWith
.
I prefer to force the app to "Arabic" for instance in the "Choose language" screen.
android:viewportWidth="300" | ||
android:viewportHeight="300"> | ||
<group> | ||
<clip-path |
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.
pretty sure lint is already complaining about the complexity of those vectors...
Not a strong opinion neither, but probably quite bad for the performance than classical png/webp images
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.
as these are one time use assets and they're quite complex I'll covert to .png
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.
<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_3_title">Secure Messaging.</string> | ||
<string name="ftue_auth_carousel_3_body">No phone number required, so you don\'t have to share those details with the outside world. No ads, no tracking or datamining.</string> |
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.
Is "no tracking" true regarding analytics? CC @daniellekirkwood
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.
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.
sounds good to me 👍
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.
Thanks!
a0bf2ed
to
0e3068e
Compare
@@ -10,4 +10,6 @@ | |||
<!-- Value MUST have 4 letters and MUST be in this list: https://www.unicode.org/iso15924/iso15924-codes.html. Example: "Arab", "Cyrl", "Latn", etc. --> | |||
<string name="resources_script">Latn</string> | |||
|
|||
<string name="cut_the_slack_from_teams">Cut the slack from teams.</string> |
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.
Maybe better to put it in this file and add the translatable="false"
attribute
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.
will do 👍
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.
updated 2958644
2958644
to
27377d3
Compare
keeping as a draft until we finalise the carousel copy |
27377d3
to
774bed6
Compare
Matrix SDKIntegration Tests Results:
|
@@ -35,7 +35,7 @@ abstract class SplashCarouselItem : VectorEpoxyModel<SplashCarouselItem.Holder>( | |||
|
|||
holder.view.setBackgroundResource(item.pageBackground) | |||
holder.image.setImageResource(item.image) | |||
holder.title.setText(item.title) | |||
holder.title.text = item.title.charSequence |
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.
hopefully there is not Emoji there.
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.
😅 we should be okay as we've using the EpoxyCharSequence
and there's no setTextFuture
🤞
<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_2_body">Element lets you choose where your messages are stored, keeping you in control of your data.</string> |
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.
We should not use hard-coded Element
in the string. Use ${app_name}
and add template
to the string key. (see other example in this file.
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.
very good point, will update 👍
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.
also marks the previous strings for removal
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.
One last remark, sorry.
8ceafb4
to
f389e28
Compare
- also meant extracting out a separate state creation factory to avoid having too much logic inside the fragment
- also fixes the carousel text reposition based on line count
- marked as donottranslate whilst waiting for sign off - removed the positioning from the naming schema in favour of location of context
…pp name - also marks the now unused strings for deletion
f389e28
to
1528238
Compare
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.
Thanks for the update
Part of #4584