Merge branch 'cursor/mobile-ui' into 'stage'
@@ -1313,3 +1313,19 @@ button.taskbox {
1313
1313
}
1314
1314
button.taskbox.on { background: var(--blue); color: #fff; border-color: var(--blue); }
1315
1315
input.tasktick { margin: 0.15rem 0.35rem 0 0; }
1316
1317
/* Smalle schermen: niets mag de pagina breder maken dan het scherm. */
1318
html, body { overflow-x: clip; }
1319
table.md { display: block; max-width: 100%; overflow-x: auto; }
1320
.mdbody { min-width: 0; overflow-wrap: anywhere; }
1321
.mdbody pre { max-width: 100%; overflow-x: auto; }
1322
.mdbody pre code { overflow-wrap: normal; }
1323
.commitwho { overflow-wrap: anywhere; }
1324
@media (max-width: 720px) {
1325
.commitbar { flex-wrap: wrap; row-gap: 0.45rem; }
1326
.commitbar .grow { flex: 1 1 calc(100% - 3rem); }
1327
.commitbar .grow .muted { white-space: normal; word-break: normal; }
1328
.headpipe { flex: 1 1 100%; flex-wrap: wrap; row-gap: 0.35rem; min-width: 0; }
1329
.headpipe .stages { flex-wrap: wrap; min-width: 0; }
1330
.commitbar .btn.ghost { margin-left: auto; }
1331
}
@@ -1313,3 +1313,19 @@ button.taskbox {1313
}1313
}1314
button.taskbox.on { background: var(--blue); color: #fff; border-color: var(--blue); }1314
button.taskbox.on { background: var(--blue); color: #fff; border-color: var(--blue); }1315
input.tasktick { margin: 0.15rem 0.35rem 0 0; }1315
input.tasktick { margin: 0.15rem 0.35rem 0 0; }1316
1317
/* Smalle schermen: niets mag de pagina breder maken dan het scherm. */1318
html, body { overflow-x: clip; }1319
table.md { display: block; max-width: 100%; overflow-x: auto; }1320
.mdbody { min-width: 0; overflow-wrap: anywhere; }1321
.mdbody pre { max-width: 100%; overflow-x: auto; }1322
.mdbody pre code { overflow-wrap: normal; }1323
.commitwho { overflow-wrap: anywhere; }1324
@media (max-width: 720px) {1325
.commitbar { flex-wrap: wrap; row-gap: 0.45rem; }1326
.commitbar .grow { flex: 1 1 calc(100% - 3rem); }1327
.commitbar .grow .muted { white-space: normal; word-break: normal; }1328
.headpipe { flex: 1 1 100%; flex-wrap: wrap; row-gap: 0.35rem; min-width: 0; }1329
.headpipe .stages { flex-wrap: wrap; min-width: 0; }1330
.commitbar .btn.ghost { margin-left: auto; }1331
}@@ -0,0 +1,25 @@
1
# Controleert horizontale overflow op 360-430px met Playwright.
2
# Gebruik: python scripts/mobile-overflow.py https://git.timfalken.com UIT /pad1 /pad2 ...
3
# UIT = map voor screenshots; "voor" gebruikt de live CSS, anders de lokale style.css.
4
import sys
5
from playwright.sync_api import sync_playwright
6
css=open(__import__('os').path.join(__import__('os').path.dirname(__file__),'..','internal','server','static','style.css')).read()
7
base,out=sys.argv[1],sys.argv[2]; pages=sys.argv[3:]
8
JS="""(w)=>{const out=[];for(const e of document.querySelectorAll('body *')){const r=e.getBoundingClientRect();if(r.right<=w+1||r.width==0)continue;let a=e.parentElement,clip=false;while(a&&a!==document.body&&a!==document.documentElement){const o=getComputedStyle(a).overflowX;if(o!=='visible'){clip=true;break}a=a.parentElement}if(clip)continue;const par=e.parentElement;if(par.getBoundingClientRect().right>w+1&&par!==document.body)continue;out.push(e.tagName+'.'+e.className+' r='+Math.round(r.right)+' '+(e.textContent||'').trim().slice(0,30).replace(/\\s+/g,' '))}return out.slice(0,8)}"""
9
with sync_playwright() as p:
10
b=p.chromium.launch(args=["--no-sandbox"])
11
def route(r):
12
r.fulfill(status=200,content_type="text/css",body=css)
13
for w in (360,375,412,430):
14
ctx=b.new_context(viewport={"width":w,"height":900},device_scale_factor=2,is_mobile=True,has_touch=True)
15
if out!="voor": ctx.route("**/static/style.css*",route); ctx.route("**/assets/style.css*",route)
16
pg=ctx.new_page()
17
for path in pages:
18
pg.goto(base+path,wait_until="networkidle")
19
sw=pg.evaluate("document.documentElement.scrollWidth")
20
bad=pg.evaluate(JS,w)
21
print(w,path,sw,"OK" if sw<=w and not bad else "OVERFLOW",bad if bad else "")
22
if w==412:
23
pg.screenshot(path=f"{out}/{path.strip('/').replace('/','_') or 'home'}.png",full_page=False)
24
ctx.close()
25
b.close()
@@ -0,0 +1,25 @@1
# Controleert horizontale overflow op 360-430px met Playwright.2
# Gebruik: python scripts/mobile-overflow.py https://git.timfalken.com UIT /pad1 /pad2 ...3
# UIT = map voor screenshots; "voor" gebruikt de live CSS, anders de lokale style.css.4
import sys5
from playwright.sync_api import sync_playwright6
css=open(__import__('os').path.join(__import__('os').path.dirname(__file__),'..','internal','server','static','style.css')).read()7
base,out=sys.argv[1],sys.argv[2]; pages=sys.argv[3:]8
JS="""(w)=>{const out=[];for(const e of document.querySelectorAll('body *')){const r=e.getBoundingClientRect();if(r.right<=w+1||r.width==0)continue;let a=e.parentElement,clip=false;while(a&&a!==document.body&&a!==document.documentElement){const o=getComputedStyle(a).overflowX;if(o!=='visible'){clip=true;break}a=a.parentElement}if(clip)continue;const par=e.parentElement;if(par.getBoundingClientRect().right>w+1&&par!==document.body)continue;out.push(e.tagName+'.'+e.className+' r='+Math.round(r.right)+' '+(e.textContent||'').trim().slice(0,30).replace(/\\s+/g,' '))}return out.slice(0,8)}"""9
with sync_playwright() as p:10
b=p.chromium.launch(args=["--no-sandbox"])11
def route(r):12
r.fulfill(status=200,content_type="text/css",body=css)13
for w in (360,375,412,430):14
ctx=b.new_context(viewport={"width":w,"height":900},device_scale_factor=2,is_mobile=True,has_touch=True)15
if out!="voor": ctx.route("**/static/style.css*",route); ctx.route("**/assets/style.css*",route)16
pg=ctx.new_page()17
for path in pages:18
pg.goto(base+path,wait_until="networkidle")19
sw=pg.evaluate("document.documentElement.scrollWidth")20
bad=pg.evaluate(JS,w)21
print(w,path,sw,"OK" if sw<=w and not bad else "OVERFLOW",bad if bad else "")22
if w==412:23
pg.screenshot(path=f"{out}/{path.strip('/').replace('/','_') or 'home'}.png",full_page=False)24
ctx.close()25
b.close()