fix(r3): fold heid's code review — equal stage widths, the axis guard, players, and tests that read the observable
The one drift: the separator was a border on B, making B's stage 1px narrower than A's; it is now a 1px column gap, so the stages are the same size to the pixel. Tests now read what the contract promises instead of a proxy: the strip's ring order, the full bakeoff sequence, 1:1 and Fit by geometry, the 900px break from both sides, A wrapping, each form naming its own item, a sibling-prefix symlink, both reveals, the strip's flag, the back arrow unlinked, a one-axis picture, a focused player, two videos with no toggle. The contract names .cmp-cap, a press on a stage, INV-4's URL-driven picker and the redirect branch's isinstance check. r3.toml gains ten rows.
This commit is contained in:
+95
-2
@@ -182,9 +182,9 @@ label = "C4 a caption takes its height from one stage only (Fit draws the two at
|
||||
file = "booth/templates/base.html"
|
||||
test = "tests/test_compare_browser.py::test_two_stages_side_by_side_wide_and_stacked_narrow"
|
||||
old = '''
|
||||
.cmp-side{display:grid;grid-row:1 / -1;grid-template-rows:subgrid;min-width:0;min-height:0}'''
|
||||
.cmp-side{display:grid;grid-row:1 / -1;grid-template-rows:subgrid;'''
|
||||
new = '''
|
||||
.cmp-side{display:grid;grid-row:1 / -1;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;min-height:0}'''
|
||||
.cmp-side{display:grid;grid-row:1 / -1;grid-template-rows:auto minmax(0,1fr) auto;'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C4 stacked, a stage keeps the review's 60vh"
|
||||
@@ -418,6 +418,99 @@ old = '''
|
||||
new = '''
|
||||
'''
|
||||
|
||||
# ---- the heid code-review fold (01M3AJXX8RH4QZPY5D1DQWQQGQ)
|
||||
|
||||
[[mutation]]
|
||||
label = "C4 the separator is a border on B (B's stage 1px narrower than A's)"
|
||||
file = "booth/templates/base.html"
|
||||
test = "tests/test_compare_browser.py::test_two_stages_side_by_side_wide_and_stacked_narrow"
|
||||
old = '''
|
||||
background:var(--surface-sunken)}'''
|
||||
new = '''
|
||||
background:var(--surface-sunken)}
|
||||
.cmp-side+.cmp-side{border-left:1px solid var(--border-subtle)}'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C4 the stack break drifts to 1000px"
|
||||
file = "booth/templates/base.html"
|
||||
test = "tests/test_compare_browser.py::test_two_stages_side_by_side_wide_and_stacked_narrow"
|
||||
old = '''
|
||||
@media (max-width:900px){
|
||||
.viewer.review.compare{display:block}'''
|
||||
new = '''
|
||||
@media (max-width:1000px){
|
||||
.viewer.review.compare{display:block}'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C4 a side with nothing to scroll on an axis does not ignore it (0/0 resets the other)"
|
||||
file = "booth/templates/compare.html"
|
||||
test = "tests/test_compare_browser.py::test_an_axis_with_nothing_to_scroll_is_ignored"
|
||||
old = '''
|
||||
if (fy > 0 && ty > 0) t = from.scrollTop / fy * ty;'''
|
||||
new = '''
|
||||
if (ty > 0) t = from.scrollTop / fy * ty;'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C4 two videos get a Fit | 1:1 toggle"
|
||||
file = "booth/app.py"
|
||||
test = "tests/test_compare.py::test_a_video_or_track_plays_in_its_own_stage_and_two_get_no_toggle"
|
||||
old = '''
|
||||
"any_image": any(by_rel[r].kind == "image" for r in (a, b)),'''
|
||||
new = '''
|
||||
"any_image": True,'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C3 Space on a focused player steps the pair"
|
||||
file = "booth/templates/compare.html"
|
||||
test = "tests/test_compare_browser.py::test_the_keys_keep_the_reviews_guards_and_c_toggles_the_view"
|
||||
old = '''e.target.closest('button, a, summary, video, audio')'''
|
||||
new = '''e.target.closest('button, a, summary')'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C3 there is no back arrow"
|
||||
file = "booth/templates/compare.html"
|
||||
test = "tests/test_compare_browser.py::test_unlinked_moves_only_the_active_side_and_the_strip_picks_it"
|
||||
old = '''
|
||||
else if (k === 'ArrowLeft') step(-1);'''
|
||||
new = '''
|
||||
'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C1 containment is a bare prefix (a sibling booth sharing the name opens)"
|
||||
file = "booth/app.py"
|
||||
test = "tests/test_compare.py::test_an_outside_symlink_in_the_ring_is_404"
|
||||
old = '''
|
||||
if not str(target).startswith(str(booth) + os.sep) or not target.is_file():
|
||||
raise HTTPException(status_code=404, detail="no such item")'''
|
||||
new = '''
|
||||
if not str(target).startswith(str(booth)) or not target.is_file():
|
||||
raise HTTPException(status_code=404, detail="no such item")'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C1 the strip is not in ring order"
|
||||
file = "booth/app.py"
|
||||
test = "tests/test_compare.py::test_compare_renders_the_pair"
|
||||
old = '''
|
||||
"pick_a": url(r, b), "pick_b": url(a, r)} for r in ring]'''
|
||||
new = '''
|
||||
"pick_a": url(r, b), "pick_b": url(a, r)} for r in ring[::-1]]'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C6 each reveal lifts B's blur whichever side it sits on"
|
||||
file = "booth/templates/compare.html"
|
||||
test = "tests/test_compare_browser.py::test_blur_is_honest_on_both_sides"
|
||||
old = '''
|
||||
var stage = sides[btn.getAttribute('data-side')].querySelector('.vstage');'''
|
||||
new = '''
|
||||
var stage = sides.b.querySelector('.vstage');'''
|
||||
|
||||
[[mutation]]
|
||||
label = "C5 the strip does not show a flag made in place"
|
||||
file = "booth/templates/compare.html"
|
||||
test = "tests/test_compare_browser.py::test_a_flags_A_in_place_and_the_stages_survive"
|
||||
old = '''<a class="film-f{% if x.flagged %} is-flagged{% endif %}'''
|
||||
new = '''<a class="film-f'''
|
||||
|
||||
# Accepted, not rowed: the mode's `onChange: settleAll` (re-deciding which stage
|
||||
# can pan) is redundant with compare's ResizeObserver — 1:1 drops the stage's
|
||||
# padding, so every mode change resizes the stage's content box and the
|
||||
|
||||
Reference in New Issue
Block a user