feat: platform file rows that open full width

Each file is a details whose summary is the row: name, folder when it is not the bare name, status chip. The short hash sits on one copy button beside it, since a summary is itself a control. Opened, the evidence runs across the list. A list with no folder drops the column. Code spans in the evidence are plain text.

The lists split by the share of a page they render to (elements against 10,000, bytes against 600,000) instead of Markdown length. With its parts, Batocera goes from 12 pages, 18,854 elements and 1.21 MB to 10 pages, 13,671 and 1.11 MB. A part that folds back into its platform page redirects there, from the record in website/src/data/platform-parts.json.
This commit is contained in:
Abdessamad Derraz committed 2026-10-27 21:41:00 +01:00
1 parent 20dc488e41
commit e7d33caa3f
10 files changed
+440 -192

No files matched your search

+7 -10
View File
@@ -158,16 +158,13 @@ class EachEntryNamesItsFile(unittest.TestCase):
# Existence mode reports no path: nothing is claimed, held or not.
self.assertEqual(generate_site._served_line({"status": "ok"}), "")
def test_a_long_system_list_is_cut_between_files(self):
body = ["2/2 files verified", ""]
for n in range(4):
body += [f"- `f{n}.bin` - OK", " " + "x" * 100]
runs = generate_site._file_runs(body, 250)
self.assertEqual(len(runs), 2)
for run in runs:
self.assertEqual(run[:2], body[:2])
self.assertTrue(run[2].startswith("- "))
self.assertEqual(sum(len(run) - 2 for run in runs), len(body) - 2)
def test_a_long_system_list_is_cut_between_rows_by_elements(self):
rows = [[f'<details class="rb-file"><summary>f{n}.bin</summary>x<br>y</details>']
for n in range(4)]
# Three elements a row: two rows fit in a budget of seven.
runs = generate_site._blocks_in_runs(rows, 7, generate_site._element_weight)
self.assertEqual([len(run) for run in runs], [2, 2])
self.assertEqual(sum(runs, []), sum(rows, []))
class AlsoNamedIsNotCited(unittest.TestCase):