feat: cleaner, smaller code block copy button - #633
Draft
eszlamczyk wants to merge 3 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refines the visual design of the fenced code block “copy” affordance to better match iOS’s doc.on.doc SF Symbol across platforms, making the iconography cleaner and more consistent between iOS/macOS and Android.
Changes:
- iOS/macOS: adjust the copy icon’s SF Symbol point size and weight independently from the header label.
- Android: replace the previous rounded-rect “copy” icon with a custom-drawn
doc.on.doc-style glyph shared between the header button and the context menu. - Android: tweak the context-menu “document” icon geometry to better match
doc.text.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/react-native-enriched-markdown/ios/views/ENRMCodeBlockContainerView.m | Sizes the SF Symbol copy icon smaller and at regular weight (iOS + macOS) via a new independent scale constant. |
| packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/views/CopyGlyph.kt | Introduces a shared, custom-drawn copy glyph intended to match SF Symbol doc.on.doc. |
| packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/views/ContextMenuPopup.kt | Uses the shared copy glyph for the COPY icon and redraws the DOCUMENT icon for closer visual parity. |
| packages/react-native-enriched-markdown/android/src/main/java/com/swmansion/enriched/markdown/views/CodeBlockContainerView.kt | Updates header copy button sizing and switches the drawable to use the shared copy glyph. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What/Why?
Makes the code block copy button look cleaner: the iOS
doc.on.docSF Symbol is rendered a touch smaller at a regular (not medium) weight, and the Android header + context-menu icons are redrawn as matching portraitdoc.on.doc/doc.textshapes so both platforms look the same.Testing
Open a
flavor="github"code block and compare the header copy button and long-press context-menu icons across iOS, macOS, and Android.PR Checklist