Implementation Patterns — RHEA 1.0

You are reading the RHEA 1.0 patterns
RHEA 1.0 is the current release and powers all live consuming sites. For the in-development successor, see RHEA 2.0 Patterns.

Page Loading Architecture

RHEA implements a three-phase page loading strategy optimized for Largest Contentful Paint (LCP):

Phase 1: Eager (LCP-critical)

Step Action Purpose
1 Author mode detection Detect adobeaemcloud in URL, set window.hlx.authorMode and author-mode class on <body>
2 Template and theme decoration Apply page-specific template and cached theme (dark/light)
3 Event bus + section/block decoration Initialize window.Bus (mitt), decorate icons, sections, and blocks
4 enforceContainer() Add .container class and data-section-type="container" to all sections
5 First section load Load only the above-the-fold section
6 Font preload (desktop) Preload critical font files if desktop or cached

Phase 2: Lazy

Step Action Purpose
1 Remaining sections Load all sections below the fold
2 Breadcrumb Generate navigation breadcrumb with structured data
3 Header Load from /nav fragment with responsive navigation
4 ISI Load Important Safety Information from per-page fragment
5 Footer Load from /footer fragment
6 Lazy styles Load non-critical CSS
7 Fonts (full) Load complete font family
8 Analytics Initialize data layer, in-view observers, click tracking

Phase 3: Delayed (3 seconds)

Step Action Purpose
1 Import delayed.js Third-party scripts, deferred analytics, non-essential integrations

Key Architectural Patterns

Block Resolution

EDS resolves blocks by matching the block name (from the authored content table) to a directory in the repository. See the per-block README.md files in the RHEA source repository for the complete directory layout. Each block contains its JS logic, SCSS source, component model JSON, and auto-generated CSS/token outputs.

Fragment System

Global components are loaded from authored content fragments with built-in caching:

Fragment Path Purpose
Header /nav Navigation structure, logos, search, theme toggle
Footer /footer Footer navigation, social links, copyright
ISI /isi/{variant} Per-page Important Safety Information
Breadcrumb /nav Breadcrumb structure, style (authored in header fragment along with header)

Fragment loading uses Promise-based deduplication — if multiple components request the same fragment simultaneously, only one network request is made.

Event Bus

Inter-component communication uses window.Bus (mitt event emitter):

Command events (trigger an action):

Event Emitter Listener Purpose
modal-open:{id} CTA block Modal block Requests a named modal to open
modal-close:{id} CTA / Modal close button Modal block Requests a named modal to close
modal-confirm:{id} CTA block Modal block Triggers modal confirm behavior

Notification events (announce state changes):

Event Emitter Payload Purpose
modal-opened:{id} Modal block block.config Modal finished opening
modal-closed:{id} Modal block block.config Modal finished closing
ccb-shown Cookie Consent Banner { config } Banner became visible
ccb-hidden Cookie Consent Banner { config } Banner was hidden
ccb-close-clicked Cookie Consent Banner { config } User clicked close
ccb-settings-clicked Cookie Consent Banner { config } User clicked settings
cta-click CTA block { id, behavior, behaviorId, event } CTA was activated
isi:state-change ISI block { fullIsiInView } ISI expand/collapse state changed
img-link-click Image block { id, event } Linked image was clicked
On this page
h3
true