Lazy-load emoji rendering code

What does this MR do and why?

Every page loaded emoji code, including pages with no emoji.

I moved rendering behind the first <gl-emoji> connection and switched user popovers and the security patch alert to a helper that only builds markup. Pages with emoji already present still trigger the download on connection.

References

Closes #604105 (closed)

Screenshots or screen recordings

No visual change.

How to set up and validate locally

  1. Open a page with no emoji, including no status emoji, and check that the emoji chunk stays unloaded.
  2. Render an emoji or open the picker and check loading and rendering.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading