forge
Explore
Log in

Don't you dare go Hollow

The people get a row of their own, and names stay whole

Browse files at this commit

b1d763c677d3f11b7c3ad98bfd92ff22b6d3121bAhmet Kaan GümüşParent: 6951315
  • fix
    • the people get a row of their own, and names stay whole
Show full message
🎨 fix(web): the people get a row of their own, and names stay whole

A third of a 560px panel never held two names, so the chips ellipsised to
"Ahm…" and the deadline lost its own word to the squeeze. Status and the
date share the top row now; assignees take the full width beneath, where
four names fit and read. Past four the labels all go together and the
chips stand as avatars — never half of them, which read as a fault.
crates/izlek-web/src/detail.rsmodified+1 -1
@@ -1511,7 +1511,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab)
1511 <span class="detail-label">(t(lang, Key::Deadline))</span>1511 <span class="detail-label">(t(lang, Key::Deadline))</span>
1512 (deadline_control(cx, &detail, today, may_write, lang).await?)1512 (deadline_control(cx, &detail, today, may_write, lang).await?)
1513 </div>1513 </div>
1514- <div class="detail-field">1514+ <div class="detail-field detail-field-people">
1515 <span class="detail-label">(format!("{} — {}", t(lang, Key::Assignees), detail.assignees.len()))</span>1515 <span class="detail-label">(format!("{} — {}", t(lang, Key::Assignees), detail.assignees.len()))</span>
1516 <div class="detail-assignees">1516 <div class="detail-assignees">
1517 for person in &detail.assignees {1517 for person in &detail.assignees {
style/_instrument.scssmodified+0 -3
@@ -245,10 +245,7 @@
245 font-size: 20px;245 font-size: 20px;
246 }246 }
247 247
248-// Status and a date are short; the people carry names, so the third column
249-// takes the slack rather than ellipsising them to a single letter.
250 [data-ui="instrument"] .detail-fields {248 [data-ui="instrument"] .detail-fields {
251- grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 1.3fr);
252 gap: 10px;249 gap: 10px;
253 padding: 0;250 padding: 0;
254 margin-top: 18px;251 margin-top: 18px;
style/main.scssmodified+11 -11
@@ -1488,14 +1488,20 @@ img.avatar {
1488 1488
1489 // -- the field row ----------------------------------------------------------1489 // -- the field row ----------------------------------------------------------
1490 1490
1491+// Status and a date are short and sit side by side; the people carry names,
1492+// which no third of a panel holds, so they take a row of their own.
1491 .detail-fields {1493 .detail-fields {
1492 display: grid;1494 display: grid;
1493- grid-template-columns: 1fr 1.5fr 1fr;1495+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
1494 gap: 12px;1496 gap: 12px;
1495 padding: 18px 24px 0;1497 padding: 18px 24px 0;
1496 margin-top: 2px;1498 margin-top: 2px;
1497 }1499 }
1498 1500
1501+.detail-field-people {
1502+ grid-column: 1 / -1;
1503+}
1504+
1499 .detail-field {1505 .detail-field {
1500 display: flex;1506 display: flex;
1501 flex-direction: column;1507 flex-direction: column;
@@ -1725,7 +1731,6 @@ img.avatar {
1725 .assignee-name {1731 .assignee-name {
1726 flex: 0 1 auto;1732 flex: 0 1 auto;
1727 min-width: 0;1733 min-width: 0;
1728- max-width: 120px;
1729 overflow: hidden;1734 overflow: hidden;
1730 text-overflow: ellipsis;1735 text-overflow: ellipsis;
1731 white-space: nowrap;1736 white-space: nowrap;
@@ -1735,15 +1740,10 @@ img.avatar {
1735 1740
1736 // Two people share one cell, so each name gives up half its room before the1741 // Two people share one cell, so each name gives up half its room before the
1737 // policy below drops names altogether.1742 // policy below drops names altogether.
1738-.detail-assignees:has(.assignee-chip:nth-child(2)) .assignee-name { max-width: 76px; }1743+// Four names fit the full-width row, sharing the slack evenly. Past that the
1739-1744+// labels go together — never half of them, which reads as a rendering fault —
1740-// Three people is the whole company here, and three first names fit. Past that1745+// and the chips stand as avatars, legible where a clipped name is not. The
1741-// the labels go, in order, and the chips read as avatars — legible where a1746+// round "+" keeps its size either way.
1742-// clipped name is not. The round "+" keeps its size either way.
1743-.detail-assignees:has(.assignee-chip:nth-child(4)) {
1744- .assignee-chip:nth-child(-n + 2) .assignee-name { display: none; }
1745-}
1746-
1747 .detail-assignees:has(.assignee-chip:nth-child(5)) {1747 .detail-assignees:has(.assignee-chip:nth-child(5)) {
1748 .assignee-name { display: none; }1748 .assignee-name { display: none; }
1749 }1749 }