Skip to content

Conversation

@doromaraujo
Copy link
Collaborator

@doromaraujo doromaraujo commented Feb 5, 2026

When inputting long texts in the app's inputs, the highlights for them were cutting off.

This PR addresses this by using a new drawable that combines the view's background with its focus highlight by using a selector.

It also addresses a bug where the MainActivity's connect button was being resized while the keyboard was opened in one of its fragments, and said fragment gets dismissed via the back arrow.

Summary by CodeRabbit

  • New Features
    • Improved keyboard interaction: activity now pans content when the keyboard appears for better visibility.
    • Enhanced text input styling: input fields now display visual focus feedback with distinct border colors and styles when focused versus inactive.
    • Refined focus behavior across input fields for improved user interaction and accessibility.

edit_text_white_focusable.xml combines the
background with the focus highlight using a
selector.
When opening the advanced screen, if the input
has focus automatically, toggling light and dark
themes will make the screen scroll up to the
input. This will still happen if the input
ever gets focus, though.
So that when the keyboard is opened in a fragment
and the fragment is dismissed while the keyboard
is still open it won't resize the MainActivity's
views.
@doromaraujo doromaraujo requested review from Copilot and pappz and removed request for Copilot February 5, 2026 00:32
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

The pull request introduces new EditText drawable resources with distinct focus states for both light and dark themes, applies them across multiple layout files, and configures the soft keyboard to pan the window. These changes standardize visual focus feedback for input fields throughout the application.

Changes

Cohort / File(s) Summary
Manifest Configuration
app/src/main/AndroidManifest.xml
Added android:windowSoftInputMode="adjustPan" attribute to MainActivity to adjust window panning behavior when soft input keyboard is displayed.
New Drawable Resources
app/src/main/res/drawable-night/edit_text_white_focusable.xml, app/src/main/res/drawable/edit_text_white_focusable.xml
Introduced stateful drawable selectors for EditText backgrounds with focused (3dp stroke/border) and default (1dp border) states. Dark theme variant uses white stroke for focus and gray border for default; light theme uses dark and light gray borders respectively.
Layout Updates
app/src/main/res/layout/dialog_simple_edit_text.xml, app/src/main/res/layout/fragment_advanced.xml, app/src/main/res/layout/fragment_server.xml
Updated EditText elements to reference new edit_text_white_focusable drawable resource. Removed legacy focus_highlight foreground attributes. Added or ensured focusability attributes on affected elements.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 EditTexts now shine with focus bright,
Dark and light themes both feel right,
With strokes and borders, states align,
The keyboard pans—a sweet design!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main problem being fixed: highlights cutting off on inputs with long text, which is the primary motivation for introducing the new drawable resources and layout modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bug/highlights-cutting-off-on-inputs-with-long-text

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant