DataView: renderer overflows its container by the height of the toolbar
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- documentation, frontend
Línea de trabajo
Empieza en data-view.tsx alrededor de la línea 332 y en las reglas .listRoot y .timelineRoot de data-view.module.css; después inspecciona apps/www/src/components/dataview-demo.tsx alrededor de la línea 196 y las demos relacionadas de la documentación. Añade el contenedor de layout compartido y actualiza la prueba estructural, la Slots table y la nota de migración; estará terminado cuando ambos renderizadores permanezcan dentro de contenedores de altura fija, incluida la demo de timeline.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Put a DataView with a DataView.Toolbar inside a fixed-height container and the renderer spills out of the bottom by exactly the toolbar's height. It has always done this — it only became visible when the docs moved code blocks and demos onto a lighter surface colour, because the overhanging strip is opaque and now paints over what's underneath it.
On /docs/dataview five of the six demos overflow, by 37.5px, 49px, 40px, 41px and 41px. Each figure matches its own toolbar. /docs/dataview/timeline has one at 99px.
Why it happens
DataView renders no DOM of its own — it is a context provider and nothing else (data-view.tsx:332):
return <DataViewContext value={contextValue}>{children}</DataViewContext>;
So DataView.Toolbar and DataView.List end up as siblings inside whatever element the consumer supplies. There is no shared layout box, and the renderer has no way to ask for "the space the toolbar didn't take". Both renderers reach for height: 100% instead:
data-view.module.css:132-137—.listRootdata-view.module.css:351-358—.timelineRoot
That percentage resolves against the consumer's box, which is also holding the toolbar. Toolbar plus a full-height renderer is always taller than the box by the toolbar's height.
The docs demos hit it because they size the container directly (apps/www/src/components/dataview-demo.tsx:196, and nine more like it):
<div style={{ height: 400 }}>
<DataView …>
<DataView.Toolbar>…</DataView.Toolbar>
<DataView.List variant='table' columns={tableColumns} />
Anyone putting a DataView in a sized box hits the same thing. The toolbar's height is content-driven — it grows when filter chips wrap — so a consumer cannot correct for it by padding their container either.
Suggested approach
Give DataView a layout container and let flexbox do the arithmetic:
return (
<DataViewContext value={contextValue}>
<div className={styles.root} data-slot='data-view'>{children}</div>
</DataViewContext>
);
.root {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
}
.listRoot,
.timelineRoot {
flex: 1;
min-height: 0; /* replaces height: 100% */
}
min-height: 0 is the part that matters. A flex item defaults to min-height: auto and refuses to shrink below its content, which is what turns the renderer's own overflow: auto from scrolling into pushing the box open.
This fixes both renderers at once, keeps working when the parent has no fixed height, and means a future renderer gets it for free. The demos' height: 400 wrappers should then work untouched.
Trade-off
It adds a DOM node. Anything relying on the toolbar and renderer being direct children of the consumer's element breaks, so this wants a migration note rather than a patch release. It also needs the data-slot above so it matches the slot convention, a row in the DataView Slots table, and any structural test updated.
Worth ruling out while we're here: documenting "your container must be a flex column" instead of adding the wrapper leaves block containers silently broken, and the failure mode is this same invisible overflow. Subtracting the toolbar with calc() needs a constant we do not have. Measuring the toolbar with a ResizeObserver puts JS on flexbox's job and flashes on first paint.
- Lenguaje dominante
- TypeScript
- Estrellas
- 69
- Forks
- 13
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de raystack/apsara
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
DataView: don't offer select/multiselect filters with empty filterOptionsPosiblemente ocupada @rohanchkrabrty la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
Todos los issues de raystack/apsara
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openclaw/openclaw#168089 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
✨ enhancement needs-discussion
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferencePosiblemente ocupada @alok-108 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/playwright#43263 ·
Los mantenedores suelen responder en 1 día
-
area:studio type:security
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día