| |
| """Read the Little Fig UI and check for mobile responsiveness.""" |
| import subprocess, os |
|
|
| TOKEN = "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" |
| subprocess.run(["git", "clone", f"https://{TOKEN}@github.com/ticketguy/littlefig.git", "/app/littlefig"], check=True) |
|
|
| |
| ui_path = "/app/littlefig/src/little_fig/web/static/index.html" |
| with open(ui_path, "r") as f: |
| html = f.read() |
|
|
| print(f"UI file size: {len(html)} chars") |
| print(f"\n=== MOBILE RESPONSIVENESS CHECK ===\n") |
|
|
| |
| if 'viewport' in html: |
| print("β
Has viewport meta tag") |
| else: |
| print("β NO viewport meta tag β will NOT scale on mobile") |
|
|
| |
| if '@media' in html: |
| count = html.count('@media') |
| print(f"β
Has {count} media queries") |
| else: |
| print("β NO media queries β won't adapt to screen size") |
|
|
| |
| if 'vw' in html or 'vh' in html or '%' in html: |
| print("β
Uses relative units (vw/vh/%)") |
| else: |
| print("β No relative units") |
|
|
| |
| if 'flex' in html: |
| print(f"β
Uses flexbox ({html.count('flex')} instances)") |
| else: |
| print("β No flexbox") |
|
|
| if 'grid' in html: |
| print(f"β
Uses CSS grid ({html.count('grid')} instances)") |
| else: |
| print("β οΈ No CSS grid") |
|
|
| |
| import re |
| fixed_widths = re.findall(r'width:\s*\d{4,}px', html) |
| if fixed_widths: |
| print(f"β Has fixed large widths: {fixed_widths[:5]}") |
| else: |
| print("β
No large fixed pixel widths") |
|
|
| |
| if 'max-width' in html: |
| print("β
Uses max-width constraints") |
|
|
| if 'overflow' in html: |
| print("β
Has overflow handling") |
|
|
| |
| print(f"\n=== FIRST 100 LINES OF UI ===\n") |
| lines = html.split('\n') |
| for line in lines[:100]: |
| print(line) |
|
|
| print(f"\n\n=== LAST 50 LINES ===\n") |
| for line in lines[-50:]: |
| print(line) |
|
|
| print(f"\n\nTotal lines: {len(lines)}") |
|
|