messere1 opened a new pull request, #6135:
URL: https://github.com/apache/rocketmq-dashboard/pull/6135

   ### What problem does this PR solve?
   
   Every Studio page keeps the same generic `RocketMQ Studio` browser-tab title 
while the user navigates, so multiple tabs cannot be told apart and browser 
history / bookmark entries lose their context. `document.title` is never 
touched anywhere in `web/src`.
   
   Original report: #2170 (issue closed as not planned by the stale sweep, not 
invalidated as fixed).
   
   ### What is changed and how it works?
   
   The shared `PageHeader` component now synchronizes the browser tab title 
with the active page:
   
   - `document.title` becomes `<page title> | RocketMQ Studio` while the header 
is mounted and is restored to the previous title on unmount (navigation chains 
restore correctly).
   - A new optional `documentTitle` prop lets a page override the generated tab 
title or set it to `false` to leave the title untouched.
   - Existing header layout and heading semantics are unchanged.
   
   Scope is `PageHeader` + its new test; the 19 pages that already render 
`PageHeader` get tab titles for free.
   
   ### Verifies
   
   - [x] `npx vitest run src/components/__tests__/PageHeader.test.tsx` — 3/3 
pass (sync + restore, override, opt-out).
   - [x] `npx eslint` on the touched files — clean.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to