-
Notifications
You must be signed in to change notification settings - Fork 748
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
Feature/aris/threads beta feedback #5647
Changes from all 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> | ||
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 |
---|---|---|
|
@@ -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,59 @@ | |
|
||
|
||
</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" | ||
android:visibility="gone" | ||
app:layout_constraintBottom_toTopOf="@id/threadsFeedBackConstraintLayout" | ||
/> | ||
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. 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 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. 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 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 ! 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:padding="6dp" | ||
android:visibility="gone" | ||
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> |
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: