Work Item Comments

Widgets for listing the comments associated to a work item and for deleting comments.

IssueCommentsWidget

class IssueCommentsWidget

Bases: textual.containers.VerticalScroll

A container for displaying the comments of a work item.

This widget is responsible for the following:

  • opening the modal screen that allows users to write comments.

  • processing the result from the modal screen and adding the comment to the work item via the API.

  • deleting comments from the work item via the API when the message jiratui.widgets.comments.comments.CommentCollapsible.Deleted is posted.

  • updating the list of comments when a comment is deleted.

See Also:

Initialization

Construct a scrollable container.

Parameters:
  • children – Child widgets.

  • name – The name of the widget.

  • id – The ID of the widget in the DOM.

  • classes – The CSS classes for the widget.

  • disabled – Whether the widget is disabled or not.

  • can_focus – Can this container be focused?

  • can_focus_children – Can this container’s children be focused?

  • can_maximized – Allow this container to maximize? None to use default logic.,

on_comment_collapsible_deleted(message: jiratui.widgets.comments.comments.CommentCollapsible) None

Schedules a task to delete a comment.

action_add_comment() None

Opens a screen to capture the comment’s text.

CommentCollapsible

class CommentCollapsible(*args, **kwargs)

Bases: textual.widgets.Collapsible

A collapsible to show a comment associated to a work item.

See Also:

Initialization

Initialize a Collapsible widget.

Parameters:
  • children – Contents that will be collapsed/expanded.

  • title – Title of the collapsed/expanded contents.

  • collapsed – Default status of the contents.

  • collapsed_symbol – Collapsed symbol before the title.

  • expanded_symbol – Expanded symbol before the title.

  • name – The name of the collapsible.

  • id – The ID of the collapsible in the DOM.

  • classes – The CSS classes of the collapsible.

  • disabled – Whether the collapsible is disabled or not.

class Deleted(work_item_key: str, comment_id: str)

Bases: textual.message.Message

Posted when a comment is deleted.

It holds the key of the work item whose comment we deleted and the ID of the deleted comment.

Initialization