Frontend
LesliBell renders inside Lesli's authenticated application shell. The notification feed uses LesliView for its container, header, toolbar, actions, and empty state, while Tailwind CSS provides engine-specific presentation.
Tailwind Stylesheet
The editable entrypoint and generated Rails asset are separate:
source/tailwind/application.css
↓ build
app/assets/stylesheets/lesli_bell/application.css
Edit the file under source/tailwind; do not edit the compiled stylesheet by hand. Commit the generated asset whenever the source or a scanned template changes.
LesliBell's entrypoint disables automatic source discovery and scans notification and announcement views explicitly:
@source "../../app/views/lesli_bell/notifications/index.html.erb";
@source "../../app/views/lesli_bell/announcements";
Add an @source rule when another template or helper starts using Tailwind utilities. The entrypoint references LesliAssets' Tailwind theme so semantic utilities such as bg-info-50, border-warning-300, and text-danger-900 compile against Lesli's design tokens.
Tailwind cannot detect class-name fragments such as "bg-#{category}-50". Map runtime states to complete class strings, as the notification view does for info, success, warning, and danger.
Build the Asset
From a standard Lesli development workspace, run the shared builder:
cd gems/LesliAssets
make build.tailwind
Use the watcher while editing templates or Tailwind sources:
make watch.tailwind
The builder discovers LesliBell's entrypoint and writes the compiled output to app/assets/stylesheets/lesli_bell/application.css.
View Conventions
Persistent announcement banners belong to Core's lesli/partials/application-lesli-announcements partial. Their utilities are compiled into the global LesliAssets stylesheet, including the complete category classes defined in Lesli::AnnouncementsHelper, so banners also work on pages belonging to other engines. Interface labels belong to Core's lesli.announcements translations; administration and dismissal errors belong to LesliBell. See Announcements for visibility and Turbo behavior.
- Wrap authenticated pages with
LesliView::Layout::Container. - Prefer LesliView components for headers, toolbars, buttons, and empty states.
- Use complete semantic class names for notification categories.
- Preserve visible
focus-visiblestates for links and actions. - Mark decorative icons with
aria-hidden="true"and give icon-only actions an accessible label. - Keep notification data shaping and account scoping in services rather than templates.
- Treat compiled CSS and JavaScript under
app/assetsas generated files.
See Views and Layouts, Styles with Tailwind CSS, and the LesliView documentation for shared conventions and component APIs.
Last Update: 2026/11/13