💡 alignContent for cross-axis distribution of flex lines
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- cli
Línea de trabajo
Comienza con test/align-content.test.ts e inspecciona las estructuras de layout de clay/clay.h incluidas como vendored y el pase de layout que gestiona las líneas ajustadas. Revisa el trabajo de alineación de literales de cadena en #42 y la dependencia del ajuste de varias líneas en #63. Se considera terminado cuando las variantes de alignContent solicitadas distribuyen varias líneas flex como se describe, incluido el ejemplo de flex-end, sin posicionamiento del lado de JS.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem?
Once a container can wrap into multiple flex lines, there's no way to distribute those lines along the cross axis—they pack to the start. With a 2-wide × 6-tall wrap container holding four single-cell children (two lines of two), the lines sit at the top (rows 0-1), with no way to push them to the end, center them, or space them out.
Describe the solution you'd like
An alignContent layout key that distributes free cross-axis space among the flex lines. For the example, alignContent: "flex-end" should push the two lines to the bottom (rows 4-5).
open("root", {
layout: {
direction: "ltr",
flexWrap: "wrap",
alignContent: "flex-end", // "flex-start" (default) | "flex-end" | "center" | "space-*" | "stretch"
},
});
alignContent should mirror the CSS align-content property. It's inert until there are multiple flex lines, so it depends on multi-line wrapping (#63).
Describe alternatives you've considered
Without renderer support, the only option is to compute line breaks and cross-axis offsets in JS and emit absolutely-positioned rows—which duplicates the layout engine's line-breaking and can't react to a resize.
Additional context
Failing test case on nm/repro/align-content (test · diff).
Clay's Clay_ChildAlignment (in the vendored clay/clay.h) offers only start/center/end on the cross axis; distributing whole flex lines—including the space-between/around/evenly/stretch variants—is a local addition to the layout pass. New string values should line up with the alignment string-literal refactor in #42 (re: #3).
- Lenguaje dominante
- TypeScript
- Estrellas
- 42
- Forks
- 2
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 12
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 bombshell-dev/tty
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bombshell-dev/tty#61 · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
bombshell-dev/tty#129 ·
-
question
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bombshell-dev/tty#83 · 2 comentarios ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bombshell-dev/tty#82 ·
Todos los issues de bombshell-dev/tty
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
fil-donadoni/tolaria#4409 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
corsairdev/corsair#1764 ·