-
Notifications
You must be signed in to change notification settings - Fork 913
Feature/aris/threads beta feedback #5647
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
Changes from 5 commits
58cc393
a2e2cdc
9eccb9e
b996e0e
3ba2419
b5f8d2c
aef4cce
858623b
a269aa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Users will be able to provide feedback for threads |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:shape="rectangle" > | ||
| <gradient | ||
| android:angle="-90" | ||
| android:startColor="#00000000" | ||
| android:endColor="#1A000000" | ||
| /> | ||
| </shape> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
|
|
||
| <!-- This file contains values to show or hide some features, that are not available from | ||
| settings & labs. Values here are mainly modified by developers and are not exposed | ||
| to the users. | ||
| --> | ||
|
|
||
| <bool name="feature_threads_beta_feedback_enabled">true</bool> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is a temporary flag, it's OK to keep it like that, but a FeatureFlag would have been better here. I am still writting the doc about it) |
||
|
|
||
| </resources> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,11 +255,12 @@ class BugReporter @Inject constructor( | |
|
|
||
| if (!mIsCancelled) { | ||
| val text = when (reportType) { | ||
| ReportType.BUG_REPORT -> "[Element] $bugDescription" | ||
| ReportType.SUGGESTION -> "[Element] [Suggestion] $bugDescription" | ||
| ReportType.SPACE_BETA_FEEDBACK -> "[Element] [spaces-feedback] $bugDescription" | ||
| ReportType.BUG_REPORT -> "[Element] $bugDescription" | ||
| ReportType.SUGGESTION -> "[Element] [Suggestion] $bugDescription" | ||
| ReportType.SPACE_BETA_FEEDBACK -> "[Element] [spaces-feedback] $bugDescription" | ||
| ReportType.AUTO_UISI_SENDER, | ||
| ReportType.AUTO_UISI -> bugDescription | ||
| ReportType.AUTO_UISI -> bugDescription | ||
| ReportType.THREADS_BETA_FEEDBACK -> "[Element] [threads-feedback] $bugDescription" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a blocker but I would have added this case just below
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refactored! |
||
| } | ||
|
|
||
| // build the multi part request | ||
|
|
@@ -350,6 +351,7 @@ class BugReporter @Inject constructor( | |
| builder.addFormDataPart("label", "android") | ||
| builder.addFormDataPart("label", "uisi-sender") | ||
| } | ||
| ReportType.THREADS_BETA_FEEDBACK -> builder.addFormDataPart("label", "threads-feedback") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same remark about ordering cases
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated! |
||
| } | ||
|
|
||
| if (getCrashFile().exists()) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ | |
| android:layout_width="0dp" | ||
| android:layout_height="0dp" | ||
| android:background="?android:colorBackground" | ||
| app:layout_constraintBottom_toBottomOf="parent" | ||
| app:layout_constraintBottom_toTopOf="@id/threadsFeedBackConstraintLayout" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@id/threadListAppBarLayout" | ||
|
|
@@ -75,13 +75,13 @@ | |
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginBottom="20dp" | ||
| android:gravity="center" | ||
| android:text="@string/thread_list_empty_title" | ||
| android:textColor="?vctr_content_primary" | ||
| app:layout_constraintBottom_toTopOf="@id/threadListEmptySubtitleTextView" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| android:gravity="center" | ||
| app:layout_constraintTop_toBottomOf="@id/threadListEmptyImageView" | ||
| android:text="@string/thread_list_empty_title" /> | ||
| app:layout_constraintTop_toBottomOf="@id/threadListEmptyImageView" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/threadListEmptySubtitleTextView" | ||
|
|
@@ -90,12 +90,12 @@ | |
| android:layout_height="wrap_content" | ||
| android:layout_marginBottom="20dp" | ||
| android:gravity="center" | ||
| android:text="@string/thread_list_empty_subtitle" | ||
| android:textColor="?vctr_content_secondary" | ||
| app:layout_constraintBottom_toTopOf="@id/threadListEmptyNoticeTextView" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@id/threadListEmptyTitleTextView" | ||
| android:text="@string/thread_list_empty_subtitle" /> | ||
| app:layout_constraintTop_toBottomOf="@id/threadListEmptyTitleTextView" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/threadListEmptyNoticeTextView" | ||
|
|
@@ -112,4 +112,58 @@ | |
|
|
||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
|
|
||
| <View | ||
| android:id="@+id/threadFeedbackDivider" | ||
| android:layout_width="0dp" | ||
| android:layout_height="4dp" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:background="@drawable/bg_shadow_divider" | ||
| app:layout_constraintBottom_toTopOf="@id/threadsFeedBackConstraintLayout" | ||
| /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid possible blink, it's better to hide those new views by default.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case it's the opposite, to avoid blinking we should turn them on, they are not dynamic. Feedback will be on by default
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. But it's worth to see the View to quickly vanish when opening the screen (if the bool was set to false), than to see the View to quickly appear.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see your point, I have something in mind that will be a solution for both
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bmarty A solution would be to use data binding conversions such as: So then we will be able to do in our xml: However this requires to enable data binding for the whole project and introduces some boilerplate, so I will change the default to false !
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, that does not worth it. Also in the XML config we could have view style, defining a visibility... |
||
| <androidx.constraintlayout.widget.ConstraintLayout | ||
| android:id="@+id/threadsFeedBackConstraintLayout" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:elevation="30dp" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need an elevation here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the shadow, however I enhanced it by adding the divider view so we don't really need that |
||
| android:padding="6dp" | ||
| app:layout_constraintBottom_toBottomOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent"> | ||
| <TextView | ||
| android:id="@+id/threadsBetaFeedbackIcon" | ||
| style="@style/Widget.Vector.TextView.Caption" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:layout_gravity="center" | ||
| android:background="@drawable/notification_badge" | ||
| android:backgroundTint="@color/palette_azure" | ||
| android:gravity="center" | ||
| android:paddingStart="10dp" | ||
| android:paddingTop="3dp" | ||
| android:paddingEnd="10dp" | ||
| android:paddingBottom="3dp" | ||
| android:text="@string/beta" | ||
| android:textColor="@color/palette_white" | ||
| app:layout_constraintBottom_toBottomOf="@id/threadsBetaFeedbackButton" | ||
| app:layout_constraintEnd_toStartOf="@id/threadsBetaFeedbackButton" | ||
| app:layout_constraintHorizontal_chainStyle="packed" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toTopOf="@id/threadsBetaFeedbackButton" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/threadsBetaFeedbackButton" | ||
| style="@style/Widget.Vector.TextView.Body" | ||
| android:layout_width="wrap_content" | ||
| android:layout_height="wrap_content" | ||
| android:gravity="center" | ||
| android:padding="8dp" | ||
| android:text="@string/give_feedback_threads" | ||
| android:textColor="@color/vector_info_color" | ||
| app:layout_constraintBottom_toBottomOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toEndOf="@id/threadsBetaFeedbackIcon" /> | ||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1648,6 +1648,10 @@ | |||||
| <string name="feedback_sent">Thanks, your feedback has been successfully sent</string> | ||||||
| <string name="feedback_failed">The feedback failed to be sent (%s)</string> | ||||||
| <string name="give_feedback">Give Feedback</string> | ||||||
| <string name="give_feedback_threads">Give Feedback on threads</string> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its with capital "F" in the designs
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but the current strategy is rather to avoid capitalization. Can you double check with the product please?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They still want that with Capital F for that specific case, new string resource will be
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, thanks for double checking. |
||||||
| <string name="send_feedback_threads_title">Threads Beta feedback</string> | ||||||
| <string name="send_feedback_threads_info">Threads are a work in progress with new, exciting upcoming features, such as improved notifications. We’d love to hear your feedback!</string> | ||||||
| <string name="beta">BETA</string> | ||||||
|
|
||||||
| <string name="settings_labs_show_hidden_events_in_timeline">Show hidden events in timeline</string> | ||||||
| <string name="settings_labs_show_complete_history_in_encrypted_room">"Show complete history in encrypted rooms"</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.
Separator on dark theme is maybe not visible enough: