Skip to content

fix: set document title via Helmet on the template route#1000

Merged
arbrandes merged 1 commit intoopenedx:frontend-basefrom
arbrandes:arbrandes/page-titles
Apr 29, 2026
Merged

fix: set document title via Helmet on the template route#1000
arbrandes merged 1 commit intoopenedx:frontend-basefrom
arbrandes:arbrandes/page-titles

Conversation

@arbrandes
Copy link
Copy Markdown
Contributor

Description

Refs openedx/frontend-base#250.

Adopts the per-page document title pattern set out in frontend-base ADR 0015. The template's Main route component now renders a <Helmet> block that sets <title> from a new localized message (template.page.title, default Template | {siteName}), with siteName pulled from getSiteConfig() and passed as an i18n parameter. react-helmet is added to runtime dependencies, and a small test asserts that document.title ends up as expected.

This matters for the template specifically because frontend-base's migration how-to points here for complete examples, so apps following the migration path will land on the right pattern by default.

LLM usage notice

Built with assistance from Claude.

Adopt the per-page document title pattern from frontend-base ADR 0015,
so apps generated from this template ship with a sensible browser-tab
title instead of inheriting the previous app's.  Since frontend-base's
migration how-to points to this repo for complete examples, including
the pattern here also makes it discoverable for new apps.

Refs openedx/frontend-base#250.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.27%. Comparing base (1bbac69) to head (b0e32b5).
⚠️ Report is 1 commits behind head on frontend-base.

Additional details and impacted files
@@                Coverage Diff                 @@
##           frontend-base    #1000       +/-   ##
==================================================
+ Coverage           0.00%   27.27%   +27.27%     
==================================================
  Files                  8        9        +1     
  Lines                 20       22        +2     
  Branches               1        1               
==================================================
+ Hits                   0        6        +6     
+ Misses                20       16        -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arbrandes arbrandes merged commit 2ce8a2c into openedx:frontend-base Apr 29, 2026
6 checks passed
@arbrandes arbrandes deleted the arbrandes/page-titles branch April 29, 2026 17:52
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.

Page title not updating after logging in

2 participants