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

feat: enter to sent message part-1 [WPB-15369] #3839

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

MohamadJaara
Copy link
Member

@MohamadJaara MohamadJaara commented Jan 27, 2025

TaskWPB-15369 [Android] - Hit enter to send message


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  1. add option for virtual keyboards to use enter to send
  2. on hardware keyboard enter will always sent
  3. on hardware keyboard shift + enter will add a new line break

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

# Conflicts:
#	app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/MessageComposerInput.kt
@echoes-hq echoes-hq bot added the echoes: product-roadmap/feature Work contributing to adding a new feature as part of the product roadmap. label Jan 27, 2025
@MohamadJaara MohamadJaara changed the title feat: enter to sent message [WPB-15369] feat: enter to sent message part-1 [WPB-15369] Jan 27, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.21%. Comparing base (ae9d56e) to head (082fa51).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...tlin/com/wire/android/datastore/GlobalDataStore.kt 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3839      +/-   ##
===========================================
+ Coverage    45.19%   45.21%   +0.02%     
===========================================
  Files          491      491              
  Lines        16989    16999      +10     
  Branches      2845     2845              
===========================================
+ Hits          7678     7686       +8     
- Misses        8527     8529       +2     
  Partials       784      784              
Files with missing lines Coverage Δ
.../ui/home/conversations/MessageComposerViewState.kt 85.29% <100.00%> (+0.44%) ⬆️
...conversations/composer/MessageComposerViewModel.kt 71.42% <100.00%> (+2.19%) ⬆️
.../ui/home/messagecomposer/EnabledMessageComposer.kt 0.00% <ø> (ø)
...tlin/com/wire/android/datastore/GlobalDataStore.kt 14.92% <33.33%> (+0.86%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae9d56e...082fa51. Read the comment docs.

Copy link
Contributor

Built wire-android-staging-compat-pr-3839.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3839.apk is available for download

Copy link
Contributor

@borichellow borichellow left a comment

Choose a reason for hiding this comment

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

basically looks cool, just small suggestion :)

@@ -232,4 +233,9 @@ class GlobalDataStore @Inject constructor(@ApplicationContext private val contex
fun selectedThemeOptionFlow(): Flow<ThemeOption> =
getStringPreference(APP_THEME_OPTION, ThemeOption.SYSTEM.toString())
.map { ThemeOption.valueOf(it) }

fun enterToSendFlow(): Flow<Boolean> = getBooleanPreference(ENTER_TO_SENT, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

as far as it's used only as enterToSendFlow().first() maybe make sens to change it to suspend fun isEnterToSend(): Boolean

Copy link

sonarqubecloud bot commented Feb 4, 2025

@MohamadJaara MohamadJaara added this pull request to the merge queue Feb 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Built wire-android-staging-compat-pr-3839.apk is available for download

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Built wire-android-dev-debug-pr-3839.apk is available for download

@MohamadJaara MohamadJaara added this pull request to the merge queue Feb 4, 2025
Merged via the queue into develop with commit 24b14ba Feb 4, 2025
11 of 13 checks passed
@MohamadJaara MohamadJaara deleted the feat/enter-to-sent-message branch February 4, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: product-roadmap/feature Work contributing to adding a new feature as part of the product roadmap. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants