DashboardLayout: sticky sidebar sizes itself from sidebarHeight independently of sidebarTopOffset, so any non-zero offset pushes the panel's bottom off-viewport
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
DashboardLayout pins its sticky sidebar at sidebarTopOffset but sizes it from sidebarHeight, and the two are computed independently. sidebarHeight defaults to 100vh, so any caller that supplies a top offset and leaves the height alone gets a panel exactly sidebarTopOffset taller than the space it can occupy.
Because the panel is position: sticky, that overflow is not recoverable by scrolling: once pinned, its bottom sidebarTopOffset worth of content - including the end of its own internal scroll container - sits permanently below the viewport, and its header scrolls up under the page's navbar.
Where
DashboardLayout, the desktop (non-mobile) branch:
<Box sx={{ width: sidebarWidth, flexShrink: 0, position: "sticky",
top: sidebarTopOffset, alignSelf: "flex-start",
height: sidebarHeight, maxHeight: sidebarHeight }}>
with
sidebarTopOffset = "0",
sidebarHeight = "100vh"
The default pair is self-consistent (offset 0, height 100vh). Every non-zero offset breaks it, and nothing in the types or at runtime says so.
Reproduce
Render DashboardLayout with sidebarTopOffset="64px" and no sidebarHeight (the natural call for any app with a fixed navbar), open the sidebar above the md breakpoint, and scroll the page down. The sidebar's header leaves the top of the viewport and its last 64px never becomes reachable.
Measured, rather than eyeballed:
const rect = stickyPanel.getBoundingClientRect();
rect.height // 1000 at a 1000px viewport
window.innerHeight - 64 // 936 - the space actually available
Suggested fix
Derive the default height from the offset the caller already gave:
sidebarHeight = `calc(100vh - ${sidebarTopOffset})`
An explicit sidebarHeight still wins, so this is backwards compatible for anyone who already worked around it, and it makes the zero-offset default behave exactly as it does today.
The alternative - documenting that callers must pass both - pushes the navbar height into two places in every consumer, where they can silently drift apart.
Consumer status
Worked around locally in layer5io/meshery-cloud#5992 by binding the navbar height once and deriving both props from it. That is a correct caller, not a fix: every other consumer that adopts sidebarTopOffset will hit the same thing first.
- Lingua principale
- TypeScript
- Stelle
- 140
- Fork
- 243
- Merge medio
- 8g 17h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di layer5io/sistent
-
InfoTooltip is not keyboard reachable and has no accessible nameForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
[UI] Permission Shield tooltip uses fixed `placement="top"` instead of adaptive placementForse già presa @dhruveshmishra l’ha presa 70 giorni fa. Apertacomponent/ui help wanted kind/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
layer5io/sistent#1772 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Barrel re-exports DateTimePickerProps from the optional peer @mui/x-date-pickers, so the type is `any` for consumers who skip itForse già presa @Valyrian-Code l’ha presa 80 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
layer5io/sistent#1749 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ESM build is not loadable by Node: extensionless 'lodash/debounce' specifier in dist/index.mjsForse di nuovo libera @Salmaan-M l’ha presa 84 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
layer5io/sistent#1739 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Modal hardcodes aria-labelledby and aria-describedby pointing to nonexistent element IDsForse già presa @PARTH-TUSSLE l’ha presa 4 giorni fa. Apertacomponent/ui kind/bug language/typescript
layer5io/sistent#1864 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di layer5io/sistent
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wormhole-foundation/wormhole#5062 ·
I maintainer di solito rispondono entro 1 giorno
-
internal os specific
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
frostney/GocciaScript#1688 ·
I maintainer di solito rispondono entro 1 giorno
-
integration:hermes
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
vectorize-io/hindsight#5592 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
vercel/streamdown#673 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
apache/rocketmq-dashboard#6712 ·
I maintainer di solito rispondono entro 3 giorni