关于「扫视路径与表格骨架:列序、对齐、冻结与密度」,《数据后台减负与防呆表单》给出的定量结论是什么?

结论:骨架是每一行都要付的成本。按任务排列序,在本章设定的任务比重下,每行眼睛的路程短了 27.7%,代价是少数任务变慢,需要给它们单独的视图。数字右对齐、固定小数位、逗号千分位、等宽数字,让 43.3% 的相邻行不用读数字就能比较大小。冻结表头的代价是视口高度的 4.8%,换来全部 1,200 行与表头同屏;冻结首列的代价是 6.7% 的宽度,换来每一行永远带着身份。斑马纹的效果多半很小,小到四个人的团队一周之内几乎不可能测出来,所以默认关闭,测试预算留给列序与行高。行高是翻屏与点错之间的交换,有行内操作的表不低于 32 像素。颜色要等骨架立好之后再上,那是下一章的事。

数据口径:本书不是会计、审计或法律意见。 书中以标注框区分已发表的证据、可运行的计算、原典与作者的假说,每条假说都写明什么结果会推翻它;原典考辨取唐代刘晏的报数制度,原文只转述大意。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 1200, 4.8, 6.7

sticky header False: rows on first screen 25, on later screens 26, screens per day 47
rows that share a screen with the header25 of 1200 (2.1%)
sticky header True : rows on first screen 25, on later screens 25, screens per day 48
rows that share a screen with the header1200 of 1200 (100.0%)
header height as share of the table viewport4.8%
nine visible columns table1016 px, viewport 1680 px, overflow 0 px
plus ten audit columns table2096 px, viewport 1680 px, overflow 416 px
columns beyond the first screen 4; fully scrolled the view moves 416 px, more than order_id's 112 px
freezing order_id costs 6.7% of the viewport width and keeps every row labelled
查看完整验算程序
# Chapter 2. p23: Frozen header row and frozen first column: what they cost and what they buy.
# Geometry for the fictional Harbourbridge desk: a 1920x1080 screen, browser and app chrome take the top
# 240 px (assumption), so the table viewport is 840 px tall; header 40 px; row pitch 32 px: 25 rows, as p10.
# Horizontal: a 240 px side menu leaves 1,680 px; with the four hidden audit columns shown the table is wider.
import math

ROWS, VIEW_H, HEAD, PITCH = 1200, 840, 40, 32
VIEW_W, MENU = 1920, 240
VISIBLE = [112, 96, 128, 80, 96, 104, 104, 88, 208]          # p20 widths, order_id first
# ten audit columns (fx rate, fee, sku, warehouse, tax and five more); only their widths matter here
AUDIT = [96, 96, 88, 120, 104, 136, 112, 96, 128, 104]


def rows_on_screen(sticky):
    body = VIEW_H - HEAD
    first = body // PITCH
    later = first if sticky else VIEW_H // PITCH
    return first, later


if __name__ == "__main__":
    for sticky in (False, True):
        first, later = rows_on_screen(sticky)
        screens = 1 + math.ceil((ROWS - first) / later)
        with_head = first if not sticky else ROWS
        print("   sticky header {:<5s}: rows on first screen {}, on later screens {}, screens per day {}"
              .format(str(sticky), first, later, screens))
        print("      rows that share a screen with the header: {} of {} ({:.1%})".format(
            with_head, ROWS, with_head / ROWS))
    print("   header height as share of the table viewport: {:.1%}".format(HEAD / VIEW_H))
    avail = VIEW_W - MENU
    for label, widths in (("nine visible columns", VISIBLE), ("plus ten audit columns", VISIBLE + AUDIT)):
        total = sum(widths)
        print("   {:<23s} table {:5d} px, viewport {} px, overflow {:5d} px".format(
            label, total, avail, max(0, total - avail)))
        if total > avail:
            right_edge = [sum(widths[:i + 1]) for i in range(len(widths))]
            offscreen = sum(1 for e in right_edge if e > avail)
            print("      columns beyond the first screen {}; fully scrolled the view moves {} px,"
                  " more than order_id's {} px".format(offscreen, total - avail, widths[0]))
            print("      freezing order_id costs {:.1%} of the viewport width and keeps every row labelled"
                  .format(widths[0] / avail))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《高密度数据工作台视觉减负、条件格式显著性与零培训防呆表单工程》第 2 章「扫视路径与表格骨架:列序、对齐、冻结与密度」(版本 0.1.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-138 · v0.1.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026138,
  author    = {Fan, Yafu},
  title     = {Cognitive Unloading of Dense Data Workbenches, Conditional-Format Salience and Zero-Training Error-Proof Form Engineering},
  year      = {2026},
  publisher = {5D Library},
  edition   = {0.1.0},
  note      = {DOI pending}
}

本书其他章节结论