feat(shell): sticky tabs+toolbar on the channel page
Generalise the fixed-chrome pattern to the channel detail page: the banner + identity now scroll away, while the tab row and the channel feed's toolbar stick to the top as a sticky sub-header — only the video grid scrolls. Mechanism: PageToolbarSlot (the toolbar portal target) is now an exported, overridable context. ChannelPage provides its own sticky sub-header node as the target, so the channelScoped Feed portals its toolbar up next to the tabs instead of into the shell's top band. Feed always portals its toolbar now (the slot decides where it lands). Also: the page scroller now fades only its BOTTOM edge — the top is bounded by the fixed/sticky chrome, so a top fade only bit into it. E2E: adds a lock that the channel tabs/toolbar stay pinned while the banner scrolls away; suite 15/15 on :5173, tsc + knip clean.
This commit is contained in:
@@ -67,7 +67,9 @@ export default function PageScroller({
|
||||
children: ReactNode;
|
||||
scrollKey?: string;
|
||||
}) {
|
||||
const fade = useScrollFade();
|
||||
// Only the bottom edge fades: the top is bounded by the shell's fixed chrome (header / toolbar
|
||||
// band) or a module's sticky sub-header, so a top fade would just eat into that chrome.
|
||||
const fade = useScrollFade(20, { top: false });
|
||||
const fadeRef = fade.ref;
|
||||
const elRef = useRef<HTMLElement | null>(null);
|
||||
// Stable identity: an inline ref callback changes every render, which makes React detach and
|
||||
|
||||
Reference in New Issue
Block a user