morningman opened a new pull request, #4032:
URL: https://github.com/apache/doris-website/pull/4032

   ## What this PR does
   
   The Doris 101 lesson layout gave the module rail a fixed 255px column, so 
readers who wanted more room for the lesson stage had no way to reclaim it.
   
   This adds a toggle to the rail header that collapses it to a 74px strip 
showing only the 01–06 module badges, widening the lesson stage to match. 
Clicking again restores it. The choice is remembered in `localStorage` so it 
survives navigation between modules.
   
   ## Implementation notes
   
   - The collapsed state is driven by `<html data-course-rail>` rather than by 
React state. A `COURSE_RAIL_BOOTSTRAP` script in `headTags` applies the stored 
choice before first paint, mirroring the existing `BRAND_THEME_BOOTSTRAP`. 
Reading it from an effect instead would paint the rail expanded and then 
animate it shut on every lesson navigation, since the player remounts per 
module page.
   - The rail width moved into a `--course-rail-width` custom property so the 
shell grid and the collapsed override share one source of truth.
   - While collapsed, the hover tooltip carries the module title alongside its 
description, and it now also covers the active module, which renders as a `div` 
rather than a `Link`.
   - The toggle carries `aria-expanded` plus a state-dependent 
`aria-label`/`title`, and the two new transitions are disabled under 
`prefers-reduced-motion`.
   - The rail is already hidden below 1100px, so mobile layout is unaffected.
   
   ## Testing
   
   - `yarn typecheck` — no new errors in `src/components/course/` (the 
pre-existing failures under `src/utils/` are untouched).
   - `yarn start` — verified collapse/expand, persistence across module 
navigation, and that a collapsed rail no longer flashes open on navigation or 
hard reload.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to