Skip to content

Conversation

@KonerDev
Copy link
Member

@KonerDev KonerDev commented Oct 8, 2025

This PR replaces the XedDialog for certain actions with the ModalBottomSheet.

Why this is better:

  • It's easier to reach with the thumb (and better for one-handed use)
  • The bottom sheet only covers the bottom part of the screen, letting users still see the content beneath it
  • Swipe gestures can be used to dismiss the sheet quickly

This is also used in AndroidIDE.

Screenshots

grafik

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

PR Summary

Replaced the XedDialog component with ModalBottomSheet for several actions across the application. This enhancement improves the user experience by making actions easier to reach with a thumb, allowing users to see content beneath the sheet, and enabling quick dismissal via swipe gestures. This approach is also utilized in AndroidIDE.

Changes

File Summary
core/main/src/main/java/com/rk/compose/filetree/Drawer.kt Replaced the XedDialog with ModalBottomSheet in the AddProjectDialog composable, enhancing the user experience for adding projects. Applied ExperimentalMaterial3Api and adjusted padding for the new bottom sheet layout.
core/main/src/main/java/com/rk/xededitor/ui/components/AddDialogItem.kt Adjusted the horizontal and vertical padding of the AddDialogItem composable from 16.dp to 12.dp to optimize its appearance within the new ModalBottomSheet context.
core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt Migrated the FileActionDialog from using XedDialog to ModalBottomSheet, improving accessibility and user interaction for file-related actions. Applied ExperimentalMaterial3Api and updated the content padding.
core/main/src/main/java/com/rk/xededitor/ui/components/GlobalActions.kt Switched the global "add" dialog, triggered by addDialog state, from XedDialog to ModalBottomSheet. This change improves the UI/UX for creating new files or projects. Applied ExperimentalMaterial3Api and adjusted padding.

autogenerated by presubmit.ai

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🚨 Pull request needs attention.

Review Summary

Commits Considered (1)
  • 4a0301a: feat(bottom-sheet): use ModalBottomSheet instead of dialog
Files Processed (4)
  • core/main/src/main/java/com/rk/compose/filetree/Drawer.kt (3 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/components/AddDialogItem.kt (1 hunk)
  • core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt (8 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/components/GlobalActions.kt (3 hunks)
Actionable Comments (2)
  • core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt [109-110]

    possible bug: "Avoid using nullable static instances with '!!'."

  • core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt [184-185]

    possible bug: "Redundant or incorrect state update before dismissal."

Skipped Comments (0)

@RohitKushvaha01 RohitKushvaha01 merged commit 60cb717 into Xed-Editor:main Oct 9, 2025
@KonerDev KonerDev deleted the feature/use-bottomsheet branch October 19, 2025 08:44
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