feat(components): optional header and per-item footer suppression on LoroSidebar - #10
Draft
pythonlearner1025 wants to merge 1 commit into
Draft
feat(components): optional header and per-item footer suppression on LoroSidebar#10pythonlearner1025 wants to merge 1 commit into
pythonlearner1025 wants to merge 1 commit into
Conversation
…LoroSidebar A host that mounts the sidebar body inside an existing shell already draws its own workspace-identity header, and may serve settings and help from its own chrome. Today it gets two workspace headers and two settings entries; `afterSessionListContent` is the only slot the component has. Add three optional props, all inert by default: - `hideHeader` suppresses the workspace-identity header row. - `hideFooter` suppresses the whole footer utility rail. - `footerItems` lists which footer utilities render when the footer renders at all — `settings`, `help`, `archive` and the mobile-only `filter` popover. The default is every item, so a host that says nothing renders exactly what it rendered before. `hideFooter` stays the shorter spelling for "none of them". `footerItems` exists because `hideFooter` cannot express "keep one of them", and the archive entry is the component's only affordance that reaches the archive page: a host that serves its own settings and help but not its own archive had no way to keep the one entry it wanted. Worth stating for a host that hides the footer: on MOBILE the footer is the only place the filter popover renders — the desktop trigger lives in the first section header — so that host owns the organize/scope control. With every prop absent the component renders byte-for-byte what it rendered before, and no existing call site passes one. Model: claude-opus-5[1m]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A host that mounts the sidebar body inside an existing shell already draws its
own workspace-identity header, and may serve settings and help from its own
chrome. Today it gets two workspace headers and two settings entries;
afterSessionListContentis the only slot the component has.Add three optional props, all inert by default:
hideHeadersuppresses the workspace-identity header row.hideFootersuppresses the whole footer utility rail.footerItemslists which footer utilities render when the footer renders atall —
settings,help,archiveand the mobile-onlyfilterpopover. Thedefault is every item, so a host that says nothing renders exactly what it
rendered before.
hideFooterstays the shorter spelling for "none of them".footerItemsexists becausehideFootercannot express "keep one of them", andthe archive entry is the component's only affordance that reaches the archive
page: a host that serves its own settings and help but not its own archive had
no way to keep the one entry it wanted.
Worth stating for a host that hides the footer: on MOBILE the footer is the only
place the filter popover renders — the desktop trigger lives in the first section
header — so that host owns the organize/scope control.
With every prop absent the component renders byte-for-byte what it rendered
before, and no existing call site passes one.
Compatibility
Every change is additive at its default. With the new prop, parameter or flag
absent, the touched components render and behave exactly as they do today, and
no existing call site in this repository passes one.
Testing
packages/componentstypecheck and the full vitest suite pass. No new test: the component needs the sidebar provider stack. The three props are pure render guards with no logic.Notes for the reviewer
This carries two related changes at once, because the second is the first admitting it was too coarse:
hideFooteris all-or-nothing, and the archive entry is the only affordance that reaches the archive page.footerItemsis the finer control;hideFooterkeeps its meaning as the shorter spelling for "none of them". Reviewing them separately is possible — say so and this splits into two PRs.The raw diff is large because hunks 3 and 4 are a guard plus a re-indent of the block they wrap.
git diff -wis ~23 changed lines, 15 of which are the doc comments.Review metadata
BlitzOS fork only. Delete this section before sending the PR to
LodyAI/Lody.blitz/seam-2-sidebar-suppression-propsf3474894 (the pinned upstream commit)