Skip to content

Feat: Improve UX for Edit Image button on non-JPEG files#6694

Open
Kota-Jagadeesh wants to merge 3 commits intocommons-app:mainfrom
Kota-Jagadeesh:fix/6693-predictable-edit-button
Open

Feat: Improve UX for Edit Image button on non-JPEG files#6694
Kota-Jagadeesh wants to merge 3 commits intocommons-app:mainfrom
Kota-Jagadeesh:fix/6693-predictable-edit-button

Conversation

@Kota-Jagadeesh
Copy link
Collaborator

@Kota-Jagadeesh Kota-Jagadeesh commented Mar 1, 2026

Description (required)

Fixes #6693

What changes did you make and why?

  • Updated the UploadMediaDetailFragment to keep the "Edit Image" button visible for all file types instead of hiding it for non-jpeg's
  • applied a 0.5f alpha effect to the llEditImage container when a non-JPEG file (png, webp, or someother file formats) is detected to signify an inactive state
  • implemented a conditional click listener that triggers a DialogUtil alert for non-JPEGs, explaining that editing is iscurrently only supported for jpeg's and suggesting third-party tools.

Tests performed (required)

Tested ProDebug on Redmi Note 13 Pro with API level 35.

  • Scenario 1: Uploaded a .jpg file -> Button is fully opaque, and clicking it opens the Image Editor.
  • Scenario 2: Uploaded a .png file -> Button appears greyed out, and clicking it displays the "Unsupported format" explanation dialog.

Screenshots (for UI changes only)

For non-jpeg :
image image

For jpeg:
image

@Kota-Jagadeesh Kota-Jagadeesh changed the title Improve UX for Edit Image button on non-JPEG files Feat: Improve UX for Edit Image button on non-JPEG files Mar 1, 2026
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

✅ Generated APK variants!

val filePath = uploadableFile?.getFilePath()?.toString() ?: ""
val isJpeg = filePath.endsWith(".jpeg", ignoreCase = true)
|| filePath.endsWith(".jpg", ignoreCase = true)
llEditImage.visibility = if (isJpeg) View.VISIBLE else View.GONE

This comment was marked as resolved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make edit button more predictable

2 participants