Add email rich-text entities and copy-on-tap handling #70
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.
Motivation
MessageEntitydata.mailto:links while keeping link detection for real URLs.Description
NSAttributedString.Keyfor.emailAddressand apply it whenMessageEntity.Type.emailis rendered inProcessEntities.toAttributedString, and extract it infromAttributedStringinapple/InlineUI/Sources/TextProcessing/ProcessEntities.swift.mailto:as a general external link by updatingallowedExternalLinkSchemes(seeProcessEntities.swift).findEmailsinserver/src/modules/message/parseMarkdown.tsand has a corresponding test inserver/src/modules/message/processText.test.ts.UIMessageViewcopies an email to the clipboard and shows a toast when tapped, macOSMessageViewcopies email on click and shows a toast viaToastCenter, compose views suppress automatic email link conversion (dataDetectorTypes = []on iOS and strippingmailto:links on macOS); seeapple/InlineIOS/Features/Message/UIMessageView.swift,apple/InlineMac/Views/Message/MessageView.swift,apple/InlineIOS/Features/Compose/ComposeTextView.swift, andapple/InlineMac/Views/Compose/ComposeTextView.swift.Testing
apple/InlineUI/Tests/InlineUITests/ProcessEntitiesTests.swiftand for server markdown email parsing inserver/src/modules/message/processText.test.ts, but they were not run here.bun testfor server andswift testfor Apple packages).Codex Task