What problem are you trying to solve?
CONTEXT.md now defines Layout:
Layout:
One of the arrangements in which the Picker draws Projects: the Grouped Layout puts them under Kind headers, the List Layout in one flat run.
The picker package uses that name for something else. After #44 it holds three things whose names read backwards against the glossary:
| Identifier |
What it actually is |
Layout (struct) |
per-frame sizing: NameWidth, StatusWidth, TimeWidth, ListWidth, PreviewWidth, ListHeight, ShowPreview, ShowLegend, ShowKeys |
ComputeLayout |
computes that sizing, not the arrangement |
LayoutStyle (+ LayoutGrouped, LayoutList) |
the Layout in the glossary's sense |
So the domain term is taken by the frame geometry, and the actual Layout had to be called LayoutStyle to get out of its way. A reader who starts from CONTEXT.md will look for the arrangement under Layout and find column widths.
Proposed solution
Give the arrangement the glossary's name and name the sizing struct for what it is:
LayoutStyle → Layout, with LayoutGrouped / LayoutList unchanged
Layout (struct) → Metrics (or Frame / Geometry)
ComputeLayout → ComputeMetrics
Options.Layout keeps its name and changes type
Config keeps picker.layout with its "grouped" / "list" values: this is an internal naming change with no user-visible effect.
Alternatives considered
- Leave it. The names work, they just read backwards against the glossary. The cost is paid by every future reader who trusts
CONTEXT.md.
- Rename the glossary term instead (e.g. Arrangement, Presentation) so
Layout can stay with the sizing struct. Worse: "layout" is the word the config key, the README and the original issue all use, and it is the term users see.
Additional context
What problem are you trying to solve?
CONTEXT.mdnow defines Layout:The
pickerpackage uses that name for something else. After #44 it holds three things whose names read backwards against the glossary:Layout(struct)NameWidth,StatusWidth,TimeWidth,ListWidth,PreviewWidth,ListHeight,ShowPreview,ShowLegend,ShowKeysComputeLayoutLayoutStyle(+LayoutGrouped,LayoutList)So the domain term is taken by the frame geometry, and the actual Layout had to be called
LayoutStyleto get out of its way. A reader who starts fromCONTEXT.mdwill look for the arrangement underLayoutand find column widths.Proposed solution
Give the arrangement the glossary's name and name the sizing struct for what it is:
LayoutStyle→Layout, withLayoutGrouped/LayoutListunchangedLayout(struct) →Metrics(orFrame/Geometry)ComputeLayout→ComputeMetricsOptions.Layoutkeeps its name and changes typeConfig keeps
picker.layoutwith its"grouped"/"list"values: this is an internal naming change with no user-visible effect.Alternatives considered
CONTEXT.md.Layoutcan stay with the sizing struct. Worse: "layout" is the word the config key, the README and the original issue all use, and it is the term users see.Additional context
internal/picker(layout.go,picker.go,model.go,view.go,view_list.go, plusinternal/jumpand the picker tests), which is a separate change from adding the Layout.internal/pickeris internal, so nothing outside the module depends on these names.