Skip to content

ADFA-4319. Papercut: reapply performance graph at scrolling just on no-fullscreen mode#1388

Merged
jatezzz merged 5 commits into
stagefrom
fix/performance-graph
Jun 22, 2026
Merged

ADFA-4319. Papercut: reapply performance graph at scrolling just on no-fullscreen mode#1388
jatezzz merged 5 commits into
stagefrom
fix/performance-graph

Conversation

@jatezzz

@jatezzz jatezzz commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Fixing the listenning of the scroll down to show performance graph

Working but with a pick color tint.

telegram-cloud-document-1-5008382357665744716.mp4

New more greys colors.

2026-06-15.13.51.54.mp4

@coderabbitai

coderabbitai Bot commented Jun 15, 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: f1040028-08bc-47dd-a472-b46dba6e9bb1

📥 Commits

Reviewing files that changed from the base of the PR and between 5fcd7d2 and 7d8cfa7.

📒 Files selected for processing (1)
  • app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.kt

📝 Walkthrough

Release Notes

Features & Improvements

  • Performance graph scroll gesture handling: Fixed scroll-down gesture detection for the performance graph display by restricting reapplication to non-fullscreen mode
  • Bottom sheet interaction fix: Disabled SwipeRevealLayout vertical drag when the bottom sheet is open, preventing gesture conflicts between the performance graph and bottom sheet drag-to-close functionality
  • Enhanced drag state management: Introduced centralized updateSwipeRevealDragState() logic and new setupBottomSheetObserver() to coordinate drag enable/disable across fullscreen and bottom sheet states
  • Improved callback lifecycle management: FlashbarContainerView now properly tracks the Activity instance used for configuration callback registration, ensuring correct unregistration and cleanup
  • Material Design 3 color palette: Extensive color theme updates across all theme variants (light, dark, and BlueWave), including new grayscale/neutral color options

New Public API

  • SwipeRevealLayout.setVerticalDragEnabled(enabled: Boolean): Control vertical drag behavior and automatically close the layout when dragging is disabled

⚠️ Risks & Best Practices Concerns

  • Significant color palette overhaul: Extensive changes to color resources across multiple theme files (colors.xml, styles.xml, theme_blue_wave.xml). This represents a major visual change that could impact existing theme customizations and may require testing across all app themes
  • Callback management refactor: Changes to FlashbarContainerView's callback lifecycle using stored Activity references may introduce memory leak risks if the Activity is not properly garbage collected; verify that registeredActivity is cleared when the container is destroyed
  • Complex drag state coordination: Multiple interdependent drag state updates (fullscreen + bottom sheet) in BaseEditorActivity could create edge cases; ensure comprehensive UI testing of gesture interactions during transitions between fullscreen and bottom sheet states
  • Breaking theme changes: Color resource additions and modifications across Material Design 3 theme colors may break existing custom themes or color overrides; consider providing a migration guide for custom theme implementations

Walkthrough

SwipeRevealLayout gains an isVerticalDragEnabled flag that gates vertical drag capture, range reporting, layout, and touch handling. BaseEditorActivity observes both fullscreen and bottom-sheet state, disabling vertical dragging on swipeReveal when either is active, and conditionally handles fling gestures based on bottom-sheet state. Separately, FlashbarContainerView stores the registered Activity instance and uses it during config-callback unregistration instead of casting context. Material Design 3 theme colors are introduced and applied across light/dark theme styles, with additional app and BlueWave theme color palette updates.

Changes

SwipeRevealLayout vertical drag toggle and fullscreen/bottom-sheet synchronization

Layer / File(s) Summary
SwipeRevealLayout vertical drag flag and touch handling
app/src/main/java/com/itsaky/androidide/ui/SwipeRevealLayout.kt
Adds isVerticalDragEnabled flag; gates tryCaptureView and getViewVerticalDragRange on it; lays out overlapping content to container bottom b; extends onInterceptTouchEvent, onTouchEvent, and computeScroll to handle the vertical dragHelper; adds setVerticalDragEnabled public setter that closes the layout when called with false while open.
BaseEditorActivity fullscreen and bottom-sheet state synchronization
app/src/main/java/com/itsaky/androidide/activities/editor/BaseEditorActivity.kt
onCreate calls setupBottomSheetObserver(); setupFullscreenObserver triggers updateSwipeRevealDragState() after rendering; new setupBottomSheetObserver() and updateSwipeRevealDragState() methods check both fullscreen and bottom-sheet state to enable vertical dragging only when both are inactive; fling gesture handler returns early when bottom sheet is open to skip fullscreen-dismiss logic.

FlashbarContainerView registered-Activity fix

Layer / File(s) Summary
FlashbarContainerView registeredActivity tracking
subprojects/flashbar/src/main/java/com/itsaky/androidide/flashbar/FlashbarContainerView.kt
Adds a nullable registeredActivity field; stores the activity argument on registration; uses registeredActivity instead of a context cast to unregister configCallbacks, then clears both fields.

Material Design 3 and app theme color palette updates

Layer / File(s) Summary
Material Design 3 theme color definitions
resources/src/main/res/values/colors.xml
Adds comprehensive md_theme_light_* and md_theme_dark_* Material Design 3 color resource definitions for primary, secondary, tertiary, error, background, surface, inverse, and outline colors with their corresponding "on" and container variants.
Material Design 3 theme style application
resources/src/main/res/values/styles.xml, resources/src/main/res/values-night/styles.xml
Updates Theme.AndroidIDE.Material3 in light and dark theme style definitions to reference the new Material Design 3 color resources with explicit color item overrides for all theme color attributes.
App and layouteditor color palette updates
app/src/main/res/values/colors.xml, layouteditor/src/main/res/values/colors.xml
Updates purple and lavender color values in app colors; replaces layouteditor theme colors with new grayscale/neutral Material palette including light/dark variants for primary, secondary, tertiary, and related on/container colors.
BlueWave theme color palette update
resources/src/main/res/values/theme_blue_wave.xml
Updates light and dark variant color values for primary, secondary, tertiary colors and their on/container variants used by the BlueWave theme.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • appdevforall/CodeOnTheGo#1149: Both PRs modify fullscreen state synchronization and bottom-sheet state handling in BaseEditorActivity—this PR adds fullscreen/bottom-sheet-aware swipeReveal vertical-drag toggling and conditional fling gesture handling, while the related PR also modifies similar fullscreen and gesture logic paths.

Suggested reviewers

  • Daniel-ADFA
  • dara-abijo-adfa

Poem

🐰 Hop hop, the screen goes wide,
No vertical swipe when fullscreen's applied!
The flashbar remembers which Activity came,
Unregistering correctly, no casting to blame.
Material Design 3 colors bright and new,
The rabbit paints the UI in every hue! 🎨✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.55% 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 addresses ADFA-4319 and mentions 'performance graph at scrolling' in 'no-fullscreen mode', which aligns with the PR's main objective of restricting performance graph reapplication to non-fullscreen scenarios and managing scroll/drag interactions with the bottom sheet.
Description check ✅ Passed The description mentions fixing 'listenning of the scroll down to show performance graph' and references color adjustments ('new more greys colors'), which relates to the actual changes involving SwipeRevealLayout drag state management and color resource updates throughout the PR.
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.

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

✨ 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 fix/performance-graph

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.

@jatezzz jatezzz changed the title fix: reapply performance graph at scrolling just on no-fullscreen mode ADFA-4319. Papercut: reapply performance graph at scrolling just on no-fullscreen mode Jun 15, 2026
…white

Changed Material Design 3 theme colors across all modules:
- Primary colors: #6750A4 purple → #555555/#AAAAAA grey
- Secondary colors: #625B71 grey-purple → #666666/#999999 grey
- Tertiary colors: #7D5260 pinkish → #666666/#AAAAAA grey
- Updated all variants (containers, on* colors) to matching grey palette

Modified files:
- app/src/main/res/values/colors.xml: purple_* → grey values
- layouteditor/src/main/res/values/colors.xml: MD3 light/dark theme colors
- resources/src/main/res/values/colors.xml: MD3 light/dark theme colors
- resources/src/main/res/values/styles.xml: Theme.AndroidIDE.Material3 color refs
- resources/src/main/res/values-night/styles.xml: Dark theme color refs
- resources/src/main/res/values/theme_blue_wave.xml: BlueWave variant colors

All UI elements using these colors now display in professional grey palette:
✓ Primary UI accents
✓ Button tints
✓ Text highlights
✓ Chart elements
✓ Secondary accents

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
jatezzz and others added 3 commits June 15, 2026 13:24
- Added setupBottomSheetObserver() to monitor bottom sheet state changes
- Created updateSwipeRevealDragState() to centralize drag enable/disable logic
- SwipeRevealLayout vertical drag now disabled when bottom sheet is open
- Added gesture detector guard to prevent interference with bottom sheet gestures
- Bottom sheet can now properly handle drag-to-close without performance graph interference

This ensures the drag-down gesture for the performance graph is only active
on the homepage when the bottom sheet is closed, allowing the bottom sheet
to use drag gestures for closing itself.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jatezzz jatezzz merged commit 9196356 into stage Jun 22, 2026
2 checks passed
@jatezzz jatezzz deleted the fix/performance-graph branch June 22, 2026 15:34
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