Widgets for Creating Work Items
This module contains widgets used by the screen that allows users to create new work items.
CreateWorkItemProjectSelectionInput
- class CreateWorkItemProjectSelectionInput
Bases:
jiratui.widgets.commons.base.ProjectSelectionWidgetA Select widget for choosing the project for which we want to create a new work item.
Initialization
Initializes a ProjectSelectionWidget.
- Parameters:
mode – The field mode (CREATE or UPDATE)
field_id – Field identifier
title – Display title (defaults to field_id)
required – Whether the field is required
prompt – Custom prompt text (defaults based on required status)
original_value – Original value from Jira (UPDATE mode only)
field_supports_update – Whether field can be updated (UPDATE mode only)
CreateWorkItemIssueTypeSelectionInput
- class CreateWorkItemIssueTypeSelectionInput(options: list[tuple[str, str]])
Bases:
jiratui.widgets.commons.base.IssueTypeSelectionWidgetA Select widget for choosing the type of issue we want to create.
Initialization
Initializes an IssueTypeSelectionWidget.
- Parameters:
mode – The field mode (CREATE or UPDATE)
field_id – Field identifier
options – List of (display_name, value) tuples
title – Display title (defaults to field_id)
required – Whether the field is required
prompt – Custom prompt text
original_value – Original value from Jira (UPDATE mode only)
field_supports_update – Whether field can be updated (UPDATE mode only)
CreateWorkItemIssueSummaryField
- class CreateWorkItemIssueSummaryField(**kwargs)
Bases:
textual.widgets.InputAn Input widget for setting the summary field of the issue we want to create.
Initialization
Initialise the
Inputwidget.- Parameters:
value – An optional default value for the input.
placeholder – Optional placeholder text for the input.
highlighter – An optional highlighter for the input.
password – Flag to say if the field should obfuscate its content.
restrict – A regex to restrict character inputs.
type – The type of the input.
max_length – The maximum length of the input, or 0 for no maximum length.
suggester – [Suggester][textual.suggester.Suggester] associated with this input instance.
validators – An iterable of validators that the Input value will be checked against.
validate_on – Zero or more of the values “blur”, “changed”, and “submitted”, which determine when to do input validation. The default is to do validation for all messages.
valid_empty – Empty values are valid.
select_on_focus – Whether to select all text on focus.
name – Optional name for the input widget.
id – Optional ID for the widget.
classes – Optional initial classes for the widget.
disabled – Whether the input is disabled or not.
tooltip – Optional tooltip.
compact – Enable compact style (without borders).
CreateWorkItemParentKeyField
- class CreateWorkItemParentKeyField(value: str | None = None)
Bases:
textual.widgets.InputAn Input widget for setting the key of an issue that acts as a parent to the issue we want to create.
Initialization
Initialise the
Inputwidget.- Parameters:
value – An optional default value for the input.
placeholder – Optional placeholder text for the input.
highlighter – An optional highlighter for the input.
password – Flag to say if the field should obfuscate its content.
restrict – A regex to restrict character inputs.
type – The type of the input.
max_length – The maximum length of the input, or 0 for no maximum length.
suggester – [Suggester][textual.suggester.Suggester] associated with this input instance.
validators – An iterable of validators that the Input value will be checked against.
validate_on – Zero or more of the values “blur”, “changed”, and “submitted”, which determine when to do input validation. The default is to do validation for all messages.
valid_empty – Empty values are valid.
select_on_focus – Whether to select all text on focus.
name – Optional name for the input widget.
id – Optional ID for the widget.
classes – Optional initial classes for the widget.
disabled – Whether the input is disabled or not.
tooltip – Optional tooltip.
compact – Enable compact style (without borders).
TextAreaTabbedContent
- class TextAreaTabbedContent(*args, **kwargs)
Bases:
textual.widgets.TabbedContentCustom TabbedContent with a key binding for editing content.
Initialization
Initialize a TabbedContent widgets.
- Parameters:
titles – Positional argument will be used as title.
initial – The id of the initial tab, or empty string to select the first tab.
name – The name of the tabbed content.
id – The ID of the tabbed content in the DOM.
classes – The CSS classes of the tabbed content.
disabled – Whether the tabbed content is disabled or not.
TextAreaTabPane
- class TextAreaTabPane(title: str, widget: jiratui.widgets.commons.adf.ADFMarkdownTextAreaWidget | jiratui.widgets.commons.widgets.PlainTextTextAreaWidget, **kwargs)
Bases:
textual.widgets.TabPaneA custom TabPane that contains either ADFMarkdownTextAreaWidget or PlainTextTextAreaWidget as its child.
Initialization
Initialize a TabPane.
- Parameters:
title – Title of the TabPane (will be displayed in a tab label). *children: Widget to go inside the TabPane.
name – Optional name for the TabPane.
id – Optional ID for the TabPane.
classes – Optional initial classes for the widget.
disabled – Whether the TabPane is disabled or not.