wordpress-mobile / wordpress-mobile/GutenbergKit
Add Genmoji support
Open
Nobody has claimed this yet.
[Type] Enhancement
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 6
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
What problem does this address?
Genmoji are available in every app, but they require a bit of work to render them as emoji. By default, these are inserted as images, which is not what you typically want.
Screenshots
| Generation | Current Result |
|---|---|
References:
- https://developer.apple.com/videos/play/wwdc2024/10220/
- https://developer.apple.com/documentation/uikit/nsadaptiveimageglyph
What is your proposed solution?
We should implement logic to render Genmoji as emoji characters.
// Converting NSAttributedString to HTML
let htmlData = try textContent.data(from: NSRange(location: 0, length: textContent.length),
documentAttributes: [.documentType: NSAttributedString.DocumentType.html])
<!-- Resulting HTML-->
<picture>
<source srcset="genmoji.heic" type="image/x-apple-adaptive-glyph">
<img src="genmoji.png" alt="dog in a spacesuit">
</picture>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the NSAttributedString-to-HTML conversion shown in the issue and review Apple's NSAdaptiveImageGlyph documentation and WWDC reference. Determine how Genmoji adaptive image glyphs enter the generated HTML, then verify that they render as emoji characters rather than default images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100