BaseUI: Emote Refactoring#9896
Merged
Merged
Conversation
Xaositek
approved these changes
Mar 15, 2026
Xaositek
left a comment
Contributor
There was a problem hiding this comment.
Haven't found any regressions yet! Looks solid!
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors BaseUI text rendering to support inline emotes consistently across multiple screens while reducing duplicated parsing/wrapping logic and flash usage.
Changes:
- Introduces
graphics::EmoteRendererfor emote-aware measuring, truncation, and drawing (with modifier-tolerant matching). - Adds
UIRendererwrappers (measure/truncate/drawStringWithEmotes) and updates several UI surfaces to use them. - Reworks canned message and message-thread rendering paths to remove bespoke tokenization/wrapping and rely on shared helpers.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/CannedMessageModule.cpp | Replaces local emote tokenization/rendering with shared emote-aware truncation/drawing and adds emote-safe wrapping helpers for freetext. |
| src/graphics/draw/UIRenderer.h | Declares shared BaseUI emote helper APIs (measure/truncate/draw). |
| src/graphics/draw/UIRenderer.cpp | Implements the UIRenderer emote helper wrappers and updates multiple UI call sites to use them. |
| src/graphics/draw/NotificationRenderer.cpp | Updates node picker rendering to truncate/measure/draw with emotes. |
| src/graphics/draw/NodeListRenderer.h | Changes getSafeNodeName to return std::string to preserve UTF-8/emotes. |
| src/graphics/draw/NodeListRenderer.cpp | Uses emote-aware truncation/drawing for node list entries; updates name handling. |
| src/graphics/draw/MessageRenderer.cpp | Centralizes emote rendering via EmoteRenderer for thread UI; updates header measurement/truncation. |
| src/graphics/SharedUIDisplay.cpp | Centers header titles using emote-aware measurement and drawing. |
| src/graphics/EmoteRenderer.h | Adds new emote rendering/measuring/truncation API and metrics helpers. |
| src/graphics/EmoteRenderer.cpp | Implements shared emote-aware parsing/rendering, including handling FE0F and skin-tone modifiers. |
You can also share your feedback on Copilot code review. Take the survey.
thebentern
pushed a commit
that referenced
this pull request
Mar 19, 2026
* Emote refactor for BaseUI * Trunk Check * Copilot suggestions
andmadeira
pushed a commit
to andmadeira/meshtastic-firmware
that referenced
this pull request
Mar 19, 2026
* Emote refactor for BaseUI * Trunk Check * Copilot suggestions
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
* Emote refactor for BaseUI * Trunk Check * Copilot suggestions
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.
This cleanup makes emote rendering work consistently across the UI while reducing duplicate code, extra processing, and overall flash size. Node name with Emotes now render correctly if the emote exists across the whole UI.
T114 Before Cleanup
RAM: [==== ] 44.4% (used 110464 bytes from 248832 bytes)
Flash: [========= ] 88.1% (used 718400 bytes from 815104 bytes)
T114 After Cleanup
RAM: [==== ] 44.4% (used 110408 bytes from 248832 bytes)
Flash: [========= ] 88.0% (used 717360 bytes from 815104 bytes)