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

Feature : Draft support #3099

Merged
merged 14 commits into from
Jun 26, 2024
Merged

Feature : Draft support #3099

merged 14 commits into from
Jun 26, 2024

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Jun 26, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Implement draft support in the following way :

  • When message screen is backgrounded, then the current draft is saved. It also keeps the composer mode (either Regular, Reply or Edit).
  • When message screen is first composed we load the draft and delete it from the store.

This PR also introduce some refactoring around ReplyTo, so we can use the same UI logic between Timeline item and Composer.

Motivation and context

Closes #2869

Screenshots / GIFs

Tests

  • Open a room
  • Write a message without sending it
  • Close the room
  • Open back the room
  • You should see your message in the composer
  • You can repeat the steps with text formatting enabled, and reply/edit modes.
  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@ganfra ganfra changed the title Feature/fga/draft support Feature : Draft support Jun 26, 2024
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Jun 26, 2024
@ganfra ganfra marked this pull request as ready for review June 26, 2024 13:23
@ganfra ganfra requested a review from a team as a code owner June 26, 2024 13:23
@ganfra ganfra requested review from jmartinesp and removed request for a team June 26, 2024 13:23
@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 Jun 26, 2024
Copy link
Contributor

github-actions bot commented Jun 26, 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/eZwc9M

Copy link

sonarcloud bot commented Jun 26, 2024

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 85.88589% with 47 lines in your changes missing coverage. Please review.

Project coverage is 75.96%. Comparing base (81a5394) to head (76d0f4b).

Files Patch % Lines
...messages/impl/draft/DefaultComposerDraftService.kt 0.00% 16 Missing ⚠️
...ibraries/matrix/ui/messages/reply/InReplyToView.kt 86.02% 4 Missing and 9 partials ⚠️
...s/impl/messagecomposer/MessageComposerPresenter.kt 85.07% 3 Missing and 7 partials ⚠️
...id/libraries/textcomposer/model/TextEditorState.kt 33.33% 1 Missing and 3 partials ⚠️
...droid/libraries/matrix/test/room/FakeMatrixRoom.kt 50.00% 3 Missing ⚠️
...s/impl/timeline/components/TimelineItemEventRow.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3099      +/-   ##
===========================================
- Coverage    75.97%   75.96%   -0.01%     
===========================================
  Files         1634     1636       +2     
  Lines        38611    38629      +18     
  Branches      7463     7467       +4     
===========================================
+ Hits         29335    29345      +10     
- Misses        5384     5395      +11     
+ Partials      3892     3889       -3     

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

LGTM!

Copy link
Member

Choose a reason for hiding this comment

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

That's a long composer! I guess the state is expanded?

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'm not sure why :/

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like #2167

@ganfra ganfra enabled auto-merge June 26, 2024 14:37
@ganfra ganfra added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 26, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 26, 2024
@ganfra ganfra merged commit e0cf4cf into develop Jun 26, 2024
26 of 27 checks passed
@ganfra ganfra deleted the feature/fga/draft_support branch June 26, 2024 14:53
@ganfra ganfra added the PR-Feature For a new feature label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Feature For a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Store and restore drafts for each room
3 participants