forge
Explore
Log in

Don't you dare go Hollow

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 commit

a169f730ebbf8b40595b9e7b0791ced6cbae90e0Ahmet Kaan GümüşParent: 42861fb
All checks have passed
Show checks
  • 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
Show full message
💄 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
crates/forge-web/assets/nav.jsmodified+1 -9
@@ -1859,11 +1859,6 @@
18591859 });
18601860 }
18611861
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-
18671862 // The chips: one per non-zero count. The titles come from the chip box's templates, with `{n}`
18681863 // standing for the count; the singular template is used for one.
18691864 function drawChips(box, json) {
@@ -1892,14 +1887,11 @@
18921887 });
18931888 }
18941889
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
18961891 // elements are looked up here each time, since a swap may have replaced them.
18971892 function drawActivity(json) {
18981893 var strips = document.querySelectorAll('.live-strip[data-activity]');
18991894 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); }
19031895 var boxes = document.querySelectorAll('.corner-chips');
19041896 for (var b = 0; b < boxes.length; b++) { drawChips(boxes[b], json); }
19051897 // 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 {
316316 reviews: u64,
317317 mentions: u64,
318318 failing: u64,
319- hot: bool,
320319 /// The newest waiting review request, mention and failed run, each chip's link.
321320 review_href: String,
322321 mention_href: String,
@@ -324,11 +323,10 @@ struct ProfileCorner {
324323 }
325324
326325 /// 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,
328327 /// and the profile, settings, admin and log out links.
329328 #[component]
330329 async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View> {
331- let ring_class = if corner.hot { "heat-ring hot" } else { "heat-ring" };
332330 let review_chip = (corner.reviews > 0).then(|| {
333331 (corner.reviews.to_string(), mi::review_requests_count(lang, corner.reviews))
334332 });
@@ -365,7 +363,7 @@ async fn profile_corner(lang: Lang, corner: ProfileCorner) -> Result<impl View>
365363 <div class="corner-wrap">
366364 <details class="corner" data-unread-stream="">
367365 <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>
369367 <span class="corner-name" title=(corner.username.as_str())>(corner.name.as_str())</span>
370368 <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())>
371369 if let Some((count, title)) = review_chip {
@@ -607,7 +605,6 @@ pub async fn shell(
607605 let search_for_label = mi::t(lang, MK::SearchPublicReposFor);
608606 // The profile corner, the signed-in sidebar's account menu. The sidebar and the phone menu
609607 // each get their own copy.
610- let hot = !runs.running.is_empty();
611608 // Each chip leads to the newest thing it counts; a review or mention past the five newest
612609 // waiting items falls back to the inbox.
613610 let newest_waiting = |review: bool| {
@@ -647,7 +644,6 @@ pub async fn shell(
647644 reviews: inbox.reviews,
648645 mentions: inbox.mentions,
649646 failing: runs.failing,
650- hot,
651647 review_href,
652648 mention_href,
653649 failing_href,
style/_shell.scssmodified+2 -18
@@ -716,33 +716,17 @@
716716 -webkit-box-orient: vertical;
717717 }
718718
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 {
722721 display: grid;
723722 flex: none;
724723 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- }
733724
734725 .avatar {
735- box-sizing: border-box;
736726 width: 32px;
737727 height: 32px;
738728 border-radius: 50%;
739729 }
740-
741- &.hot .avatar {
742- width: 30px;
743- height: 30px;
744- border: 2px solid var(--bg);
745- }
746730 }
747731
748732 .corner-chips {