Skip to content

Conversation

@KonerDev
Copy link
Member

This PR removes unused drawables and normalizes their tint and fillColor values, improves drawer theming and removes selection highlighting.

Changes

  • Remove unused drawables
  • Normalize tint and fillColor values to ?colorControlNormal and @android:color/white
  • Improve drawer theming by reducing surface contrast
  • Change folder and archive tint color
  • Remove selection highlighting (Why did this even exist?)

Screenshots

Screenshot_20251023_185239_Xed-Debug

Clarification

I commented out the selection highlighting that used to appear when you opened a folder or long pressed on an file.
Maybe there was a deeper meaning behind it, but for me, it was always just unnecessary. Please tell me if this was a mistake.

…rawer theming and remove selection highlighting
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.

LGTM!

Review Summary

Commits Considered (1)
  • 3e4ca45: fix(resources): remove unused drawables and normalize tint, improve drawer theming and remove selection highlighting
Files Processed (30)
  • core/main/src/main/java/com/rk/compose/filetree/Drawer.kt (2 hunks)
  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt (8 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt (3 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/screens/settings/support/Support.kt (3 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/theme/Theme.kt (2 hunks)
  • core/main/src/main/res/menu/crash_menu.xml (1 hunk)
  • core/main/src/main/res/menu/menu_main.xml (1 hunk)
  • core/main/src/main/res/menu/navigation_rail_menu.xml (1 hunk)
  • core/main/src/main/res/menu/root_file_options.xml (1 hunk)
  • core/main/src/main/res/menu/tab_menu.xml (1 hunk)
  • core/resources/src/main/res/drawable/animation.xml (1 hunk)
  • core/resources/src/main/res/drawable/archive.xml (1 hunk)
  • core/resources/src/main/res/drawable/baseline_folder_24.xml (1 hunk)
  • core/resources/src/main/res/drawable/baseline_more_vert_24.xml (1 hunk)
  • core/resources/src/main/res/drawable/coffee.xml (from core/resources/src/main/res/drawable/coffee_24px.xml) (0 hunks)
  • core/resources/src/main/res/drawable/content_paste_24px.xml (1 hunk)
  • core/resources/src/main/res/drawable/copy.xml (from core/resources/src/main/res/drawable/content_copy_24px.xml) (0 hunks)
  • core/resources/src/main/res/drawable/cut.xml (from core/resources/src/main/res/drawable/round_content_cut_20.xml) (0 hunks)
  • core/resources/src/main/res/drawable/delete.xml (1 hunk)
  • core/resources/src/main/res/drawable/edit_note.xml (1 hunk)
  • core/resources/src/main/res/drawable/editor_text_select_start.xml (1 hunk)
  • core/resources/src/main/res/drawable/edittext.xml (1 hunk)
  • core/resources/src/main/res/drawable/folder.xml (1 hunk)
  • core/resources/src/main/res/drawable/folder_copy_24px.xml (1 hunk)
  • core/resources/src/main/res/drawable/git.xml (1 hunk)
  • core/resources/src/main/res/drawable/github.xml (1 hunk)
  • core/resources/src/main/res/drawable/golang.xml (1 hunk)
  • core/resources/src/main/res/drawable/ic_language_c.xml (1 hunk)
  • core/resources/src/main/res/drawable/ic_language_cpp.xml (1 hunk)
  • core/resources/src/main/res/drawable/ic_language_csharp.xml (1 hunk)
Actionable Comments (0)
Skipped Comments (2)
  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt [420-426]

    possible bug: "Inconsistent selection highlighting removal."

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

    possible bug: "Incorrect icon selection for copy action."

@Xed-Editor Xed-Editor deleted a comment from github-actions bot Oct 24, 2025
@RohitKushvaha01
Copy link
Member

@KonerDev, selection highlighting is good for people who have a condition called ADHD, where people forget things randomly. Selection highlighting indicates what you have previously clicked.

@github-actions
Copy link

github-actions bot commented Oct 24, 2025

PR Summary

This PR significantly refines the application's theming and cleans up unused resources. It removes numerous redundant drawable and menu XML files, normalizes tint and fill colors to use theme attributes like ?attr/colorControlNormal and @android:color/white, and introduces a new folderSurface color for better visual consistency. Drawer theming is improved by reducing surface contrast, and selection highlighting in the file tree has been removed for a cleaner user experience. Editor theming also received updates to streamline color parameters.

Changes

File Summary
core/main/src/main/java/com/rk/compose/filetree/Drawer.kt Updated the drawable reference for the outline folder icon from drawables.outline_folder_24 to drawables.outline_folder to align with resource renaming and cleanup efforts.
core/main/src/main/java/com/rk/compose/filetree/FileTree.kt Refined file tree theming by updating folder icon references, changing the surface color to surfaceContainerLow, and introducing a folderSurface color for folder and archive icons. Removed selection highlighting by changing the background color for selected files from primaryContainer to surfaceContainerHigh.
core/main/src/main/java/com/rk/crashhandler/CrashActivity.kt Streamlined the setThemeColors function call by removing redundant color parameters like surface, colorPrimaryContainer, colorSecondary, secondaryContainer, and gutterColor. Added a new dividerCurrent parameter to enhance editor theming.
core/main/src/main/java/com/rk/libcommons/editor/KarbonEditor.kt Updated the setThemeColors function signature and internal color application logic. Removed unused color parameters and introduced dividerCurrent. Refined how editorSurface is applied to LINE_NUMBER_BACKGROUND and adjusted LINE_NUMBER tint for improved editor visual consistency.
core/main/src/main/java/com/rk/tabs/EditorTab.kt Simplified the setThemeColors function call within EditorTab by removing several redundant color parameters. Introduced a new dividerCurrent parameter, aligning with the broader theming cleanup across the application.
core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt Updated drawable references for copy, cut, and paste actions within the FileActionDialog. Replaced older, specific drawable names like content_copy_24px with their new, simplified counterparts such as copy.
core/main/src/main/java/com/rk/xededitor/ui/screens/settings/support/Support.kt Updated drawable references for icons on the support screen, specifically changing drawables.coffee_24px to drawables.coffee and drawables.upi_pay_24px to drawables.upi_pay to reflect resource renaming.
core/main/src/main/java/com/rk/xededitor/ui/theme/Theme.kt Introduced a harmonize composable function for dynamic color harmonization using MaterialColors.harmonizeWithPrimary. Applied this harmonization to warningSurface and onWarningSurface colors. Added a new folderSurface color scheme property for consistent folder icon theming.
core/main/src/main/res/menu/crash_menu.xml Removed the crash_menu.xml file, which defined menu items for the crash activity. This file was no longer in use, contributing to resource cleanup.
core/main/src/main/res/menu/menu_main.xml Removed the menu_main.xml file, which defined the main activity's options menu. This file was no longer in use, contributing to resource cleanup.
core/main/src/main/res/menu/navigation_rail_menu.xml Removed the navigation_rail_menu.xml file, which defined menu items for a navigation rail. This file was no longer in use, contributing to resource cleanup.
core/main/src/main/res/menu/root_file_options.xml Removed the root_file_options.xml file, which defined context menu options for files in the root directory. This file was no longer in use, contributing to resource cleanup.
core/main/src/main/res/menu/tab_menu.xml Removed the tab_menu.xml file, which defined context menu options for editor tabs. This file was no longer in use, contributing to resource cleanup.
core/resources/src/main/res/drawable/animation.xml Removed the animation.xml drawable file, which was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/archive.xml Updated the pathData for the archive.xml drawable. The icon's visual representation was changed to a new design, while maintaining the ?attr/colorControlNormal tint.
core/resources/src/main/res/drawable/baseline_folder_24.xml Removed the baseline_folder_24.xml drawable file, which was identified as unused and replaced by a more generic folder.xml drawable.
core/resources/src/main/res/drawable/baseline_more_vert_24.xml Removed the baseline_more_vert_24.xml drawable file, which was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/coffee.xml Renamed coffee_24px.xml to coffee.xml for consistency and simplification of drawable naming conventions.
core/resources/src/main/res/drawable/content_paste_24px.xml Removed the content_paste_24px.xml drawable file, which was identified as unused and replaced by a more generic paste.xml drawable.
core/resources/src/main/res/drawable/copy.xml Renamed content_copy_24px.xml to copy.xml for consistency and simplification of drawable naming conventions.
core/resources/src/main/res/drawable/cut.xml Renamed round_content_cut_20.xml to cut.xml for consistency and simplification of drawable naming conventions.
core/resources/src/main/res/drawable/delete.xml Removed the delete.xml drawable file, which was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/edit_note.xml Normalized the tint of the edit_note.xml drawable by removing a hardcoded tint value and applying ?attr/colorControlNormal for consistent theming.
core/resources/src/main/res/drawable/editor_text_select_start.xml Removed the editor_text_select_start.xml drawable file, which was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/edittext.xml Removed the edittext.xml drawable file, which defined a custom shape for edit text. This file was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/folder.xml Standardized the folder.xml drawable by removing unnecessary comments, adding android:tint="?attr/colorControlNormal", and simplifying its pathData for a cleaner and more consistent icon.
core/resources/src/main/res/drawable/folder_copy_24px.xml Removed the folder_copy_24px.xml drawable file, which was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/git.xml Removed the git.xml drawable file, which was identified as unused and removed as part of resource cleanup.
core/resources/src/main/res/drawable/github.xml Normalized the tint of the github.xml drawable by removing a hardcoded fillColor and applying ?attr/colorControlNormal for consistent theming.
core/resources/src/main/res/drawable/golang.xml Normalized the tint of the golang.xml drawable by changing its fillColor to @android:color/white and applying ?attr/colorControlNormal for consistent theming.

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.

LGTM!

Review Summary

Commits Considered (3)
  • 637cd60: fix(main): improve editor theming
  • 62fb143: fix(main): revert removal of selection highlighting and improve theming
  • 3e4ca45: fix(resources): remove unused drawables and normalize tint, improve drawer theming and remove selection highlighting
Files Processed (30)
  • core/main/src/main/java/com/rk/compose/filetree/Drawer.kt (2 hunks)
  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt (8 hunks)
  • core/main/src/main/java/com/rk/crashhandler/CrashActivity.kt (3 hunks)
  • core/main/src/main/java/com/rk/libcommons/editor/KarbonEditor.kt (3 hunks)
  • core/main/src/main/java/com/rk/tabs/EditorTab.kt (2 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/components/FileActionDialog.kt (3 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/screens/settings/support/Support.kt (3 hunks)
  • core/main/src/main/java/com/rk/xededitor/ui/theme/Theme.kt (2 hunks)
  • core/main/src/main/res/menu/crash_menu.xml (1 hunk)
  • core/main/src/main/res/menu/menu_main.xml (1 hunk)
  • core/main/src/main/res/menu/navigation_rail_menu.xml (1 hunk)
  • core/main/src/main/res/menu/root_file_options.xml (1 hunk)
  • core/main/src/main/res/menu/tab_menu.xml (1 hunk)
  • core/resources/src/main/res/drawable/animation.xml (1 hunk)
  • core/resources/src/main/res/drawable/archive.xml (1 hunk)
  • core/resources/src/main/res/drawable/baseline_folder_24.xml (1 hunk)
  • core/resources/src/main/res/drawable/baseline_more_vert_24.xml (1 hunk)
  • core/resources/src/main/res/drawable/coffee.xml (from core/resources/src/main/res/drawable/coffee_24px.xml) (0 hunks)
  • core/resources/src/main/res/drawable/content_paste_24px.xml (1 hunk)
  • core/resources/src/main/res/drawable/copy.xml (from core/resources/src/main/res/drawable/content_copy_24px.xml) (0 hunks)
  • core/resources/src/main/res/drawable/cut.xml (from core/resources/src/main/res/drawable/round_content_cut_20.xml) (0 hunks)
  • core/resources/src/main/res/drawable/delete.xml (1 hunk)
  • core/resources/src/main/res/drawable/edit_note.xml (1 hunk)
  • core/resources/src/main/res/drawable/editor_text_select_start.xml (1 hunk)
  • core/resources/src/main/res/drawable/edittext.xml (1 hunk)
  • core/resources/src/main/res/drawable/folder.xml (1 hunk)
  • core/resources/src/main/res/drawable/folder_copy_24px.xml (1 hunk)
  • core/resources/src/main/res/drawable/git.xml (1 hunk)
  • core/resources/src/main/res/drawable/github.xml (1 hunk)
  • core/resources/src/main/res/drawable/golang.xml (1 hunk)
Actionable Comments (0)
Skipped Comments (4)
  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt [404-406]

    performance: "Review artificial delays in click handlers."

  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt [414-416]

    performance: "Evaluate necessity of delay in long click handler."

  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt [423-425]

    maintainability: "Remove redundant Modifier in conditional background."

  • core/main/src/main/java/com/rk/compose/filetree/FileTree.kt [421-426]

    readability: "Clarify selection highlighting behavior."

@RohitKushvaha01 RohitKushvaha01 merged commit b6ebdb7 into Xed-Editor:main Oct 24, 2025
1 check passed
@KonerDev KonerDev deleted the fix/icon-theming branch November 1, 2025 13:14
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