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 custom waveform with cursor and nice gesture support. #1641

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

langleyd
Copy link
Contributor

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

A Custom waveform implementation with improved gesture support with the timeline and the green cursor added.

Motivation and context

Screenshots / GIFs

1000000004.mp4

@ElementBot
Copy link
Collaborator

ElementBot commented Oct 26, 2023

Warnings
⚠️

gradle/libs.versions.toml#L24 - A newer version of androidx.compose:compose-bom than 2023.10.00 is available: 2023.10.01

⚠️

gradle/libs.versions.toml#L64 - A newer version of com.google.android.material:material than 1.9.0 is available: 1.10.0

⚠️

gradle/libs.versions.toml#L101 - A newer version of androidx.compose.material3:material3 than 1.2.0-alpha09 is available: 1.2.0-alpha10

Generated by 🚫 dangerJS against eca7d70

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 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/vWYgK8

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

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

Comparison is base (7d1b671) 63.20% compared to head (eca7d70) 63.22%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1641      +/-   ##
===========================================
+ Coverage    63.20%   63.22%   +0.02%     
===========================================
  Files         1201     1202       +1     
  Lines        31207    31279      +72     
  Branches      6447     6458      +11     
===========================================
+ Hits         19724    19777      +53     
- Misses        8523     8537      +14     
- Partials      2960     2965       +5     
Files Coverage Δ
...timeline/components/event/TimelineItemVoiceView.kt 65.68% <80.00%> (+0.33%) ⬆️
.../features/messages/impl/mediaplayer/MediaPlayer.kt 7.84% <0.00%> (-0.33%) ⬇️
...s/messages/impl/voicemessages/timeline/Waveform.kt 84.61% <84.61%> (ø)
...mpl/voicemessages/timeline/WaveformPlaybackView.kt 66.66% <66.66%> (ø)

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

@langleyd langleyd marked this pull request as ready for review October 26, 2023 09:03
@langleyd langleyd requested a review from a team as a code owner October 26, 2023 09:03
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 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

(canvasSize.width.value / (lineWidth.value + linePadding.value)).toInt()
}
}
val normalizedWaveformData by remember(amplitudeDisplayCount) {
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't you want to key waveform too?
In theory if the waveform changes we should also recompute the normalized data, in practice it will never happen though (the whole timeline item will change instead).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes good point, I had the same question, this was actually part of the port of form iOS. I'll check with them on that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The count can change based on the width of the screen, but we don't expect the estimated waveform to change as it comes from the event.

Copy link
Contributor

@julioromano julioromano left a comment

Choose a reason for hiding this comment

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

Super!!!

@langleyd langleyd merged commit b9b3bce into develop Oct 26, 2023
19 checks passed
@langleyd langleyd deleted the langleyd/custom_waveform branch October 26, 2023 12:52
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

3 participants