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)
15111511 <span class="detail-label">(t(lang, Key::Deadline))</span>
15121512 (deadline_control(cx, &detail, today, may_write, lang).await?)
15131513 </div>
1514- <div class="detail-field">
1514+ <div class="detail-field detail-field-people">
15151515 <span class="detail-label">(format!("{} — {}", t(lang, Key::Assignees), detail.assignees.len()))</span>
15161516 <div class="detail-assignees">
15171517 for person in &detail.assignees {
style/_instrument.scssmodified+0 -3
@@ -245,10 +245,7 @@
245245 font-size: 20px;
246246 }
247247
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.
250248 [data-ui="instrument"] .detail-fields {
251- grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 1.3fr);
252249 gap: 10px;
253250 padding: 0;
254251 margin-top: 18px;
style/main.scssmodified+11 -11
@@ -1488,14 +1488,20 @@ img.avatar {
14881488
14891489 // -- the field row ----------------------------------------------------------
14901490
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.
14911493 .detail-fields {
14921494 display: grid;
1493- grid-template-columns: 1fr 1.5fr 1fr;
1495+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
14941496 gap: 12px;
14951497 padding: 18px 24px 0;
14961498 margin-top: 2px;
14971499 }
14981500
1501+.detail-field-people {
1502+ grid-column: 1 / -1;
1503+}
1504+
14991505 .detail-field {
15001506 display: flex;
15011507 flex-direction: column;
@@ -1725,7 +1731,6 @@ img.avatar {
17251731 .assignee-name {
17261732 flex: 0 1 auto;
17271733 min-width: 0;
1728- max-width: 120px;
17291734 overflow: hidden;
17301735 text-overflow: ellipsis;
17311736 white-space: nowrap;
@@ -1735,15 +1740,10 @@ img.avatar {
17351740
17361741 // Two people share one cell, so each name gives up half its room before the
17371742 // policy below drops names altogether.
1738-.detail-assignees:has(.assignee-chip:nth-child(2)) .assignee-name { max-width: 76px; }
1739-
1740-// Three people is the whole company here, and three first names fit. Past that
1741-// the labels go, in order, and the chips read as avatars — legible where a
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-
1743+// Four names fit the full-width row, sharing the slack evenly. Past that the
1744+// labels go together — never half of them, which reads as a rendering fault —
1745+// and the chips stand as avatars, legible where a clipped name is not. The
1746+// round "+" keeps its size either way.
17471747 .detail-assignees:has(.assignee-chip:nth-child(5)) {
17481748 .assignee-name { display: none; }
17491749 }