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

Show correct UI when replying to a voice message #1658

Merged
merged 5 commits into from
Oct 27, 2023

Conversation

julioromano
Copy link
Contributor

Shows voice messages in the room summary.
Shows voice messages in the reply context menu and composer.
Show replies to voice messages in the timeline.

(before this PR voice messages were shown the same as audio messages)

Story: element-hq/element-meta#2106

@julioromano julioromano self-assigned this Oct 27, 2023
@julioromano julioromano requested a review from a team as a code owner October 27, 2023 07:55
@julioromano julioromano requested review from bmarty and removed request for a team October 27, 2023 07:55
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, LGTM, will approve after the screenshots have been recorded.

),
anActionListState().copy(
target = ActionListState.Target.Success(
event = aTimelineItemEvent(content = aTimelineItemVoiceContent()).copy(
Copy link
Member

Choose a reason for hiding this comment

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

There is no case with aTimelineItemFileContent anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whooops :) fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Though I was also suprised there wasn't a aTimelineItemAudioContent

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding them all!

is AudioMessageType -> {
when (type.isVoiceMessage) {
true -> true
false -> true
Copy link
Member

Choose a reason for hiding this comment

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

Always true then?

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 the future we'll have to split AudioMessageType in two (AudioMessageType and VoiceMessageType).
When we do this having such structure in place might help a bit.

What do you think?
Should I actually split the message type right now?

Copy link
Member

Choose a reason for hiding this comment

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

No worries, if there are plan to change this later :)

@julioromano
Copy link
Contributor Author

julioromano commented Oct 27, 2023

@ElementBot
Copy link
Collaborator

ElementBot commented Oct 27, 2023

Warnings
⚠️

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt#L37 - Using a material import while also using the material3 library

⚠️

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt#L38 - Using a material import while also using the material3 library

⚠️

libraries/designsystem/src/main/res/drawable/ic_voice_attachment.xml#L7 - Very long vector path (1117 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector.

Generated by 🚫 dangerJS against 7c25e59

@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 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
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

📱 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/nKtKWW

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

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

Comparison is base (aaaad23) 63.03% compared to head (7c25e59) 63.08%.
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1658      +/-   ##
===========================================
+ Coverage    63.03%   63.08%   +0.05%     
===========================================
  Files         1219     1219              
  Lines        31389    31420      +31     
  Branches      6450     6455       +5     
===========================================
+ Hits         19786    19822      +36     
+ Misses        8630     8625       -5     
  Partials      2973     2973              
Files Coverage Δ
...essages/impl/actionlist/ActionListStateProvider.kt 98.59% <100.00%> (+0.23%) ⬆️
...tformatter/impl/DefaultRoomLastMessageFormatter.kt 95.52% <100.00%> (+0.13%) ⬆️
...raries/matrix/ui/components/AttachmentThumbnail.kt 89.36% <100.00%> (+12.61%) ⬆️
...ndroid/features/messages/impl/MessagesPresenter.kt 81.62% <0.00%> (-0.90%) ⬇️
...eatures/messages/impl/actionlist/ActionListView.kt 62.71% <66.66%> (+3.06%) ⬆️
...s/impl/timeline/components/TimelineItemEventRow.kt 60.51% <0.00%> (-0.80%) ⬇️

... and 1 file with indirect coverage changes

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

Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

Since @bmarty already gave his approval, I'll approve it now we have some screenshots. There are some missing for the room list and timeline, but we can add them in a separate PR.

@julioromano julioromano merged commit b2a61f2 into develop Oct 27, 2023
16 checks passed
@julioromano julioromano deleted the julioromano/reply_to_voice branch October 27, 2023 09:30
@julioromano
Copy link
Contributor Author

Since @bmarty already gave his approval, I'll approve it now we have some screenshots. There are some missing for the room list and timeline, but we can add them in a separate PR.

Continuation: #1660

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