MessageComposer: mount the emoji searchbar only when it's visible#7405
MessageComposer: mount the emoji searchbar only when it's visible#7405diegolmello wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (5)**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx,json}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
app/containers/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (1)📚 Learning: 2026-04-30T17:07:51.020ZApplied to files:
🔇 Additional comments (3)
WalkthroughThe ChangesEmojiSearchbar Visibility Refactor
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposed changes
EmojiSearchbar was always mounted inside the message composer and hid itself with an internal early
return null. So on every room open it mounted, ran its hooks, and triggered a frequently-used-emoji database read — despite being hidden until the user opens emoji search.This gates the mount on
showEmojiSearchbar, threads the flag from MessageComposer through MessageComposerContent, and removes the now-dead internal null guard. The searchbar now mounts only when it becomes visible, avoiding a render and an async DB read on every room open.Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-1292
How to test or reproduce
Screenshots
N/A — no visual change.
Types of changes
Checklist
Summary by CodeRabbit