Skip to content

feat(ADFA-2274): Show share button when bottom sheet is half-expanded#1513

Merged
dara-abijo-adfa merged 8 commits into
stagefrom
ADFA-2274-share-fab-half-expanded
Jul 16, 2026
Merged

feat(ADFA-2274): Show share button when bottom sheet is half-expanded#1513
dara-abijo-adfa merged 8 commits into
stagefrom
ADFA-2274-share-fab-half-expanded

Conversation

@dara-abijo-adfa

Copy link
Copy Markdown
Contributor

Jira ticket link

Show the share FAB when the bottom sheet is half-expanded, allowing users to access log sharing whenever the editor bottom sheet is not fully collapsed.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a146a350-a301-487a-80d2-3b7934ef25c1

📥 Commits

Reviewing files that changed from the base of the PR and between feff9ef and aedb0d8.

📒 Files selected for processing (1)
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt

📝 Walkthrough
  • Show Share FAB (and related share actions) when the editor bottom sheet is half-expanded/expanded, using viewModel.sheetState to drive visibility.
  • Keep Copy Diagnostics FAB visibility in sync with bottom sheet expansion state and the selected Diagnostics tab/fragment.
  • Update bottom-anchored FAB positioning during bottom sheet onSlide by applying a computed vertical translationY, and refresh FAB visibility after layout changes via an OnLayoutChangeListener (removed in onDetachedFromWindow).
  • Refactor: simplify OnTabSelectedListener to only update viewModel.currentTab; FAB show/hide and translation behavior is centralized in new updateFabVisibility / updateFabTranslation helpers.
  • Risk: updateFabVisibility intentionally skips updates while the sheet is STATE_DRAGGING or STATE_SETTLING, so FAB visibility may lag briefly until the transition completes.

Walkthrough

EditorBottomSheet derives FAB visibility from sheet state and selected content, refreshes it after layout and state changes, and updates FAB translation while the sheet slides.

Changes

Editor bottom sheet FAB behavior

Layer / File(s) Summary
FAB state and positioning
app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
FAB visibility is updated for expanded or half-expanded states and the selected tab or fragment. Layout listeners and sheet-state collection trigger refreshes, while sliding recalculates translation. Tab selection now only updates view-model state, and the listener is removed on detachment.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: jatezzz, daniel-adfa, jomen-adfa

Sequence Diagram(s)

sequenceDiagram
  participant SheetState
  participant EditorBottomSheet
  participant FABs
  SheetState->>EditorBottomSheet: sheet state changes
  EditorBottomSheet->>FABs: update visibility
  EditorBottomSheet->>FABs: apply translation during slide or layout
Loading

Poem

I’m a bunny watching buttons rise,
As the sheet shifts beneath the skies.
Tabs now whisper, states decide,
FABs float gently with the tide.
Hop, hop—layout keeps them right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main user-visible change: showing the share button when the bottom sheet is half-expanded.
Description check ✅ Passed The description matches the change and objective by explaining that the share FAB appears when the sheet is half-expanded.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ADFA-2274-share-fab-half-expanded

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.

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt`:
- Around line 598-615: Update updateFabVisibility so showCopy identifies the
diagnostics content from currentFragment rather than comparing state.currentTab
with the mutable TAB_DIAGNOSTICS position. Preserve the existing expanded-state
requirement and copyDiagnosticsFab visibility behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 71e768af-4dfe-473c-ab34-fb526e0336d8

📥 Commits

Reviewing files that changed from the base of the PR and between 0873e12 and 8a99e4c.

📒 Files selected for processing (1)
  • app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt

Comment thread app/src/main/java/com/itsaky/androidide/ui/EditorBottomSheet.kt
@dara-abijo-adfa
dara-abijo-adfa merged commit 6f4f3b4 into stage Jul 16, 2026
4 checks passed
@dara-abijo-adfa
dara-abijo-adfa deleted the ADFA-2274-share-fab-half-expanded branch July 16, 2026 11:36
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