Skip to content

Feature request: transient checkmark feedback on code-block copy buttons #1000

Open

Description

@kosumic

Is your feature request related to a problem? Please describe.

The native GitHub-flavor code-block header has a copy button, but its icon does not acknowledge a successful copy. Applications can show a toast or trigger haptics through onCopyPress, but cannot update the built-in button itself. Feedback at the tapped control would confirm the action without requiring a separate overlay.

Describe the solution you'd like

Temporarily replace the code-block header's copy icon with a checkmark after a successful copy, then restore the copy icon after a short interval, for example 1.5 seconds.

  • Support the native header on Android and iOS, and macOS where applicable.
  • Repeated copies should restart the feedback interval.
  • Reset feedback and cancel pending work when the block's code/language changes, it becomes pending during streaming, or the view is detached/recycled.
  • Preserve the current icon sizing, theme colors, and accessibility behavior.
  • Keep the documented onCopyPress contract unchanged: it should not start firing for Copy as Markdown as a side effect of adding visual feedback.

Whether feedback is enabled by default or exposed as an option is open to discussion. This request does not require a new copy-event API, toast, or haptics implementation.

Describe alternatives you've considered

An application-owned toast/haptic through onCopyPress works today, but does not acknowledge the action on the button. Replacing the entire native code-block header solely to change its icon is a larger customization than this behavior needs.

Additional context

We currently carry a downstream patch against react-native-enriched-markdown 1.0.2 that adds transient native checkmarks. We would like to contribute this independently of search highlighting or font changes, with lifecycle and repeated-copy coverage.

Activity

  1. eszlamczyk commented on Oct 26, 2026

    @eszlamczyk
    Collaborator

    Hi @kosumic, thanks for the feature request! There's already #1091 for the iOS side. We don't know yet when we'll be able to look into this.

  2. kosumic commented on Oct 26, 2026

    @kosumic
    Author

    It should be consistent across Android and iOS.

  3. adelbeke commented on Oct 26, 2026

    @adelbeke
    Contributor

    Hey @kosumic, thanks for the feedback. I don't need it on Android but for the sake of consistency, I added it to the PR 🥳.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions