mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 00:27:20 -05:00
fix: keep the Tested block in the house style
The details box takes a plain border instead of a side stripe, dots are rounded squares instead of pills, the strip's label joins variants with full stops, and one file tried reads as 1 file.
This commit is contained in:
1 parent
bcef6f41bb
commit
882ce55635
3 files changed
+7
-5
No files matched your search
@@ -631,7 +631,8 @@ def setup_of(record: dict) -> dict:
|
||||
"build": (f"{named[1]} patch" if named else "patched build") if patched else "published build",
|
||||
"options": options,
|
||||
"clock": "fixed clock" if "FAKETIME" in record["inputs"].get("env", {}) else "running clock",
|
||||
"files": f"{len(record['variants'])} files" if record["kind"] == "check" else "",
|
||||
"files": (f"{len(record['variants'])} file{'s' if len(record['variants']) != 1 else ''}"
|
||||
if record["kind"] == "check" else ""),
|
||||
"observable": (observable.split(":", 1)[1] if observable.startswith("state:")
|
||||
else OBSERVABLE_WORDS.get(observable, observable)),
|
||||
}
|
||||
@@ -784,7 +785,7 @@ def _link(url: object, text: str) -> str:
|
||||
|
||||
def _dots(item: dict) -> str:
|
||||
groups = item.get("groups") or []
|
||||
names = "; ".join(f"{g['variant']}: {g['result']}" for g in groups)
|
||||
names = ". ".join(f"{g['variant']}: {g['result']}" for g in groups)
|
||||
dots = "".join(
|
||||
f'<span class="rb-dot rb-dot-{g["group"] % 5}{" rb-dot-empty" if g["absent"] else ""}" '
|
||||
f'title="{_attr(g["variant"] + ": " + g["result"])}"></span>' for g in groups)
|
||||
|
||||
@@ -541,7 +541,7 @@ class SitePages(unittest.TestCase):
|
||||
strip = text.split('class="rb-dots"', 1)[1].split("</span></span>", 1)[0]
|
||||
self.assertEqual(re.findall(r'rb-dot rb-dot-(\d)( rb-dot-empty)?"', strip),
|
||||
[("0", ""), ("1", ""), ("0", " rb-dot-empty")])
|
||||
self.assertIn('aria-label="3 variants. v0: result A; v1: result B; v2: result A"', text)
|
||||
self.assertIn('aria-label="3 variants. v0: result A. v1: result B. v2: result A"', text)
|
||||
|
||||
def test_the_details_hold_the_method_and_the_host(self) -> None:
|
||||
text = "\n".join(sm.tested_section("beetle_saturn", [self.item(runs=1)]))
|
||||
|
||||
@@ -1091,7 +1091,8 @@ starlight-tabs [role='tab'] { white-space: nowrap; }
|
||||
.sl-markdown-content .rb-tested-more {
|
||||
margin: 0 0 0.75rem 1.75rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-left: 2px solid var(--rb-border-strong);
|
||||
border: 1px solid var(--rb-border);
|
||||
border-radius: 4px;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.sl-markdown-content .rb-tested-more p { margin: 0.35rem 0 0; }
|
||||
@@ -1102,7 +1103,7 @@ starlight-tabs [role='tab'] { white-space: nowrap; }
|
||||
.sl-markdown-content .rb-dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
border-radius: 3px;
|
||||
border: 2px solid var(--rb-dot);
|
||||
background: var(--rb-dot);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user