What blocks the task stays in sight
Browse files at this commit819629469d5f4c182ce74ad6ec1f9c44cbc7fcf8Parent: a6a1c5d- feat
- what blocks the task stays in sight
2 changed files +37 -21
- crates/izlek-web/src/detail.rs +22 -21
- style/main.scss +15 -0
crates/izlek-web/src/detail.rsmodified+22 -21
| @@ -1527,6 +1527,28 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab) | ||
| 1527 | 1527 | </div> |
| 1528 | 1528 | </div> |
| 1529 | 1529 | (refused(cx, "move_card", lang).await?) |
| 1530 | + | |
| 1531 | + <section class="detail-block"> | |
| 1532 | + <div class="detail-block-head"> | |
| 1533 | + <span class="detail-label">(t(lang, Key::Dependencies))</span> | |
| 1534 | + <div class="spacer"></div> | |
| 1535 | + if may_write { | |
| 1536 | + (link_picker(cx, &detail.id, &linkable, lang).await?) | |
| 1537 | + } | |
| 1538 | + </div> | |
| 1539 | + if has_deps { | |
| 1540 | + <div class="dep-list"> | |
| 1541 | + for edge in &detail.blocked_by { | |
| 1542 | + (dep_row(cx, &detail.id, edge, Direction::BlockedBy, may_write, lang).await?) | |
| 1543 | + } | |
| 1544 | + for edge in &detail.blocks { | |
| 1545 | + (dep_row(cx, &detail.id, edge, Direction::Blocks, may_write, lang).await?) | |
| 1546 | + } | |
| 1547 | + </div> | |
| 1548 | + } else { | |
| 1549 | + <p class="detail-prose detail-prose-empty">(t(lang, Key::NoDependencies))</p> | |
| 1550 | + } | |
| 1551 | + </section> | |
| 1530 | 1552 | } |
| 1531 | 1553 | </div> |
| 1532 | 1554 | |
| @@ -1534,27 +1556,6 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab) | ||
| 1534 | 1556 | <div class="detail-body"> |
| 1535 | 1557 | if tab == Tab::Task { |
| 1536 | 1558 | |
| 1537 | - <section class="detail-block"> | |
| 1538 | - <div class="detail-block-head"> | |
| 1539 | - <span class="detail-label">(t(lang, Key::Dependencies))</span> | |
| 1540 | - <div class="spacer"></div> | |
| 1541 | - if may_write { | |
| 1542 | - (link_picker(cx, &detail.id, &linkable, lang).await?) | |
| 1543 | - } | |
| 1544 | - </div> | |
| 1545 | - if has_deps { | |
| 1546 | - <div class="dep-list"> | |
| 1547 | - for edge in &detail.blocked_by { | |
| 1548 | - (dep_row(cx, &detail.id, edge, Direction::BlockedBy, may_write, lang).await?) | |
| 1549 | - } | |
| 1550 | - for edge in &detail.blocks { | |
| 1551 | - (dep_row(cx, &detail.id, edge, Direction::Blocks, may_write, lang).await?) | |
| 1552 | - } | |
| 1553 | - </div> | |
| 1554 | - } else { | |
| 1555 | - <p class="detail-prose detail-prose-empty">(t(lang, Key::NoDependencies))</p> | |
| 1556 | - } | |
| 1557 | - </section> | |
| 1558 | 1559 | |
| 1559 | 1560 | <section class="detail-block"> |
| 1560 | 1561 | <span class="detail-label">(t(lang, Key::Description))</span> |
style/main.scssmodified+15 -0
| @@ -1092,6 +1092,21 @@ img.avatar { | ||
| 1092 | 1092 | flex: none; |
| 1093 | 1093 | } |
| 1094 | 1094 | |
| 1095 | +// Dependencies ride in the mast, and a task can be blocked by any number of | |
| 1096 | +// others — so the list keeps three whole rows' worth of room and pans inside itself, | |
| 1097 | +// silently, rather than pushing the task's own text off the screen. | |
| 1098 | +.detail-mast .dep-list { | |
| 1099 | + max-height: 160px; | |
| 1100 | + overflow-y: auto; | |
| 1101 | + scrollbar-width: none; | |
| 1102 | + | |
| 1103 | + &::-webkit-scrollbar { display: none; } | |
| 1104 | +} | |
| 1105 | + | |
| 1106 | +.detail-mast .detail-block { | |
| 1107 | + margin-top: 14px; | |
| 1108 | +} | |
| 1109 | + | |
| 1095 | 1110 | .detail-body { |
| 1096 | 1111 | flex: 1; |
| 1097 | 1112 | min-height: 0; |