Skip to content

Implement conjugate verbs search bar #566#611

Merged
angrezichatterbox merged 3 commits into
scribe-org:mainfrom
prince-0408:issue-566
Jun 7, 2026
Merged

Implement conjugate verbs search bar #566#611
angrezichatterbox merged 3 commits into
scribe-org:mainfrom
prince-0408:issue-566

Conversation

@prince-0408

@prince-0408 prince-0408 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Contributor checklist


Description

This PR implements the Conjugate Verbs Search Bar feature for Scribe Conjugate, matching the layout and styling seen in the Figma design designs.

Key Changes:

  1. ViewModel implementation:
    • Created ConjugateViewModel to handle search logic and querying across downloaded SQLite databases (*ConjugateData.sqlite) on a background thread (Dispatchers.IO).
    • Persists the "Recently conjugated" list history in SharedPreferences (up to 15 items, newest first).
  2. UI Updates:
    • Updated ConjugateScreen to feature the header and orange rectangular search bar with curved corners (RoundedCornerShape(dimensionResource(id = R.dimen.rounded_corner_radius_standard)), which is 14.dp to match standard cards).
    • Added a vertical suggestion dropdown showing results matching the search query with their endonym language names in parentheses, e.g. verb (Deutsch).
    • Added the "Recently conjugated" list section below, displaying search history inside a card layout along with a "Clear all ✕" badge on the right.
  3. Typography and Layout Tweaks:
    • Set the input and placeholder text in the search bar to FontWeight.Bold and black.
    • Vertically centered the input text inside BasicTextField using Alignment.CenterStart box alignment.
    • Scaled the play button icon to 21.dp x 18.dp to maintain its aspect ratio.

Visual Comparison:

Figma Design Target Current Implementation
Figma Target Current Implementation

Testing Details:

  • Created unit tests in ConjugateViewModelTest verifying:
    • Initial state values.
    • Search query triggers and results clearing.
    • History selection, updates, and persistence in SharedPreferences.
    • Clearing history.
  • Manually tested input fields, suggestion clicks, and history loading state.

Related issue

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

Thank you for the pull request! 💙🩵

The Scribe-Android team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and Android rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the General room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

    • Tests may need to be reran as they're at times not deterministic
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@angrezichatterbox angrezichatterbox self-requested a review June 7, 2026 17:14

@angrezichatterbox angrezichatterbox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work @prince-0408. Everything functions as the requirements. Looking forward to see you contribute to more issues. I will merge this in @andrewtavis

@angrezichatterbox angrezichatterbox merged commit 715dee4 into scribe-org:main Jun 7, 2026
6 checks passed
@andrewtavis

Copy link
Copy Markdown
Member

Thanks for the great work, @prince-0408!

@andrewtavis

Copy link
Copy Markdown
Member

Also thanks for the review and merging in, @angrezichatterbox :)

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.

Create conjugate verbs search bar for Conjugate app

3 participants