Project · Tasks: priorities, issues, statuses, assignees, task rows
A new chapter, src/project. PriorityIndicator shows how urgent a task is in three bars, urgent in red, its words in a tip or beside it. IssueIdBadge names an issue by its team's key and number, as ENG-123. StatusSelect picks a status from the workflow, each with its mark, and AssigneePicker picks a person or no one; DueDatePicker is the forms DatePicker. TaskItem is a task in a row: its box, priority and issue, its title, then its due day, red when past and still open, and who has it. TaskList puts them in a SelectableList: arrows move, Enter opens, and a box's press or keys stay at the box. SubtaskList is the documents Checklist, which gains a field that adds a step on Enter. Along the way: forms::Choice::avatar leads a person's row with their initials, in lists and in a Select's trigger; ListItem::struck strikes a closed task's title; typography::Ellipsis now shapes with the text style's run, so a strike or underline on its box shows; two Lucide icons, circle-dashed and circle-dot-dashed.
This commit is contained in:
1 parent
c99465153d
commit
1633bc9293
20 files changed
+1417
-30
No files matched your search
@@ -28,6 +28,7 @@ pub struct ListItem {
|
||||
disabled: bool,
|
||||
strong: bool,
|
||||
quiet: bool,
|
||||
struck: bool,
|
||||
on_click: Option<OnClick>,
|
||||
}
|
||||
|
||||
@@ -45,6 +46,7 @@ impl ListItem {
|
||||
disabled: false,
|
||||
strong: false,
|
||||
quiet: false,
|
||||
struck: false,
|
||||
on_click: None,
|
||||
}
|
||||
}
|
||||
@@ -61,6 +63,12 @@ impl ListItem {
|
||||
self
|
||||
}
|
||||
|
||||
/// Strikes the title through, as a finished task has it.
|
||||
pub fn struck(mut self, struck: bool) -> Self {
|
||||
self.struck = struck;
|
||||
self
|
||||
}
|
||||
|
||||
/// A second line, quieter than the title.
|
||||
pub fn description(mut self, text: impl Into<SharedString>) -> Self {
|
||||
self.description = Some(text.into());
|
||||
@@ -162,6 +170,7 @@ impl RenderOnce for ListItem {
|
||||
line(self.title)
|
||||
.text_size(theme.text_size(TextSize::Base))
|
||||
.when(self.strong, |title| title.font_weight(FontWeight::SEMIBOLD))
|
||||
.when(self.struck, |title| title.line_through())
|
||||
.text_color(if self.quiet {
|
||||
colors.fg_muted
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user