Skip to content

Add rich content listener to markdown text input #2918

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 4 commits into from
May 27, 2024

Conversation

surakin
Copy link
Contributor

@surakin surakin commented May 25, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fixes #2917
Added rich content listener to the markdown text input

Motivation and context

Screenshots / GIFs

Tests

  • Go to a room
  • Select a GIF using your android keyboard
  • See how it gets sent

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

surakin added 2 commits May 25, 2024 14:39
Signed-off-by: Marco Antonio Alvarez <[email protected]>
@surakin surakin requested a review from a team as a code owner May 25, 2024 12:47
@surakin surakin requested review from jmartinesp and removed request for a team May 25, 2024 12:47
Copy link
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • Your branch should be based on origin/develop, at least when it was created.
  • There is a changelog entry in the changelog.d folder with the Towncrier format.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

surakin added 2 commits May 25, 2024 14:49
Signed-off-by: Marco Antonio Alvarez <[email protected]>
Signed-off-by: Marco Antonio Alvarez <[email protected]>
Copy link

codecov bot commented May 25, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 75.23%. Comparing base (544d064) to head (2243832).

Files Patch % Lines
...tcomposer/components/markdown/MarkdownTextInput.kt 43.75% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2918      +/-   ##
===========================================
- Coverage    75.25%   75.23%   -0.02%     
===========================================
  Files         1550     1550              
  Lines        36966    36983      +17     
  Branches      7156     7160       +4     
===========================================
+ Hits         27817    27825       +8     
- Misses        5412     5421       +9     
  Partials      3737     3737              

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

@surakin
Copy link
Contributor Author

surakin commented May 26, 2024

I'm not really convinced copying UriContentListener is the best approach 🤔

@bmarty bmarty added the Z-Community-PR Issue is solved by a community member's PR label May 27, 2024
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, it works like a charm!

) {
val canUpdateState = !subcomposing

// Copied from io.element.android.wysiwyg.internal.utils.UriContentListener
class ReceiveUriContentListener(
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should provide this to the RTE and not the other way around. I'll keep it in mind.

@jmartinesp jmartinesp merged commit a9835e0 into element-hq:develop May 27, 2024
20 of 22 checks passed
@surakin surakin deleted the fix-markdown-rich-content branch May 27, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't send GIFs from android keyboard without text formatting enabled
3 participants