Skip to content

Conversation

@bmarty
Copy link
Member

@bmarty bmarty commented Feb 12, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other : complete feature

Content

Improve rendering of replied event when this one is redacted or cannot be decrypted

Motivation and context

Closes #2318

Screenshots / GIFs

See recorded ones (and ignore screenshot files renaming...)

Tests

  • Send a message A
  • Send a reply to message B
  • Redact message A
  • observe rendering of message B. Before: empty content. Now: "Message removed" with a picto.

There will be the same rendering with UTD message. To test:

Login to a session and from another client with access to e2e history), reply to an old message in an e2e room.

image

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested a review from a team as a code owner February 12, 2024 17:56
@bmarty bmarty requested review from ganfra and removed request for a team February 12, 2024 17:56

@PreviewsDayNight
@Composable
internal fun TimelineItemEventRowWithReplyInformativePreview(
Copy link
Member Author

@bmarty bmarty Feb 12, 2024

Choose a reason for hiding this comment

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

Split to another preview function, since AS is limiting the number of rendered previews.

is RoomMembershipContent,
is StateContent,
UnknownContent,
null -> null
Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer to avoid else in when block...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2024

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

@codecov
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

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

Comparison is base (cb653cb) 72.03% compared to head (7bb0ec6) 72.09%.

Files Patch % Lines
...s/impl/timeline/components/TimelineItemEventRow.kt 90.62% 0 Missing and 3 partials ⚠️
.../messages/impl/timeline/model/InReplyToMetadata.kt 86.66% 0 Missing and 2 partials ⚠️
...components/TimelineItemEventRowWithReplyPreview.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2384      +/-   ##
===========================================
+ Coverage    72.03%   72.09%   +0.05%     
===========================================
  Files         1357     1358       +1     
  Lines        32021    32084      +63     
  Branches      6252     6272      +20     
===========================================
+ Hits         23067    23131      +64     
+ Misses        5703     5699       -4     
- Partials      3251     3254       +3     

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

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Feb 13, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Feb 13, 2024
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

LGTM!
Could be great to take the opportunity to show a placeholder while loading the reply?

@bmarty bmarty merged commit 58a4cc2 into develop Feb 13, 2024
@bmarty bmarty deleted the feature/bma/replyOnRedactedRendering branch February 13, 2024 16:21
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.

Repiles to redacted messages render an empty box

3 participants