Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/tui/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ func joinAccess(pane, access string, termWidth int) string {
if access == "" || termWidth < accessMinTerminal {
return pane
}
return lipgloss.JoinHorizontal(lipgloss.Top, pane, " ", access)
return lipgloss.JoinHorizontal(lipgloss.Top, pane, lipgloss.NewStyle().MarginLeft(2).Render(access))
}
11 changes: 5 additions & 6 deletions internal/tui/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func (f *fields) gap() { f.rows = append(f.rows, []string{"", "", ""}) }
// cell, which a note never uses, so it cannot collide with a focus cursor.
const noteMark = "\x00note"

// note adds a dim remark under the row above, starting at the label column
// rather than the value column. It is a remark about the field, not
// another value for it, so it reads wrong indented under the value.
// note adds a dim remark under the row above, starting at the value column,
// the same offset as hint. Both are gray helper text; a shared indent keeps
// them lined up regardless of which one a screen uses.
//
// A note is drawn as its own full-width line, not a table row. A lipgloss
// table cannot span columns, and note text is wider than the label cell, so
Expand Down Expand Up @@ -89,9 +89,8 @@ func (f *fields) String() string {
for _, r := range f.rows {
if r[0] == noteMark {
flush()
// Indented to the label column, so it lines up with the name of
// the field it is talking about.
out = append(out, strings.Repeat(" ", fieldMarkerWidth)+dimStyle.Render(r[1]))
// Indented to the value column, so it lines up with hint text.
out = append(out, strings.Repeat(" ", fieldValueColumn)+dimStyle.Render(r[1]))
continue
}
run = append(run, r)
Expand Down
Loading