@lotics/ui 43.3.1 → 43.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/composition.md +9 -0
- package/package.json +1 -1
- package/src/detail_row.tsx +10 -1
package/docs/composition.md
CHANGED
|
@@ -884,6 +884,15 @@ gate's SCOPE, once** — never prose beside the button, never revealed only on p
|
|
|
884
884
|
the row is filled. In a label-left grid, ONE FIELD PER ROW is not a failure to compact; it is
|
|
885
885
|
the only shape that keeps the column a reader scans. Both attempts are recorded here so nobody
|
|
886
886
|
re-runs them.
|
|
887
|
+
**A spread `DetailRow` gives its VALUE the squeeze, never its label.** The two share one flex
|
|
888
|
+
row, so whichever of them cannot shrink forces the other to. A flex child defaults to
|
|
889
|
+
`min-width: auto`, which floors the value at its longest word — and the label, having no floor
|
|
890
|
+
of its own, absorbs everything left: on a narrow register a two-word label collapsed to a 4px
|
|
891
|
+
column 200px tall, one character per line. The `minWidth: 0` on the value is what stops it, and
|
|
892
|
+
it is load-bearing rather than housekeeping. **The probe generalises past this component**:
|
|
893
|
+
wherever a fixed-ish label shares a row with a `flex: 1` value, measure the LABEL's width and
|
|
894
|
+
height across rows whose values differ in length — a label whose box changes shape from row to
|
|
895
|
+
row is the signature, and it is invisible at any width where every value happens to fit.
|
|
887
896
|
The other caveat: that research studies COMPLETION forms, where the failure mode is a skipped
|
|
888
897
|
required field, while a record page is read-mostly.
|
|
889
898
|
A SUMMARY belongs to the RECORD, not to a section. The highlights-panel precedent (a strip of
|
package/package.json
CHANGED
package/src/detail_row.tsx
CHANGED
|
@@ -252,7 +252,16 @@ const styles = StyleSheet.create({
|
|
|
252
252
|
// is the one that gives way, because it is the one that is long. Both stay
|
|
253
253
|
// shrinkable on purpose: a long LABEL against a short value has to wrap too,
|
|
254
254
|
// and pinning the label unshrinkable would just overflow the row the other way.
|
|
255
|
-
|
|
255
|
+
// Spread mode's label. It does NOT shrink, and that is the whole rule: both
|
|
256
|
+
// items in this row are floorless under React Native Web (which defaults flex
|
|
257
|
+
// children to `min-width: 0`, unlike the web's `auto`), so with shrink on both
|
|
258
|
+
// the flex algorithm splits the deficit and the LABEL loses — measured on a
|
|
259
|
+
// narrow register, a two-word column name collapsed to a 4px box 200px tall,
|
|
260
|
+
// one character per line, while its neighbour with a short value measured a
|
|
261
|
+
// clean 251x20. A label the reader cannot finish makes the row meaningless,
|
|
262
|
+
// and the value beside it wraps for free (`spreadValue` already carries the
|
|
263
|
+
// `minWidth: 0` that lets it), so the value is the one that gives way.
|
|
264
|
+
flexLabel: { flexGrow: 1, flexShrink: 0, flexBasis: "auto" },
|
|
256
265
|
// `center` is what makes a WRAPPED label align sanely, and it does both jobs
|
|
257
266
|
// with no measurement: a one-line label is shorter than the control band, so
|
|
258
267
|
// it centers on the control line (the alignment law); a wrapped label is as
|