Skip to content

Refactor face matching UI with reusable FaceOverlay component#162

Merged
harrydbarnes merged 5 commits into
mainfrom
face-matching-ui-improvements-9853052837801912802
Feb 15, 2026
Merged

Refactor face matching UI with reusable FaceOverlay component#162
harrydbarnes merged 5 commits into
mainfrom
face-matching-ui-improvements-9853052837801912802

Conversation

@harrydbarnes

Copy link
Copy Markdown
Owner
  • Extract face bounding box drawing logic into FaceOverlay.kt.
  • Update FaceAuditScreen.kt to use FaceOverlay.
  • Update FaceSelectionDialog in ProjectDetailScreen.kt to use FaceOverlay and improve button layout and usability.
  • Use direct manipulation (tap on face) instead of list buttons.
  • Use theme colors for better visual integration.

- Extract face bounding box drawing logic into `FaceOverlay.kt`.
- Update `FaceAuditScreen.kt` to use `FaceOverlay`.
- Update `FaceSelectionDialog` in `ProjectDetailScreen.kt` to use `FaceOverlay` and improve button layout and usability.
- Use direct manipulation (tap on face) instead of list buttons.
- Use theme colors for better visual integration.

Co-authored-by: harrydbarnes <145344818+harrydbarnes@users.noreply.github.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @harrydbarnes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the face matching user interface by introducing a new, reusable FaceOverlay composable. This component centralizes the logic for displaying images, drawing bounding boxes around detected faces, and handling user interactions like tapping on faces. The integration of this component into both the FaceAuditScreen and FaceSelectionDialog streamlines their codebases, improves maintainability, and enhances the user experience by enabling direct face selection and a more consistent visual style.

Highlights

  • Reusable FaceOverlay Component: Extracted face drawing and interaction logic into a new, reusable FaceOverlay composable component.
  • FaceAuditScreen Integration: Updated FaceAuditScreen.kt to utilize the new FaceOverlay component, simplifying its implementation and removing redundant drawing logic.
  • FaceSelectionDialog Refactor: Refactored FaceSelectionDialog in ProjectDetailScreen.kt to integrate FaceOverlay, enabling direct face tapping for selection instead of button-based interaction.
  • Improved UI/UX: Enhanced usability in FaceSelectionDialog by improving button layout, messaging, and visual consistency with theme colors.
  • Themed Colors: Standardized the use of Material Theme colors for face highlights and outlines across components for better visual integration.
Changelog
  • app/src/main/java/com/facelapse/app/ui/project/FaceAuditScreen.kt
    • Removed redundant imports and local state variables related to image drawing and sizing.
    • Replaced inline face drawing and tap detection logic with the FaceOverlay component.
    • Simplified conditional rendering for "no faces detected" and "tap to select" messages.
  • app/src/main/java/com/facelapse/app/ui/project/FaceOverlay.kt
    • Added a new composable file containing the FaceOverlay component.
    • Implemented image display, face bounding box drawing, and tap gesture detection within this component.
    • Configured highlight and outline colors using Material Theme and semi-transparent white.
  • app/src/main/java/com/facelapse/app/ui/project/ProjectDetailScreen.kt
    • Removed local state variable for container size.
    • Integrated the FaceOverlay component to handle image and face display, replacing previous custom drawing logic.
    • Eliminated button-based face selection in favor of direct tap interaction on the FaceOverlay.
    • Redesigned the action buttons within the FaceSelectionDialog for improved layout, clarity, and theme consistency.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

The pull request successfully refactors the face matching UI by extracting the face bounding box drawing and interaction logic into a reusable FaceOverlay component. This significantly improves code organization and maintainability in FaceAuditScreen.kt and ProjectDetailScreen.kt. The UI enhancements in ProjectDetailScreen.kt, such as direct tap selection and improved button layouts, enhance usability and visual consistency. However, there is a critical issue in the FaceOverlay component's tap detection logic that needs to be addressed to ensure correct functionality across different layout sizes.

Comment thread app/src/main/java/com/facelapse/app/ui/project/FaceOverlay.kt Outdated
Comment thread app/src/main/java/com/facelapse/app/ui/project/FaceOverlay.kt Outdated
Comment thread app/src/main/java/com/facelapse/app/ui/project/FaceOverlay.kt Outdated
Comment thread app/src/main/java/com/facelapse/app/ui/project/FaceOverlay.kt Outdated
harrydbarnes and others added 4 commits February 15, 2026 23:56
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@harrydbarnes harrydbarnes merged commit 5c9fbf3 into main Feb 15, 2026
1 check failed
@harrydbarnes harrydbarnes deleted the face-matching-ui-improvements-9853052837801912802 branch February 15, 2026 23:57
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