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

Add voice broadcast labs setting #7393

Merged
merged 11 commits into from
Oct 19, 2022

Conversation

Florian14
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Remove the debug feature flag and move it to labs setting
Also renamed the recorded voice message files
Also changed the default voice messages duration

Note that the flag is not accessible on Android < 10 because the recording is not possible on these versions.
The flag only forbid voice broadcast recording but the listening is still possible for all users.

Motivation and context

Continue #7127

Screenshots / GIFs

image

Tests

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@Florian14 Florian14 marked this pull request as ready for review October 18, 2022 09:29
@Florian14 Florian14 changed the title Feature/fre/voice broadcast labs flag Add voice broadcast labs setting Oct 18, 2022
@Florian14 Florian14 changed the base branch from develop to feature/fre/voice_broadcast_start_listening October 18, 2022 09:30
@Florian14 Florian14 requested review from a team and ericdecanini and removed request for a team October 18, 2022 09:35
@Florian14 Florian14 force-pushed the feature/fre/voice_broadcast_start_listening branch from 441001b to d53ad43 Compare October 18, 2022 14:23
@Florian14 Florian14 force-pushed the feature/fre/voice_broadcast_labs_flag branch from 8c323ee to f8261c1 Compare October 18, 2022 14:24
@Florian14 Florian14 added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Oct 18, 2022
@Florian14 Florian14 requested review from a team and fedrunov and removed request for ericdecanini and a team October 18, 2022 15:32
Base automatically changed from feature/fre/voice_broadcast_start_listening to develop October 18, 2022 15:54
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.

Just some minor remarks on the resources, not really blocking.

library/ui-strings/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
label = "Enable Voice Broadcast",
key = DebugFeatureKeys.voiceBroadcastEnabled,
factory = VectorFeatures::isVoiceBroadcastEnabled
),
Copy link
Member

Choose a reason for hiding this comment

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

Adding a lab setting should not make us to remove the feature flag. The feature flag could help to control the display of the lab setting. Not blocking this PR though.

-->

<!-- Level 1: Labs -->
<bool name="settings_labs_enable_voice_broadcast_visible">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.

That's a nice solution, hence could be hard to understand for fork maintainers.
I would rather test API version in the code, to eventually hide the setting, even if the bool is set to true.

@@ -49,6 +49,8 @@
<bool name="settings_timeline_show_live_sender_info_default">false</bool>
<bool name="settings_labs_rich_text_editor_visible">true</bool>
<bool name="settings_labs_rich_text_editor_default">false</bool>
<bool name="settings_labs_enable_voice_broadcast_visible">false</bool> <!-- Note: also defined in values-v29 -->
Copy link
Member

Choose a reason for hiding this comment

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

If you keep this, I would rather comment like this:

Suggested change
<bool name="settings_labs_enable_voice_broadcast_visible">false</bool> <!-- Note: also defined in values-v29 -->
<bool name="settings_labs_enable_voice_broadcast_visible">false</bool> <!-- Note: this value must always be false. See in values-v29/config-settings to toggle the visibility of this flag. -->

But I would definitely go for the test at runtime, to avoid any mistakes.

So this could be changed to

Suggested change
<bool name="settings_labs_enable_voice_broadcast_visible">false</bool> <!-- Note: also defined in values-v29 -->
<!-- Note: on device with API < 29, setting this value to true has no effect. -->
<bool name="settings_labs_enable_voice_broadcast_visible">false</bool>

@Florian14 Florian14 force-pushed the feature/fre/voice_broadcast_labs_flag branch from f8261c1 to 90803be Compare October 18, 2022 19:08
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 latest remarks

@@ -3346,6 +3346,8 @@
<string name="labs_enable_session_manager_summary">Have greater visibility and control over all your sessions.</string>
<string name="labs_enable_client_info_recording_title">Enable client info recording</string>
<string name="labs_enable_client_info_recording_summary">Record the client name, version, and url to recognise sessions more easily in session manager.</string>
<string name="labs_enable_voice_broadcast_title">Enable Voice broadcast (under active development)</string>
<string name="labs_enable_voice_broadcast_summary">Be able to record and send voice broadcast in room timeline.‡</string>
Copy link
Member

Choose a reason for hiding this comment

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

Looks like there is an extra at the end of the sentence.

@@ -0,0 +1 @@
[Voice Broadcast] Move the feature flag to the labs
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[Voice Broadcast] Move the feature flag to the labs
[Voice Broadcast] Enable the feature (behind a lab flag and only for Android 10 and up).

@@ -3346,6 +3346,8 @@
<string name="labs_enable_session_manager_summary">Have greater visibility and control over all your sessions.</string>
<string name="labs_enable_client_info_recording_title">Enable client info recording</string>
<string name="labs_enable_client_info_recording_summary">Record the client name, version, and url to recognise sessions more easily in session manager.</string>
<string name="labs_enable_voice_broadcast_title">Enable Voice broadcast (under active development)</string>
Copy link
Member

Choose a reason for hiding this comment

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

@Florian14 feel free to replace the "Voice" with "voice". It would be more adapted to the other flags

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

10.0% 10.0% Coverage
0.0% 0.0% Duplication

@Florian14 Florian14 merged commit 1b9c2ed into develop Oct 19, 2022
@Florian14 Florian14 deleted the feature/fre/voice_broadcast_labs_flag branch October 19, 2022 05:50
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.

3 participants