MCPcopy Index your code
hub / github.com/docker/docker-agent / renderEmptyState

Method renderEmptyState

pkg/tui/dialog/picker.go:265–268  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Empty / error placeholder rendering ----------------------------------------------------------------------------- renderEmptyState fills the scrollview with a centred italic placeholder.

(message string, contentWidth int)

Source from the content-addressed store, hash-verified

263
264// renderEmptyState fills the scrollview with a centred italic placeholder.
265func (p *pickerCore) renderEmptyState(message string, contentWidth int) string {
266 style := styles.DialogContentStyle.Italic(true).Align(lipgloss.Center).Width(contentWidth)
267 return p.renderPlaceholder(style.Render(message))
268}
269
270// renderErrorState fills the scrollview with a centred error message.
271func (p *pickerCore) renderErrorState(message string, contentWidth int) string {

Callers 4

ViewMethod · 0.80
ViewMethod · 0.80
ViewMethod · 0.80
ViewMethod · 0.80

Calls 3

renderPlaceholderMethod · 0.95
RenderMethod · 0.65
WidthMethod · 0.45

Tested by

no test coverage detected