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

WIP Pinned events : add feature flag and pin/unpin actions #3255

Merged
merged 15 commits into from
Jul 31, 2024

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Jul 30, 2024

Content

  • Add a feature flag to enable Pin/unpin actions
  • Add the Pin/unpin actions in the timeline
  • Take time to rework a bit TimelineActionPresenter and related classes.

Motivation and context

Closes #3212

Screenshots / GIFs

Tests

  • Enable Pinned events in lab
  • Open a room where you have permission to pin
  • Long click on message timeline event
  • Click on Pin
  • Long click on the same message timeline event
  • Click on Unpin

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jul 30, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jul 30, 2024
@ganfra ganfra added the PR-Wip For anything that isn't ready to ship and will be enabled at a later date label Jul 30, 2024
@ganfra ganfra changed the title Feature/fga/pinned event feature flag WIP Pinned events : add feature flag and pin/unpin actions Jul 30, 2024
@ganfra ganfra marked this pull request as ready for review July 30, 2024 15:01
@ganfra ganfra requested a review from a team as a code owner July 30, 2024 15:01
@ganfra ganfra requested review from jmartinesp and removed request for a team July 30, 2024 15:01
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/fvQ5hM

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 86.89655% with 19 lines in your changes missing coverage. Please review.

Project coverage is 76.15%. Comparing base (1cbd03a) to head (6743e3b).

Files Patch % Lines
...ndroid/features/messages/impl/MessagesPresenter.kt 50.00% 1 Missing and 11 partials ⚠️
...es/messages/impl/actionlist/ActionListPresenter.kt 94.23% 1 Missing and 2 partials ⚠️
...ndroid/libraries/matrix/ui/room/MatrixRoomState.kt 0.00% 3 Missing ⚠️
...l/timeline/model/event/TimelineItemEventContent.kt 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3255      +/-   ##
===========================================
+ Coverage    76.11%   76.15%   +0.04%     
===========================================
  Files         1647     1648       +1     
  Lines        38801    38825      +24     
  Branches      7533     7532       -1     
===========================================
+ Hits         29535    29569      +34     
+ Misses        5355     5353       -2     
+ Partials      3911     3903       -8     

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

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.

Thanks, the changes LGTM!

@@ -40,6 +40,7 @@ sealed class TimelineItemAction(
data object ReportContent : TimelineItemAction(CommonStrings.action_report_content, CompoundDrawables.ic_compound_chat_problem, destructive = true)
data object EndPoll : TimelineItemAction(CommonStrings.action_end_poll, CompoundDrawables.ic_compound_polls_end)
data object Pin : TimelineItemAction(CommonStrings.action_pin, CompoundDrawables.ic_compound_pin)
//TODO use the Unpin compound icon when available.

// TODO use the Unpin compound icon when available.
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure about removing this TODO? The unpin icon is already in https://github.com/element-hq/compound-design-tokens, we just need to import the new icons in https://github.com/element-hq/compound-android and release a new version.

Copy link
Member

Choose a reason for hiding this comment

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

@ganfra ganfra added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 31, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 31, 2024
@ganfra ganfra enabled auto-merge July 31, 2024 07:52
@ganfra ganfra merged commit d02e107 into develop Jul 31, 2024
29 checks passed
@ganfra ganfra deleted the feature/fga/pinned_event_feature_flag branch July 31, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Wip For anything that isn't ready to ship and will be enabled at a later date
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Pin/Unpin a message
2 participants