Skip to content

"View only" polls in the timeline #1031

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

Merged
merged 19 commits into from
Aug 16, 2023

Conversation

Florian14
Copy link
Contributor

@Florian14 Florian14 commented Aug 7, 2023

This PR renders the polls created with other clients.

Notes

  • The design isn't final yet
  • The poll component isn't interactive (votes cannot be submitted)
  • Actions on the poll events need to be implemented/refined
  • ⚠️ More work is required in the matrix-rust-sdk to be able to see the polls in the timeline. The screenshots are real, but they have been taken while using a custom development branch for the matrix-rust-sdk
  • The timestamp in the bubble overlaps the total votes label, this issue should be addressed in a dedicated PR as this is not specific to polls

Screenshots

Disclosed Undisclosed
image image

@Florian14 Florian14 changed the title [Polls] Render poll start events in the timeline "View only" polls in the timeline Aug 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 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/8mfKDc

@Florian14 Florian14 force-pushed the feature/fre/poll_event_timeline_rendering branch 4 times, most recently from 0cfc81e to 35f163b Compare August 10, 2023 10:19
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch coverage: 53.38% and project coverage change: -0.04% ⚠️

Comparison is base (a911134) 56.91% compared to head (d4b6342) 56.87%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1031      +/-   ##
===========================================
- Coverage    56.91%   56.87%   -0.04%     
===========================================
  Files          997     1012      +15     
  Lines        25343    25624     +281     
  Branches      5077     5137      +60     
===========================================
+ Hits         14424    14574     +150     
- Misses        8696     8796     +100     
- Partials      2223     2254      +31     
Files Changed Coverage Δ
...ndroid/features/messages/impl/MessagesPresenter.kt 82.69% <0.00%> (-0.54%) ⬇️
...eatures/messages/impl/actionlist/ActionListView.kt 58.77% <0.00%> (-0.26%) ⬇️
...meline/components/event/TimelineItemContentView.kt 72.91% <0.00%> (-6.63%) ⬇️
...tils/messagesummary/MessageSummaryFormatterImpl.kt 46.66% <0.00%> (-3.34%) ⬇️
...ndroid/features/poll/impl/DefaultPollEntryPoint.kt 0.00% <0.00%> (ø)
...tformatter/impl/DefaultRoomLastMessageFormatter.kt 95.16% <0.00%> (-1.57%) ⬇️
...entformatter/impl/DefaultTimelineEventFormatter.kt 0.00% <0.00%> (ø)
...ies/matrix/api/timeline/item/event/EventContent.kt 84.73% <0.00%> (-6.26%) ⬇️
...t/android/libraries/matrix/impl/poll/PollAnswer.kt 0.00% <0.00%> (ø)
...ent/android/libraries/matrix/impl/poll/PollKind.kt 0.00% <0.00%> (ø)
... and 16 more

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

@Florian14 Florian14 force-pushed the feature/fre/poll_event_timeline_rendering branch from 8c22d12 to c011768 Compare August 14, 2023 11:37
@Florian14 Florian14 force-pushed the feature/fre/poll_event_timeline_rendering branch from 581e43a to eabdb95 Compare August 15, 2023 05:49
@sonarqubecloud
Copy link

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 5 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Florian14 Florian14 marked this pull request as ready for review August 16, 2023 08:37
@Florian14 Florian14 requested a review from a team as a code owner August 16, 2023 08:37
@Florian14 Florian14 requested review from jmartinesp and removed request for a team August 16, 2023 08:37
Copy link
Member

@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.

LGTM, but when you say:

The timestamp in the bubble overlaps the total votes label, this issue should be addressed in a dedicated PR as this is not specific to polls

Couldn't we just add an extra bottom padding to make sure they won't ever overlap?

@Florian14
Copy link
Contributor Author

LGTM, but when you say:

The timestamp in the bubble overlaps the total votes label, this issue should be addressed in a dedicated PR as this is not specific to polls

Couldn't we just add an extra bottom padding to make sure they won't ever overlap?

Just found "how" to handle this case in the designs, this is a little trickier as we should only apply padding if the timestamp overlaps content

@jmartinesp
Copy link
Member

Just found "how" to handle this case in the designs, this is a little trickier as we should only apply padding if the timestamp overlaps content

I think that's ok for text messages, but for complex ones as polls, location, etc. I'd expect it to be placed below the event contents. In any case we don't have the final designs, so it's not a blocker.

@Florian14 Florian14 added this pull request to the merge queue Aug 16, 2023
Merged via the queue into develop with commit 8a62abe Aug 16, 2023
@Florian14 Florian14 deleted the feature/fre/poll_event_timeline_rendering branch August 16, 2023 14:20
@Florian14 Florian14 restored the feature/fre/poll_event_timeline_rendering branch August 16, 2023 14:36
@Florian14 Florian14 deleted the feature/fre/poll_event_timeline_rendering branch August 16, 2023 14:37
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.

2 participants