Skip to content

Conversation

@jjroelofs
Copy link
Contributor

Summary

Add visual branding for RL experiments with an animated gradient border, helping administrators easily identify RL-powered elements.

Changes

  • Add css/experiment-highlight.css with animated gradient border
  • Add experiment-highlight library to rl.libraries.yml
  • Add hook_page_attachments() to attach library for authorized users
  • Add hook_preprocess_html() to add body class on RL admin pages
  • Add experimentDetailTitle() callback for dynamic page titles
  • Update routing to use title callback

Color Palette

Uses a 10-color gradient from blue to green to yellow:

  • #0077B6#0096C7#00B4D8#48CAE4#26828E
  • #1F9E89#35B779#6CCE59#B4DE2C#DAE319

Test Plan

  • Log in as user with "view rl reports" permission
  • Visit /admin/reports/rl - verify animated border on page title
  • Visit experiment detail page - verify title shows experiment name
  • Add rl-experiment class to any element - verify border appears
  • Log in as user without permission - verify no border styling

Closes #19

- Add experiment-highlight CSS library with animated gradient border
- Attach library for users with 'view rl reports' permission
- Add .rl-experiment class for integrating modules to apply branding
- Style contextual links and page titles on RL admin pages
- Add body class 'rl-admin-page' on RL routes for targeted styling
- Add dynamic page title showing experiment name on detail page

The gradient border uses a 10-color palette (blue to green to yellow)
with a 10s animation cycle. Integrating modules can simply add the
'rl-experiment' class to their elements to receive the branding.
@jjroelofs jjroelofs merged commit 6e8b492 into 1.x Jan 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add animated gradient border branding for RL experiments

2 participants