The avatar in the profile corner no longer gets a glowing accent ring while one of the viewer's runs goes
Browse files at this commita169f730ebbf8b40595b9e7b0791ced6cbae90e0Parent: 42861fb- style
- the avatar in the profile corner no longer gets a glowing accent ring while one of the viewer's runs goes
- running CI shows in the live strip
3 changed files +5 -33
crates/forge-web/assets/nav.jsmodified+1 -9
| @@ -1859,11 +1859,6 @@ | ||
| 1859 | 1859 | }); |
| 1860 | 1860 | } |
| 1861 | 1861 | |
| 1862 | - // The heat ring: an accent ring while any of the viewer's runs is going, none otherwise. | |
| 1863 | - function drawRing(ring, running) { | |
| 1864 | - if (running.length) { ring.classList.add('hot'); } else { ring.classList.remove('hot'); } | |
| 1865 | - } | |
| 1866 | - | |
| 1867 | 1862 | // The chips: one per non-zero count. The titles come from the chip box's templates, with `{n}` |
| 1868 | 1863 | // standing for the count; the singular template is used for one. |
| 1869 | 1864 | function drawChips(box, json) { |
| @@ -1892,14 +1887,11 @@ | ||
| 1892 | 1887 | }); |
| 1893 | 1888 | } |
| 1894 | 1889 | |
| 1895 | - // Redraws every strip, ring and chip box on the page from one activity JSON. The | |
| 1890 | + // Redraws every strip and chip box on the page from one activity JSON. The | |
| 1896 | 1891 | // elements are looked up here each time, since a swap may have replaced them. |
| 1897 | 1892 | function drawActivity(json) { |
| 1898 | 1893 | var strips = document.querySelectorAll('.live-strip[data-activity]'); |
| 1899 | 1894 | for (var i = 0; i < strips.length; i++) { drawStrip(strips[i], json); } |
| 1900 | - var running = json.running || []; | |
| 1901 | - var rings = document.querySelectorAll('.heat-ring'); | |
| 1902 | - for (var r = 0; r < rings.length; r++) { drawRing(rings[r], running); } | |
| 1903 | 1895 | var boxes = document.querySelectorAll('.corner-chips'); |
| 1904 | 1896 | for (var b = 0; b < boxes.length; b++) { drawChips(boxes[b], json); } |
| 1905 | 1897 | // Finished runs leave the strip when the server's window ends, so the JSON is asked for again. |
crates/forge-web/src/views/mod.rsmodified+2 -6
| @@ -316,7 +316,6 @@ struct ProfileCorner { | ||
| 316 | 316 | reviews: u64, |
| 317 | 317 | mentions: u64, |
| 318 | 318 | failing: u64, |
| 319 | - hot: bool, | |
| 320 | 319 | /// The newest waiting review request, mention and failed run, each chip's link. |
| 321 | 320 | review_href: String, |
| 322 | 321 | mention_href: String, |
| @@ -324,11 +323,10 @@ struct ProfileCorner { | ||
| 324 | 323 | } |
| 325 | 324 | |
| 326 | 325 | /// The account corner at the foot of the signed-in sidebar and in the phone menu. It opens upward: |
| 327 | -/// the heat ring, the chips, what waits on the viewer, the notifications link, the theme choice, | |
| 326 | +/// the avatar, the chips, what waits on the viewer, the notifications link, the theme choice, | |
| 328 | 327 | /// and the profile, settings, admin and log out links. |
| 329 | 328 | #[component] |
| 330 | 329 | async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View> { |
| 331 | - let ring_class = if corner.hot { "heat-ring hot" } else { "heat-ring" }; | |
| 332 | 330 | let review_chip = (corner.reviews > 0).then(|| { |
| 333 | 331 | (corner.reviews.to_string(), mi::review_requests_count(lang, corner.reviews)) |
| 334 | 332 | }); |
| @@ -365,7 +363,7 @@ async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View> | ||
| 365 | 363 | <div class="corner-wrap"> |
| 366 | 364 | <details class="corner" data-unread-stream=""> |
| 367 | 365 | <summary class="corner-btn" aria-label=(corner.username.as_str())> |
| 368 | - <span class=(ring_class)><img class="avatar avatar-sm" src=(corner.avatar.as_str()) alt="" width="28" height="28"></span> | |
| 366 | + <span class="corner-avatar"><img class="avatar avatar-sm" src=(corner.avatar.as_str()) alt="" width="28" height="28"></span> | |
| 369 | 367 | <span class="corner-name" title=(corner.username.as_str())>(corner.name.as_str())</span> |
| 370 | 368 | <span class="corner-chips" data-review=(review_template.as_str()) data-review-one=(review_one.as_str()) data-mention=(mention_template.as_str()) data-mention-one=(mention_one.as_str()) data-failing=(failing_template.as_str()) data-failing-one=(failing_one.as_str())> |
| 371 | 369 | if let Some((count, title)) = review_chip { |
| @@ -607,7 +605,6 @@ pub async fn shell( | ||
| 607 | 605 | let search_for_label = mi::t(lang, MK::SearchPublicReposFor); |
| 608 | 606 | // The profile corner, the signed-in sidebar's account menu. The sidebar and the phone menu |
| 609 | 607 | // each get their own copy. |
| 610 | - let hot = !runs.running.is_empty(); | |
| 611 | 608 | // Each chip leads to the newest thing it counts; a review or mention past the five newest |
| 612 | 609 | // waiting items falls back to the inbox. |
| 613 | 610 | let newest_waiting = |review: bool| { |
| @@ -647,7 +644,6 @@ pub async fn shell( | ||
| 647 | 644 | reviews: inbox.reviews, |
| 648 | 645 | mentions: inbox.mentions, |
| 649 | 646 | failing: runs.failing, |
| 650 | - hot, | |
| 651 | 647 | review_href, |
| 652 | 648 | mention_href, |
| 653 | 649 | failing_href, |
style/_shell.scssmodified+2 -18
| @@ -716,33 +716,17 @@ | ||
| 716 | 716 | -webkit-box-orient: vertical; |
| 717 | 717 | } |
| 718 | 718 | |
| 719 | -// The avatar on its own when nothing runs; while a run of the viewer's is queued or running (.hot) | |
| 720 | -// an accent ring appears around it, glowing softly. | |
| 721 | -.heat-ring { | |
| 719 | +// The avatar beside the name. Running CI shows in the live strip, not around the avatar. | |
| 720 | +.corner-avatar { | |
| 722 | 721 | display: grid; |
| 723 | 722 | flex: none; |
| 724 | 723 | place-items: center; |
| 725 | - width: 34px; | |
| 726 | - height: 34px; | |
| 727 | - border-radius: 50%; | |
| 728 | - | |
| 729 | - &.hot { | |
| 730 | - background: conic-gradient(var(--heat-2), var(--heat-3), var(--heat-4), var(--heat-2)); | |
| 731 | - filter: drop-shadow(0 0 5px var(--heat-glow)); | |
| 732 | - } | |
| 733 | 724 | |
| 734 | 725 | .avatar { |
| 735 | - box-sizing: border-box; | |
| 736 | 726 | width: 32px; |
| 737 | 727 | height: 32px; |
| 738 | 728 | border-radius: 50%; |
| 739 | 729 | } |
| 740 | - | |
| 741 | - &.hot .avatar { | |
| 742 | - width: 30px; | |
| 743 | - height: 30px; | |
| 744 | - border: 2px solid var(--bg); | |
| 745 | - } | |
| 746 | 730 | } |
| 747 | 731 | |
| 748 | 732 | .corner-chips { |