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

[AND-147] Fix keyboard not closing when opening attachment picker menu and make this behaviour customizable. #5506

Conversation

VelikovPetar
Copy link
Contributor

🎯 Goal

The PR introduces a way of configuring different keyboard behaviours (at the movement it is only closeKeyboardOnAttachmentPickerOpen, but it can be extended in the future). The default behaviour is to close the keyboard, so the PR also addresses the issue that the keyboard wasn't closed when opening the attachments picker from the MessagesScreen.

🛠 Implementation details

  • Implement new StreamKeyboardConfiguration class which allows customisation of different keyboard behaviours.
  • Provide the StreamKeyboardConfiguration via the ChatTheme
  • Ensure the keyboard is closed in the AttachmentsPickerMenu (if instructed by the StreamKeyboardConfiguration)

🎨 UI Changes

Before After
before.mp4
after.mp4

🧪 Testing

  1. Open compose sample app
  2. Open a chat
  3. Tap on the input field so that the keyboard is opened
  4. Tap on the attachments button (while the keyboard is open)
  5. The keyboard should be closed when the attachment picker is opened

☑️Contributor Checklist

General

  • I have signed the Stream CLA (required)
  • Assigned a person / code owner group (required)
  • Thread with the PR link started in a respective Slack channel (#android-chat-core or #android-chat-ui) (required)
  • PR targets the develop branch
  • PR is linked to the GitHub issue it resolves

Code & documentation

  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (KDocs, docusaurus, tutorial)

☑️Reviewer Checklist

  • UI Components sample runs & works
  • Compose sample runs & works
  • UI Changes correct (before & after images)
  • Bugs validated (bugfixes)
  • New feature tested and works
  • Release notes and docs clearly describe changes
  • All code we touched has new or updated KDocs

🎉 GIF

Please provide a suitable gif that describes your work on this pull request

@VelikovPetar VelikovPetar marked this pull request as ready for review December 4, 2024 12:00
@VelikovPetar VelikovPetar requested a review from a team as a code owner December 4, 2024 12:00
@JcMinarro JcMinarro enabled auto-merge (squash) December 5, 2024 13:15
@JcMinarro JcMinarro force-pushed the bug/fix-keyboard-not-closing-when-opening-attachments-picker branch from 43c4e30 to c26a74f Compare December 5, 2024 13:15
@JcMinarro JcMinarro force-pushed the bug/fix-keyboard-not-closing-when-opening-attachments-picker branch from c26a74f to 604dd43 Compare December 5, 2024 16:48
@JcMinarro JcMinarro merged commit 8e0ed84 into develop Dec 5, 2024
9 checks passed
@JcMinarro JcMinarro deleted the bug/fix-keyboard-not-closing-when-opening-attachments-picker branch December 5, 2024 16:52
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