Skip to content

ADFA-2474 Shrink feedback FAB from 56dp to 32dp - #780

Merged
hal-eisen-adfa merged 2 commits into
stagefrom
ADFA-2474-Make-the-floating-feedback-icon-smaller
Jan 6, 2026
Merged

ADFA-2474 Shrink feedback FAB from 56dp to 32dp#780
hal-eisen-adfa merged 2 commits into
stagefrom
ADFA-2474-Make-the-floating-feedback-icon-smaller

Conversation

@hal-eisen-adfa

Copy link
Copy Markdown
Collaborator

Many people find the large FAB distracting and inconvenient. Trying a smaller approach.

@hal-eisen-adfa hal-eisen-adfa changed the title ADFA-2457 Shrink feedback FAB from 56dp to 32dp ADFA-2474 Shrink feedback FAB from 56dp to 32dp Jan 5, 2026
@hal-eisen-adfa

Copy link
Copy Markdown
Collaborator Author

@coderabbitai

@coderabbitai

coderabbitai Bot commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@hal-eisen-adfa: Hello! How can I assist you with this PR? I can help with:

  • Reviewing the changes in detail
  • Answering questions about the FAB size modifications
  • Checking for any issues or inconsistencies
  • Running code searches or analysis
  • Or anything else you need

Just let me know what you'd like me to do!


🧠 Learnings used
Learnt from: Daniel-ADFA
Repo: appdevforall/CodeOnTheGo PR: 678
File: cv-image-to-xml/src/main/res/layout/activity_computer_vision.xml:68-78
Timestamp: 2025-12-30T20:49:31.269Z
Learning: In the CodeOnTheGo project, FloatingActionButton positions in layouts are managed programmatically by the feedbackButtonManager class, so ConstraintLayout runtime constraints are not required in the XML layout files for FABs.

@coderabbitai

coderabbitai Bot commented Jan 5, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Release Notes: Feedback FAB Size Reduction

Changes

  • Reduced feedback floating action button (FAB) size from 56dp to 32dp across 8 layout files by adding app:fabCustomSize="32dp" attribute:
    • app/src/main/res/layout/activity_about.xml
    • app/src/main/res/layout/activity_contributors.xml
    • app/src/main/res/layout/activity_editor.xml
    • app/src/main/res/layout/activity_main.xml
    • app/src/main/res/layout/activity_plugin_manager.xml
    • app/src/main/res/layout/activity_preferences.xml
    • layouteditor/src/main/res/layout/activity_layout_editor.xml
    • termux/termux-app/src/main/res/layout/activity_termux.xml

Risks & Considerations

  • ⚠️ Significant UX change: 57% size reduction (56dp → 32dp) may impact feedback button discoverability and usability for users, particularly on smaller screens or for accessibility users
  • Comprehensive coverage: All 8 feedback FAB instances across the codebase were consistently updated
  • Low implementation risk: Layout-only changes with no code or behavioral modifications
  • No namespace issues: All files already have xmlns:app declarations to support the app:fabCustomSize attribute
  • Scope clarity: Changes are properly scoped to feedback FABs only; other FABs (install plugin, clear, share output) were intentionally left unchanged

Walkthrough

Adds a custom size attribute (app:fabCustomSize="32dp") to FloatingActionButton elements across eight layout files in multiple modules. One file also adds the app namespace declaration. These are purely visual presentation changes without functional or behavioral modifications.

Changes

Cohort / File(s) Summary
App Module Layout Files
app/src/main/res/layout/activity_about.xml, activity_contributors.xml, activity_editor.xml, activity_main.xml, activity_plugin_manager.xml, activity_preferences.xml
Added app:fabCustomSize="32dp" to FloatingActionButton with id fab_feedback, setting custom size for FAB presentation
Layout Editor Module
layouteditor/src/main/res/layout/activity_layout_editor.xml
Added app:fabCustomSize="32dp" to FloatingActionButton for custom sizing
Termux Module
termux/termux-app/src/main/res/layout/activity_termux.xml
Added xmlns:app namespace declaration to root layout and app:fabCustomSize="32dp" to FloatingActionButton

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hop, a skip, the FABs shrink with glee!
Thirty-two pixels, consistent they'll be.
Across every layout, from main to termux bright,
The feedback buttons now fit just right! ✨

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: reducing the feedback FAB size from 56dp to 32dp, which matches the changeset across all layout files.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for shrinking the FAB and addressing user feedback about the large FAB being distracting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

Fix all issues with AI Agents 🤖
In @app/src/main/res/layout/activity_about.xml:
- Around line 123-124: The layouts reference a missing drawable name
baseline_feedback_64 which will break builds; either add a vector drawable
resource named baseline_feedback_64 (create a 24–32dp SVG-based/vector drawable
matching the FAB size and place it in res/drawable as baseline_feedback_64.xml)
or update every layout that uses android:src="@drawable/baseline_feedback_64"
(e.g., activity_about.xml, activity_main.xml, activity_editor.xml,
activity_preferences.xml, activity_contributors.xml,
activity_plugin_manager.xml, termux-app, layout-editor) to use an existing icon
such as @drawable/ic_send and ensure the fabCustomSize (32dp) and any tint
attributes remain appropriate for the chosen drawable.

In @app/src/main/res/layout/activity_contributors.xml:
- Around line 127-128: The FAB is using a 64dp asset scaled down to 32dp which
causes visual degradation; replace the
android:src="@drawable/baseline_feedback_64" with a 32dp or 24dp variant (e.g.,
baseline_feedback_32 or baseline_feedback_24) or swap in the Material vector
drawable at the correct size, keeping app:fabCustomSize="32dp" as-is so the
touch target remains accessible.

In @termux/termux-app/src/main/res/layout/activity_termux.xml:
- Around line 109-110: The FAB uses app:fabCustomSize="32dp" with
android:src="@drawable/baseline_feedback_64", which produces a touch target
below the Material Design 48×48 dp minimum; fix by either (A) increasing
app:fabCustomSize to at least 48dp, (B) keep the 32dp visual size but expand the
touch area to 48dp using a TouchDelegate or wrapping the FAB with a larger
container view that forwards touches, or (C) also replace the icon with
@drawable/baseline_feedback_24 for semantic correctness; ensure after changes
the effective touch area meets 48×48 dp accessibility requirements before
merging.
♻️ Duplicate comments (4)
app/src/main/res/layout/activity_editor.xml (1)

78-78: Verify icon scaling with the reduced FAB size.

Same concern as in other layouts: the 64dp icon resource may not scale optimally in the 32dp FAB container.

layouteditor/src/main/res/layout/activity_layout_editor.xml (1)

179-179: Verify icon scaling with the reduced FAB size.

Same concern as in other layouts: the 64dp icon resource may not scale optimally in the 32dp FAB container.

app/src/main/res/layout/activity_main.xml (1)

86-86: Verify icon scaling with the reduced FAB size.

Same concern as in other layouts: the 64dp icon resource may not scale optimally in the 32dp FAB container.

app/src/main/res/layout/activity_preferences.xml (1)

59-60: Verify icon scaling with the reduced FAB size.

Same concern as in other layouts: the 64dp icon resource may not scale optimally in the 32dp FAB container.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ea4cd4 and 7841a87.

📒 Files selected for processing (8)
  • app/src/main/res/layout/activity_about.xml
  • app/src/main/res/layout/activity_contributors.xml
  • app/src/main/res/layout/activity_editor.xml
  • app/src/main/res/layout/activity_main.xml
  • app/src/main/res/layout/activity_plugin_manager.xml
  • app/src/main/res/layout/activity_preferences.xml
  • layouteditor/src/main/res/layout/activity_layout_editor.xml
  • termux/termux-app/src/main/res/layout/activity_termux.xml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Daniel-ADFA
Repo: appdevforall/CodeOnTheGo PR: 678
File: cv-image-to-xml/src/main/res/layout/activity_computer_vision.xml:68-78
Timestamp: 2025-12-30T20:49:31.269Z
Learning: In the CodeOnTheGo project, FloatingActionButton positions in layouts are managed programmatically by the feedbackButtonManager class, so ConstraintLayout runtime constraints are not required in the XML layout files for FABs.
📚 Learning: 2025-12-30T20:49:31.269Z
Learnt from: Daniel-ADFA
Repo: appdevforall/CodeOnTheGo PR: 678
File: cv-image-to-xml/src/main/res/layout/activity_computer_vision.xml:68-78
Timestamp: 2025-12-30T20:49:31.269Z
Learning: In the CodeOnTheGo project, FloatingActionButton positions in layouts are managed programmatically by the feedbackButtonManager class, so ConstraintLayout runtime constraints are not required in the XML layout files for FABs.

Applied to files:

  • app/src/main/res/layout/activity_contributors.xml
  • app/src/main/res/layout/activity_preferences.xml
  • app/src/main/res/layout/activity_about.xml
  • layouteditor/src/main/res/layout/activity_layout_editor.xml
  • app/src/main/res/layout/activity_plugin_manager.xml
  • app/src/main/res/layout/activity_main.xml
  • termux/termux-app/src/main/res/layout/activity_termux.xml
  • app/src/main/res/layout/activity_editor.xml
🔇 Additional comments (2)
termux/termux-app/src/main/res/layout/activity_termux.xml (1)

2-2: LGTM!

The app namespace declaration is correctly added to support the app:fabCustomSize attribute used in the FloatingActionButton below.

app/src/main/res/layout/activity_plugin_manager.xml (1)

87-88: Add ensureMinTouchTargetSize="true" to meet accessibility guidelines for the 32dp FAB.

The 32dp visual size falls below the recommended 48dp minimum touch target for accessibility. However, Android's FloatingActionButton provides ensureMinTouchTargetSize attribute to automatically expand the touch bounds to 48dp while maintaining the smaller visual size.

The downscaling concern is not applicable here—baseline_feedback_64 and baseline_feedback_24 are vector drawables (resolution-independent), so scaling has no visual quality impact.

Recommended fix: Add app:ensureMinTouchTargetSize="true" to the FAB definition to ensure compliance without requiring icon variants.

Likely an incorrect or invalid review comment.

Comment thread app/src/main/res/layout/activity_about.xml
Comment thread app/src/main/res/layout/activity_contributors.xml
Comment thread termux/termux-app/src/main/res/layout/activity_termux.xml
@hal-eisen-adfa
hal-eisen-adfa merged commit 86a3dd4 into stage Jan 6, 2026
2 checks passed
@hal-eisen-adfa
hal-eisen-adfa deleted the ADFA-2474-Make-the-floating-feedback-icon-smaller branch January 6, 2026 17:02
jatezzz pushed a commit that referenced this pull request Jun 22, 2026
Shrink feedback FAB from 56dp to 32dp
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