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 message recording duration indicator and limit #1628

Merged
merged 6 commits into from
Oct 24, 2023

Conversation

jonnyandrew
Copy link
Contributor

@jonnyandrew jonnyandrew commented Oct 23, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

  • Add an indicator for the voice message recording duration.
  • Add a 30 minute limit for voice message recording

Motivation and context

element-hq/element-meta#2084

Screenshots / GIFs

Tests

  • Test manually by reducing the limit to 10 seconds.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 13

Checklist

@jonnyandrew jonnyandrew force-pushed the jonny/voice-message-sending-duration branch from 3ca7865 to 41f4b2d Compare October 23, 2023 16:45
@jonnyandrew jonnyandrew marked this pull request as ready for review October 23, 2023 16:47
@jonnyandrew jonnyandrew requested a review from a team as a code owner October 23, 2023 16:47
@jonnyandrew jonnyandrew requested review from julioromano and removed request for a team October 23, 2023 16:47
Base automatically changed from jonny/voice-message-sending to develop October 23, 2023 17:28
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/2mmVHS

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (8c0d9cc) 59.24% compared to head (dae5a38) 59.25%.

❗ Current head dae5a38 differs from pull request most recent head 2865929. Consider uploading reports for the commit 2865929 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1628   +/-   ##
========================================
  Coverage    59.24%   59.25%           
========================================
  Files         1246     1248    +2     
  Lines        32286    32290    +4     
  Branches      6627     6622    -5     
========================================
+ Hits         19128    19132    +4     
  Misses       10286    10286           
  Partials      2872     2872           
Files Coverage Δ
...mpl/voicemessages/VoiceMessageComposerPresenter.kt 93.97% <100.00%> (ø)
...voicemessages/VoiceMessageComposerStateProvider.kt 87.50% <100.00%> (ø)
...s/textcomposer/components/VoiceMessageRecording.kt 80.00% <100.00%> (ø)
.../libraries/textcomposer/model/VoiceMessageState.kt 100.00% <100.00%> (ø)
...ent/android/libraries/ui/utils/time/DurationExt.kt 100.00% <100.00%> (ø)
.../libraries/voicerecorder/api/VoiceRecorderState.kt 100.00% <100.00%> (ø)
.../libraries/voicerecorder/impl/VoiceRecorderImpl.kt 92.30% <100.00%> (+1.19%) ⬆️
.../libraries/voicerecorder/test/FakeVoiceRecorder.kt 92.59% <100.00%> (+1.28%) ⬆️
...id/services/toolbox/impl/systemclock/TimeModule.kt 0.00% <0.00%> (ø)
...ent/android/libraries/textcomposer/TextComposer.kt 78.41% <33.33%> (-0.30%) ⬇️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jonnyandrew jonnyandrew force-pushed the jonny/voice-message-sending-duration branch from e58356f to dae5a38 Compare October 23, 2023 19:47
@sonarcloud
Copy link

sonarcloud bot commented Oct 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

*
* @return the formatted duration.
*/
fun Duration.formatShort(): String {
Copy link
Contributor

Choose a reason for hiding this comment

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

@bmarty Is there already amodule for such utilities?

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 thought about putting it in libraries:core but it felt a bit too low level for this extension. And I thought libraries:ui-utils could start to grow with some common Compose utilities too (e.g. SoftKeyboardEffect which I didn't find a proper home for).

Copy link
Member

Choose a reason for hiding this comment

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

Could be in the designsystem module, as per thinks for modifiers.

But we can update this later.

@jonnyandrew jonnyandrew merged commit f1b142f into develop Oct 24, 2023
16 checks passed
@jonnyandrew jonnyandrew deleted the jonny/voice-message-sending-duration branch October 24, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants