Skip to content

Feat: Replace toolbar share URL with Wikitext copy action and remove redundant bottom button - #6934

Open
Kota-Jagadeesh wants to merge 8 commits into
commons-app:mainfrom
Kota-Jagadeesh:fix/6901-use-in-wiki-toolbar
Open

Feat: Replace toolbar share URL with Wikitext copy action and remove redundant bottom button#6934
Kota-Jagadeesh wants to merge 8 commits into
commons-app:mainfrom
Kota-Jagadeesh:fix/6901-use-in-wiki-toolbar

Conversation

@Kota-Jagadeesh

@Kota-Jagadeesh Kota-Jagadeesh commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Description (required)

Fixes #6901

What changes did you make and why?

  • Repurposed menu_share_current_image in MediaDetailPagerFragment.kt to generate and copy the formatted MediaWiki snippet ([[File:...]]) directly to the clipboard instead of sharing an HTTPS URL.
  • Updated fragment_image_detail.xml menu item title to copy_wikicode and icon to menu_ic_copy_link_24dp, while removing the duplicate menu_copy_link item.
  • Removed the redundant copyWikicode bottom blue button from fragment_media_detail.xml and removed its associated click listener and unused logic from MediaDetailFragment.kt to clean up the UI.

Tests performed (required)

Tested ProdDebug on Redmi Note 13 Pro with API level 36.

  • Verified that tapping the top toolbar copy icon successfully copies [[File:filename|thumb|description]] to clipboard with a confirmation Toast.
  • Verified that the bottom blue button is no longer present in the media detail view.
  • Verified that other toolbar actions (download, bookmark, view in browser) continue to work properly.

Screenshots (for UI changes only)

Need help? See https://support.google.com/android/answer/9075928

@noorizanbintiabdulmalik85

This comment was marked as off-topic.

@noorizanbintiabdulmalik85

This comment was marked as off-topic.

@noorizanbintiabdulmalik85

This comment was marked as off-topic.

@noorizanbintiabdulmalik85

This comment was marked as off-topic.

@noorizanbintiabdulmalik85

This comment was marked as off-topic.

@github-actions

Copy link
Copy Markdown

✅ Generated APK variants!

@chrisdebian

Copy link
Copy Markdown

The repurposing itself matches what #6901 actually asked for — the issue specifically describes replacing the share URL toolbar button (Intent.ACTION_SEND) with a "copy wikitext" action, and that's what this does.

One thing worth flagging before merge, though: menu_copy_link isn't a duplicate of the share button being replaced — it did something genuinely different (copies the plain canonical URL directly to the clipboard, no share-sheet, no wikitext formatting). After this PR, there's no remaining way to get a plain shareable URL onto the clipboard from the media detail toolbar at all — only the wikitext format. That's real functionality loss beyond what #6901 asked for, not just a UI cleanup.

Might be intentional (maybe wikitext genuinely covers the real use case, and plain-URL-copy wasn't pulling its weight), but worth a maintainer call rather than assuming — happy to help scope keeping both if that's the preference, e.g. wikitext on the repurposed button and plain-link-copy staying as a secondary overflow item.

Checked for dangling references from the removals (copyWikicode view id, onCopyWikicodeClicked, menu_copy_link) — none found, this part is clean.

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.

[Feature]: replace share url with "use in wiki as" button

3 participants