The merge queue rows stack into cards on phone width
Browse files at this commit913ae53f7d9798f1e86a63f76a1d3814a7aa75cbParent: 2ba0cda- fix
- the merge queue rows stack into cards on phone width
2 changed files +53 -8
crates/forge-web/src/pages/merge_queue.rsmodified+8 -8
| @@ -398,20 +398,20 @@ async fn queue_body( | |||
| 398 | <tbody> | 398 | <tbody> |
| 399 | for row in rows.iter() { | 399 | for row in rows.iter() { |
| 400 | <tr> | 400 | <tr> |
| 401 | - <td class="mono">(row.position.as_str())</td> | 401 | + <td class="mono" data-label=(g::t(lang, K::QueueColPosition))>(row.position.as_str())</td> |
| 402 | - <td><a href=(row.pull_href.as_str())>"#"(row.pull_number)" "(row.pull_title.as_str())</a></td> | 402 | + <td data-label=(g::t(lang, K::QueueColPull))><a href=(row.pull_href.as_str())>"#"(row.pull_number)" "(row.pull_title.as_str())</a></td> |
| 403 | - <td><code>(row.branch.as_str())</code></td> | 403 | + <td data-label=(g::t(lang, K::QueueColBranch))><code>(row.branch.as_str())</code></td> |
| 404 | - <td><span class=(row.state_class)>(row.state)</span></td> | 404 | + <td data-label=(g::t(lang, K::QueueColState))><span class=(row.state_class)>(row.state)</span></td> |
| 405 | - <td>(row.by.as_str())</td> | 405 | + <td data-label=(g::t(lang, K::QueueColBy))>(row.by.as_str())</td> |
| 406 | - <td class="muted small">(row.queued.as_str())</td> | 406 | + <td class="muted small" data-label=(g::t(lang, K::QueueColQueued))>(row.queued.as_str())</td> |
| 407 | - <td> | 407 | + <td data-label=(g::t(lang, K::QueueColRun))> |
| 408 | if let Some(href) = row.run_href.as_ref() { | 408 | if let Some(href) = row.run_href.as_ref() { |
| 409 | <a href=(href.as_str())>(row.run_label.as_str())</a> | 409 | <a href=(href.as_str())>(row.run_label.as_str())</a> |
| 410 | } else { | 410 | } else { |
| 411 | <span class="muted">(row.run_label.as_str())</span> | 411 | <span class="muted">(row.run_label.as_str())</span> |
| 412 | } | 412 | } |
| 413 | </td> | 413 | </td> |
| 414 | - <td class="muted small">(row.reason.as_str())</td> | 414 | + <td class="muted small" data-label=(g::t(lang, K::QueueColReason))>(row.reason.as_str())</td> |
| 415 | <td> | 415 | <td> |
| 416 | if row.remove { | 416 | if row.remove { |
| 417 | <form method="post" action=(row.remove_action.as_str()) class="merge-flow"> | 417 | <form method="post" action=(row.remove_action.as_str()) class="merge-flow"> |
style/main.scssmodified+45 -0
| @@ -4493,6 +4493,51 @@ $ansi-colours: ( | |||
| 4493 | } | 4493 | } |
| 4494 | } | 4494 | } |
| 4495 | 4495 | ||
| 4496 | +// Phone: each queue row is a card, every cell a label and value row (the runners' layout). | ||
| 4497 | +@media (max-width: 720px) { | ||
| 4498 | + .queue-table { | ||
| 4499 | + display: block; | ||
| 4500 | + | ||
| 4501 | + thead { | ||
| 4502 | + display: none; | ||
| 4503 | + } | ||
| 4504 | + | ||
| 4505 | + tbody, | ||
| 4506 | + tr { | ||
| 4507 | + display: block; | ||
| 4508 | + } | ||
| 4509 | + | ||
| 4510 | + tr { | ||
| 4511 | + padding: 12px 0; | ||
| 4512 | + border-bottom: 1px solid var(--border); | ||
| 4513 | + } | ||
| 4514 | + | ||
| 4515 | + th, | ||
| 4516 | + td { | ||
| 4517 | + display: block; | ||
| 4518 | + width: auto; | ||
| 4519 | + padding: 0; | ||
| 4520 | + border: 0; | ||
| 4521 | + } | ||
| 4522 | + | ||
| 4523 | + td[data-label] { | ||
| 4524 | + display: flex; | ||
| 4525 | + align-items: center; | ||
| 4526 | + justify-content: space-between; | ||
| 4527 | + gap: 12px; | ||
| 4528 | + min-height: 36px; | ||
| 4529 | + min-width: 0; | ||
| 4530 | + | ||
| 4531 | + &::before { | ||
| 4532 | + content: attr(data-label); | ||
| 4533 | + flex: none; | ||
| 4534 | + color: var(--muted); | ||
| 4535 | + font-size: 0.78125rem; | ||
| 4536 | + } | ||
| 4537 | + } | ||
| 4538 | + } | ||
| 4539 | +} | ||
| 4540 | + | ||
| 4496 | // Phone: each runner is a card, every cell a label and value row, the menu at the card's end. | 4541 | // Phone: each runner is a card, every cell a label and value row, the menu at the card's end. |
| 4497 | @media (max-width: 720px) { | 4542 | @media (max-width: 720px) { |
| 4498 | .table.runners { | 4543 | .table.runners { |