Documentation
¶
Index ¶
- func RenderAssigneeText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
- func RenderAuthorText(task *taskpkg.Task, colors *config.ColorConfig) tview.Primitive
- func RenderBlocksColumn(blocked []*taskpkg.Task) tview.Primitive
- func RenderCreatedText(task *taskpkg.Task, colors *config.ColorConfig) tview.Primitive
- func RenderDependsOnColumn(task *taskpkg.Task, taskStore store.Store) tview.Primitive
- func RenderDueText(task *taskpkg.Task, colors *config.ColorConfig) tview.Primitive
- func RenderPointsText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
- func RenderPriorityText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
- func RenderRecurrenceText(task *taskpkg.Task, colors *config.ColorConfig) tview.Primitive
- func RenderStatusText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
- func RenderTagsColumn(task *taskpkg.Task) tview.Primitive
- func RenderTitleText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
- func RenderTypeText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
- func RenderUpdatedText(task *taskpkg.Task, colors *config.ColorConfig) tview.Primitive
- type Base
- func (b *Base) GetPrimitive() tview.Primitive
- func (b *Base) GetTask() *taskpkg.Task
- func (b *Base) IsFullscreen() bool
- func (b *Base) SetFallbackTask(task *taskpkg.Task)
- func (b *Base) SetFocusSetter(setter func(tview.Primitive))
- func (b *Base) SetFullscreenChangeHandler(handler func(isFullscreen bool))
- func (b *Base) SetTaskController(tc *controller.TaskController)
- type FieldRenderContext
- type LayoutPlan
- type PlannedSection
- type RenderMode
- type SectionID
- type SectionInput
- type TaskDetailView
- func (tv *TaskDetailView) EnterFullscreen()
- func (tv *TaskDetailView) ExitFullscreen()
- func (tv *TaskDetailView) GetActionRegistry() *controller.ActionRegistry
- func (tv *TaskDetailView) GetViewDescription() string
- func (tv *TaskDetailView) GetViewID() model.ViewID
- func (tv *TaskDetailView) GetViewName() string
- func (tv *TaskDetailView) OnBlur()
- func (tv *TaskDetailView) OnFocus()
- type TaskEditView
- func (ev *TaskEditView) CycleFieldValueDown() bool
- func (ev *TaskEditView) CycleFieldValueUp() bool
- func (ev *TaskEditView) EnterFullscreen()
- func (ev *TaskEditView) ExitFullscreen()
- func (ev *TaskEditView) FocusNextField() bool
- func (ev *TaskEditView) FocusPrevField() bool
- func (ev *TaskEditView) GetActionRegistry() *controller.ActionRegistry
- func (ev *TaskEditView) GetEditedDescription() string
- func (ev *TaskEditView) GetEditedTags() []string
- func (ev *TaskEditView) GetEditedTitle() string
- func (ev *TaskEditView) GetFocusedField() model.EditField
- func (ev *TaskEditView) GetTask() *taskpkg.Task
- func (ev *TaskEditView) GetViewDescription() string
- func (ev *TaskEditView) GetViewID() model.ViewID
- func (ev *TaskEditView) GetViewName() string
- func (ev *TaskEditView) HideDescriptionEditor()
- func (ev *TaskEditView) HideTitleEditor()
- func (ev *TaskEditView) IsDescOnly() bool
- func (ev *TaskEditView) IsDescriptionEditing() bool
- func (ev *TaskEditView) IsDescriptionTextAreaFocused() bool
- func (ev *TaskEditView) IsEditFieldFocused() bool
- func (ev *TaskEditView) IsRecurrenceValueFocused() bool
- func (ev *TaskEditView) IsTagsOnly() bool
- func (ev *TaskEditView) IsTagsTextAreaFocused() bool
- func (ev *TaskEditView) IsTitleEditing() bool
- func (ev *TaskEditView) IsTitleInputFocused() bool
- func (ev *TaskEditView) IsValid() bool
- func (ev *TaskEditView) MoveRecurrencePartLeft() bool
- func (ev *TaskEditView) MoveRecurrencePartRight() bool
- func (ev *TaskEditView) OnBlur()
- func (ev *TaskEditView) OnFocus()
- func (ev *TaskEditView) SetAssigneeSaveHandler(handler func(string))
- func (ev *TaskEditView) SetDescOnly(descOnly bool)
- func (ev *TaskEditView) SetDescriptionCancelHandler(handler func())
- func (ev *TaskEditView) SetDescriptionSaveHandler(handler func(string))
- func (ev *TaskEditView) SetDueSaveHandler(handler func(string))
- func (ev *TaskEditView) SetFocusedField(field model.EditField)
- func (ev *TaskEditView) SetPointsSaveHandler(handler func(int))
- func (ev *TaskEditView) SetPrioritySaveHandler(handler func(int))
- func (ev *TaskEditView) SetRecurrenceSaveHandler(handler func(string))
- func (ev *TaskEditView) SetStatusSaveHandler(handler func(string))
- func (ev *TaskEditView) SetTagsCancelHandler(handler func())
- func (ev *TaskEditView) SetTagsOnly(tagsOnly bool)
- func (ev *TaskEditView) SetTagsSaveHandler(handler func(string))
- func (ev *TaskEditView) SetTitleCancelHandler(handler func())
- func (ev *TaskEditView) SetTitleChangeHandler(handler func(string))
- func (ev *TaskEditView) SetTitleSaveHandler(handler func(string))
- func (ev *TaskEditView) SetTypeSaveHandler(handler func(string))
- func (ev *TaskEditView) ShowDescriptionEditor() tview.Primitive
- func (ev *TaskEditView) ShowTagsEditor() tview.Primitive
- func (ev *TaskEditView) ShowTitleEditor() tview.Primitive
- func (ev *TaskEditView) UpdateHeaderForField(field model.EditField)
- func (ev *TaskEditView) ValidationErrors() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderAssigneeText ¶
func RenderAssigneeText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
RenderAssigneeText renders an assignee field as read-only text
func RenderAuthorText ¶ added in v0.3.1
RenderAuthorText renders the author field as read-only text
func RenderBlocksColumn ¶ added in v0.3.1
RenderBlocksColumn renders the "Blocks" column showing downstream dependents. Returns nil when blocked is empty, so the caller can skip adding it.
func RenderCreatedText ¶ added in v0.3.1
RenderCreatedText renders the created-at field as read-only text
func RenderDependsOnColumn ¶ added in v0.3.1
RenderDependsOnColumn renders the "Depends On" column showing upstream dependencies. Returns nil when the task has no dependencies, so the caller can skip adding it.
func RenderDueText ¶ added in v0.3.1
RenderDueText renders the due date field
func RenderPointsText ¶
func RenderPointsText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
RenderPointsText renders a points field as read-only text
func RenderPriorityText ¶
func RenderPriorityText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
RenderPriorityText renders a priority field as read-only text
func RenderRecurrenceText ¶ added in v0.3.1
RenderRecurrenceText renders the recurrence field
func RenderStatusText ¶
func RenderStatusText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
RenderStatusText renders a status field as read-only text
func RenderTagsColumn ¶
RenderTagsColumn renders the tags column with a label row on top.
func RenderTitleText ¶
func RenderTitleText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
RenderTitleText renders a title as read-only text
func RenderTypeText ¶
func RenderTypeText(task *taskpkg.Task, ctx FieldRenderContext) tview.Primitive
RenderTypeText renders a type field as read-only text
func RenderUpdatedText ¶ added in v0.3.1
RenderUpdatedText renders the updated-at field as read-only text
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base contains shared state and methods for task detail/edit views. Both TaskDetailView and TaskEditView embed this struct to share common functionality.
func (*Base) GetPrimitive ¶
GetPrimitive returns the root tview primitive
func (*Base) IsFullscreen ¶
IsFullscreen reports whether the view is currently in fullscreen mode
func (*Base) SetFallbackTask ¶
SetFallbackTask sets a task to render when it does not yet exist in the store (draft mode)
func (*Base) SetFocusSetter ¶
SetFocusSetter sets the callback for requesting focus changes
func (*Base) SetFullscreenChangeHandler ¶
SetFullscreenChangeHandler sets the callback for when fullscreen state changes
func (*Base) SetTaskController ¶
func (b *Base) SetTaskController(tc *controller.TaskController)
SetTaskController sets the task controller for edit session management
type FieldRenderContext ¶
type FieldRenderContext struct {
Mode RenderMode
FocusedField model.EditField
Colors *config.ColorConfig
}
FieldRenderContext provides context for rendering field primitives
type LayoutPlan ¶ added in v0.3.1
type LayoutPlan struct {
Sections []PlannedSection
Gaps []int // len = len(Sections) - 1; gap[i] is between Sections[i] and Sections[i+1]
}
LayoutPlan is the output of the layout algorithm.
func CalculateMetadataLayout ¶ added in v0.3.1
func CalculateMetadataLayout(availableWidth int, sections []SectionInput) LayoutPlan
CalculateMetadataLayout computes which sections to show and how to distribute horizontal space among them.
Algorithm:
- Include only sections that have content.
- Check whether all included sections + 1-char minimum gaps fit.
- If not, hide right-side sections in order: Tags → Blocks → DependsOn.
- Distribute remaining free space evenly across gaps.
- Any remainder goes to the "bridge gap" (between last left-side and first right-side section). If no right-side sections remain, remainder goes to the last gap.
type PlannedSection ¶ added in v0.3.1
PlannedSection is a section that made it into the final layout.
type RenderMode ¶
type RenderMode int
RenderMode indicates whether we're rendering for view or edit mode
const ( RenderModeView RenderMode = iota RenderModeEdit )
type SectionID ¶ added in v0.3.1
type SectionID int
SectionID identifies a metadata section in left-to-right display order.
type SectionInput ¶ added in v0.3.1
type SectionInput struct {
ID SectionID
Width int // minimum width this section needs
HasContent bool // false = skip entirely (optional section with no data)
}
SectionInput describes one candidate section for the layout.
func BuildSectionInputs ¶ added in v0.3.1
func BuildSectionInputs(task *taskpkg.Task, hasBlocks bool) []SectionInput
BuildSectionInputs creates the standard section input list for a task, using the constants from config/dimensions.go.
type TaskDetailView ¶
type TaskDetailView struct {
Base // Embed shared state
// contains filtered or unexported fields
}
TaskDetailView renders a full task with all details in read-only mode.
func NewTaskDetailView ¶
func NewTaskDetailView(taskStore store.Store, taskID string, readOnly bool, imageManager *navtview.ImageManager, mermaidOpts *nav.MermaidOptions) *TaskDetailView
NewTaskDetailView creates a task detail view. When readOnly is true, only fullscreen is available — no editing actions.
func (*TaskDetailView) EnterFullscreen ¶
func (tv *TaskDetailView) EnterFullscreen()
EnterFullscreen switches the view to fullscreen mode (description only)
func (*TaskDetailView) ExitFullscreen ¶
func (tv *TaskDetailView) ExitFullscreen()
ExitFullscreen restores the regular task detail layout
func (*TaskDetailView) GetActionRegistry ¶
func (tv *TaskDetailView) GetActionRegistry() *controller.ActionRegistry
GetActionRegistry returns the view's action registry
func (*TaskDetailView) GetViewDescription ¶ added in v0.3.1
func (tv *TaskDetailView) GetViewDescription() string
GetViewDescription returns the view description for the header info section
func (*TaskDetailView) GetViewID ¶
func (tv *TaskDetailView) GetViewID() model.ViewID
GetViewID returns the view identifier
func (*TaskDetailView) GetViewName ¶ added in v0.3.1
func (tv *TaskDetailView) GetViewName() string
GetViewName returns the view name for the header info section
func (*TaskDetailView) OnBlur ¶
func (tv *TaskDetailView) OnBlur()
OnBlur is called when the view becomes inactive
func (*TaskDetailView) OnFocus ¶
func (tv *TaskDetailView) OnFocus()
OnFocus is called when the view becomes active
type TaskEditView ¶
type TaskEditView struct {
Base // Embed shared state
// contains filtered or unexported fields
}
TaskEditView renders a task in full edit mode with all fields editable.
func NewTaskEditView ¶
func NewTaskEditView(taskStore store.Store, taskID string, imageManager *navtview.ImageManager) *TaskEditView
NewTaskEditView creates a task edit view
func (*TaskEditView) CycleFieldValueDown ¶
func (ev *TaskEditView) CycleFieldValueDown() bool
CycleFieldValueDown cycles the currently focused field's value downward (next)
func (*TaskEditView) CycleFieldValueUp ¶
func (ev *TaskEditView) CycleFieldValueUp() bool
CycleFieldValueUp cycles the currently focused field's value upward (previous)
func (*TaskEditView) EnterFullscreen ¶
func (ev *TaskEditView) EnterFullscreen()
EnterFullscreen switches the view to fullscreen mode
func (*TaskEditView) ExitFullscreen ¶
func (ev *TaskEditView) ExitFullscreen()
ExitFullscreen restores the regular task detail layout
func (*TaskEditView) FocusNextField ¶
func (ev *TaskEditView) FocusNextField() bool
FocusNextField advances to the next field in edit order
func (*TaskEditView) FocusPrevField ¶
func (ev *TaskEditView) FocusPrevField() bool
FocusPrevField moves to the previous field in edit order
func (*TaskEditView) GetActionRegistry ¶
func (ev *TaskEditView) GetActionRegistry() *controller.ActionRegistry
GetActionRegistry returns the view's action registry
func (*TaskEditView) GetEditedDescription ¶
func (ev *TaskEditView) GetEditedDescription() string
GetEditedDescription returns the current description text in the editor
func (*TaskEditView) GetEditedTags ¶ added in v0.3.1
func (ev *TaskEditView) GetEditedTags() []string
GetEditedTags returns the current tags from the tags editor, split by whitespace.
func (*TaskEditView) GetEditedTitle ¶
func (ev *TaskEditView) GetEditedTitle() string
GetEditedTitle returns the current title in the editor
func (*TaskEditView) GetFocusedField ¶
func (ev *TaskEditView) GetFocusedField() model.EditField
GetFocusedField returns the currently focused field
func (*TaskEditView) GetTask ¶
func (ev *TaskEditView) GetTask() *taskpkg.Task
GetTask returns the appropriate task based on mode (prioritizes editing copy)
func (*TaskEditView) GetViewDescription ¶ added in v0.3.1
func (ev *TaskEditView) GetViewDescription() string
GetViewDescription returns the view description for the header info section
func (*TaskEditView) GetViewID ¶
func (ev *TaskEditView) GetViewID() model.ViewID
GetViewID returns the view identifier
func (*TaskEditView) GetViewName ¶ added in v0.3.1
func (ev *TaskEditView) GetViewName() string
GetViewName returns the view name for the header info section
func (*TaskEditView) HideDescriptionEditor ¶
func (ev *TaskEditView) HideDescriptionEditor()
HideDescriptionEditor is a no-op in edit mode
func (*TaskEditView) HideTitleEditor ¶
func (ev *TaskEditView) HideTitleEditor()
HideTitleEditor is a no-op in edit mode (title always visible)
func (*TaskEditView) IsDescOnly ¶ added in v0.3.1
func (ev *TaskEditView) IsDescOnly() bool
IsDescOnly returns whether the view is in description-only edit mode.
func (*TaskEditView) IsDescriptionEditing ¶
func (ev *TaskEditView) IsDescriptionEditing() bool
IsDescriptionEditing returns whether the description is being edited
func (*TaskEditView) IsDescriptionTextAreaFocused ¶
func (ev *TaskEditView) IsDescriptionTextAreaFocused() bool
IsDescriptionTextAreaFocused returns whether the description text area has focus
func (*TaskEditView) IsEditFieldFocused ¶
func (ev *TaskEditView) IsEditFieldFocused() bool
IsEditFieldFocused returns whether any editable field has tview focus
func (*TaskEditView) IsRecurrenceValueFocused ¶ added in v0.3.1
func (ev *TaskEditView) IsRecurrenceValueFocused() bool
IsRecurrenceValueFocused returns true when the recurrence field's value part is active.
func (*TaskEditView) IsTagsOnly ¶ added in v0.3.1
func (ev *TaskEditView) IsTagsOnly() bool
IsTagsOnly returns whether the view is in tags-only edit mode.
func (*TaskEditView) IsTagsTextAreaFocused ¶ added in v0.3.1
func (ev *TaskEditView) IsTagsTextAreaFocused() bool
IsTagsTextAreaFocused returns whether the tags text area currently has focus
func (*TaskEditView) IsTitleEditing ¶
func (ev *TaskEditView) IsTitleEditing() bool
IsTitleEditing returns whether the title is being edited (always true in edit mode)
func (*TaskEditView) IsTitleInputFocused ¶
func (ev *TaskEditView) IsTitleInputFocused() bool
IsTitleInputFocused returns whether the title input has focus
func (*TaskEditView) IsValid ¶
func (ev *TaskEditView) IsValid() bool
IsValid returns true if the task passes all validation checks
func (*TaskEditView) MoveRecurrencePartLeft ¶ added in v0.3.1
func (ev *TaskEditView) MoveRecurrencePartLeft() bool
MoveRecurrencePartLeft moves the recurrence editor to the frequency part. Returns true if the recurrence field is focused and the navigation was handled.
func (*TaskEditView) MoveRecurrencePartRight ¶ added in v0.3.1
func (ev *TaskEditView) MoveRecurrencePartRight() bool
MoveRecurrencePartRight moves the recurrence editor to the value part. Returns true if the recurrence field is focused and the navigation was handled.
func (*TaskEditView) OnBlur ¶
func (ev *TaskEditView) OnBlur()
OnBlur is called when the view becomes inactive
func (*TaskEditView) OnFocus ¶
func (ev *TaskEditView) OnFocus()
OnFocus is called when the view becomes active
func (*TaskEditView) SetAssigneeSaveHandler ¶
func (ev *TaskEditView) SetAssigneeSaveHandler(handler func(string))
SetAssigneeSaveHandler sets the callback for when assignee is saved
func (*TaskEditView) SetDescOnly ¶ added in v0.3.1
func (ev *TaskEditView) SetDescOnly(descOnly bool)
SetDescOnly enables description-only edit mode where metadata is read-only.
func (*TaskEditView) SetDescriptionCancelHandler ¶
func (ev *TaskEditView) SetDescriptionCancelHandler(handler func())
SetDescriptionCancelHandler sets the callback for when description editing is cancelled
func (*TaskEditView) SetDescriptionSaveHandler ¶
func (ev *TaskEditView) SetDescriptionSaveHandler(handler func(string))
SetDescriptionSaveHandler sets the callback for when description is saved
func (*TaskEditView) SetDueSaveHandler ¶ added in v0.3.1
func (ev *TaskEditView) SetDueSaveHandler(handler func(string))
SetDueSaveHandler sets the callback for when due date is saved
func (*TaskEditView) SetFocusedField ¶
func (ev *TaskEditView) SetFocusedField(field model.EditField)
SetFocusedField changes the focused field and re-renders
func (*TaskEditView) SetPointsSaveHandler ¶
func (ev *TaskEditView) SetPointsSaveHandler(handler func(int))
SetPointsSaveHandler sets the callback for when story points is saved
func (*TaskEditView) SetPrioritySaveHandler ¶
func (ev *TaskEditView) SetPrioritySaveHandler(handler func(int))
SetPrioritySaveHandler sets the callback for when priority is saved
func (*TaskEditView) SetRecurrenceSaveHandler ¶ added in v0.3.1
func (ev *TaskEditView) SetRecurrenceSaveHandler(handler func(string))
SetRecurrenceSaveHandler sets the callback for when recurrence is saved
func (*TaskEditView) SetStatusSaveHandler ¶
func (ev *TaskEditView) SetStatusSaveHandler(handler func(string))
SetStatusSaveHandler sets the callback for when status is saved
func (*TaskEditView) SetTagsCancelHandler ¶ added in v0.3.1
func (ev *TaskEditView) SetTagsCancelHandler(handler func())
SetTagsCancelHandler sets the callback for when tags editing is cancelled
func (*TaskEditView) SetTagsOnly ¶ added in v0.3.1
func (ev *TaskEditView) SetTagsOnly(tagsOnly bool)
SetTagsOnly enables tags-only edit mode where metadata is read-only and the description area is replaced with a tags textarea.
func (*TaskEditView) SetTagsSaveHandler ¶ added in v0.3.1
func (ev *TaskEditView) SetTagsSaveHandler(handler func(string))
SetTagsSaveHandler sets the callback for when tags are saved
func (*TaskEditView) SetTitleCancelHandler ¶
func (ev *TaskEditView) SetTitleCancelHandler(handler func())
SetTitleCancelHandler sets the callback for when title editing is cancelled
func (*TaskEditView) SetTitleChangeHandler ¶
func (ev *TaskEditView) SetTitleChangeHandler(handler func(string))
SetTitleChangeHandler sets the callback for when title changes
func (*TaskEditView) SetTitleSaveHandler ¶
func (ev *TaskEditView) SetTitleSaveHandler(handler func(string))
SetTitleSaveHandler sets the callback for when title is saved
func (*TaskEditView) SetTypeSaveHandler ¶
func (ev *TaskEditView) SetTypeSaveHandler(handler func(string))
SetTypeSaveHandler sets the callback for when type is saved
func (*TaskEditView) ShowDescriptionEditor ¶
func (ev *TaskEditView) ShowDescriptionEditor() tview.Primitive
ShowDescriptionEditor displays the description text area
func (*TaskEditView) ShowTagsEditor ¶ added in v0.3.1
func (ev *TaskEditView) ShowTagsEditor() tview.Primitive
ShowTagsEditor displays the tags text area and returns the primitive to focus
func (*TaskEditView) ShowTitleEditor ¶
func (ev *TaskEditView) ShowTitleEditor() tview.Primitive
ShowTitleEditor displays the title input field
func (*TaskEditView) UpdateHeaderForField ¶
func (ev *TaskEditView) UpdateHeaderForField(field model.EditField)
UpdateHeaderForField updates the registry with field-specific actions
func (*TaskEditView) ValidationErrors ¶ added in v0.4.0
func (ev *TaskEditView) ValidationErrors() []string
ValidationErrors returns the current list of validation error messages.