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

Feature/aris/threads beta feedback #5647

Merged
merged 9 commits into from
Apr 5, 2022

Conversation

ariskotsomitopoulos
Copy link
Contributor

@ariskotsomitopoulos ariskotsomitopoulos commented Mar 28, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Users will be able to provide feedback for threads

Screenshots / GIFs

Before After Feedback
Screenshot_20220328-135835_Element dbg Screenshot_20220328-132204_Element dbg Screenshot_20220328-140341_Element dbg

Closes #5452

@github-actions
Copy link

github-actions bot commented Mar 28, 2022

Unit Test Results

110 files  +  4  110 suites  +4   1m 23s ⏱️ -3s
195 tests +  7  195 ✔️ +  7  0 💤 ±0  0 ±0 
650 runs  +28  650 ✔️ +28  0 💤 ±0  0 ±0 

Results for commit a269aa5. ± Comparison against base commit 08476a9.

This pull request removes 2 and adds 9 tests. Note that renamed tests count towards both.
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given registration has started and has dummy step to do, when handling action, then ignores other steps and executes dummy
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ when registering account, then updates state and emits account created event
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given direct authentication throws, when logging in directly, then returns failure result with original cause
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given wellknown fails with content, when logging in directly, then returns success with direct session result
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given wellknown fails without content, when logging in directly, then returns well known error
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ given wellknown throws, when logging in directly, then returns failure result with original cause
im.vector.app.features.onboarding.DirectLoginUseCaseTest ‑ when logging in directly, then returns success with direct session result
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given has sign in with matrix id sign mode, when handling login or register action fails, then emits error
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given has sign in with matrix id sign mode, when handling login or register action, then logs in directly
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given personalisation enabled and registration has started and has dummy step to do, when handling action, then ignores other steps and executes dummy
im.vector.app.features.onboarding.OnboardingViewModelTest ‑ given personalisation enabled, when registering account, then updates state and emits account created event

♻️ This comment has been updated with latest results.

@ariskotsomitopoulos ariskotsomitopoulos requested a review from a team March 30, 2022 08:51
@ouchadam ouchadam added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Apr 5, 2022
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.

Some small remarks

to the users.
-->

<bool name="feature_threads_beta_feedback_enabled">true</bool>
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 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)

@@ -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>
Copy link
Member

Choose a reason for hiding this comment

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

F -> f ?

Suggested change
<string name="give_feedback_threads">Give Feedback on threads</string>
<string name="give_feedback_threads">Give feedback on threads</string>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its with capital "F" in the designs

Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 Give Feedback instead of Give Feedback on threads

Copy link
Member

Choose a reason for hiding this comment

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

ok, thanks for double checking.

ReportType.AUTO_UISI_SENDER,
ReportType.AUTO_UISI -> bugDescription
ReportType.AUTO_UISI -> bugDescription
ReportType.THREADS_BETA_FEEDBACK -> "[Element] [threads-feedback] $bugDescription"
Copy link
Member

Choose a reason for hiding this comment

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

Not a blocker but I would have added this case just below SPACE_BETA_FEEDBACK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored!

@@ -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")
Copy link
Member

Choose a reason for hiding this comment

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

same remark about ordering cases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

app:layout_constraintEnd_toEndOf="parent"
android:background="@drawable/bg_shadow_divider"
app:layout_constraintBottom_toTopOf="@id/threadsFeedBackConstraintLayout"
/>
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Member

@bmarty bmarty Apr 5, 2022

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bmarty A solution would be to use data binding conversions such as:

@BindingConversion
fun booleanToVisibility(visible: Boolean) = if(visible) View.VISIBLE else View.GONE

So then we will be able to do in our xml:
android:visibility="@{@bool/myBooleanFlag}"

However this requires to enable data binding for the whole project and introduces some boilerplate, so I will change the default to false !

Copy link
Member

Choose a reason for hiding this comment

The 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...

android:id="@+id/threadsFeedBackConstraintLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:elevation="30dp"
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need an elevation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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:startColor="#00000000"
android:endColor="#1A000000"
/>
</shape>
Copy link
Member

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:

image

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.

Thanks for the update!

@bmarty bmarty merged commit fac317d into develop Apr 5, 2022
@bmarty bmarty deleted the feature/aris/threads_beta_feedback branch April 5, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label Threads as Beta
3 participants