utopia-ia/elffuss-claw public
Changesets · Branches · Tags · Compare
| Changeset | 7185ee918ff932590f60702cb88c62d1d0d85796a1882f964deebedf11bd3443 |
|---|---|
| Author | KikoCis <kikocisneros@gmail.com> · 2026-10-11 20:29 +02:00 |
| Committer | KikoCis <kikocisneros@gmail.com> · 2026-10-11 20:29 +02:00 |
| Parents | ec220e436a4e |
2 files changed
modified tests/ux-skills.mjs +32 −0
| @@ -92,6 +92,38 @@ | ||
| 92 | 92 | return document.getElementById('panel-skills').classList.contains('active') && c?.classList.contains('resaltado') && c.querySelector('details')?.open; |
| 93 | 93 | }))); |
| 94 | 94 | |
| 95 | +// ── a lo ancho: nada se sale del panel ────────────────────────────────────── | |
| 96 | +// Hasta 1280 px, «Explorar» y «Quitar» quedaban fuera del panel, que se | |
| 97 | +// desplazaba de lado sin que nada lo indicara: el nombre de cada fila no podía | |
| 98 | +// encoger (una regla para el título de la tarjeta caía también en él). | |
| 99 | +await p.evaluate(async () => { | |
| 100 | + const s = await import('/js/skills.js'); | |
| 101 | + await s.install({ name: 'threejs-escena-con-nombre-largo', description: 'Escenas.', content: 'Usa three.js.', | |
| 102 | + repo: 'scottstts/Threejs-Awesome-Graphics-Agent-Skills', path: 'skills/threejs-escena-con-nombre-largo/SKILL.md' }); | |
| 103 | +}); | |
| 104 | +await p.click('#tabs button[data-tab="apps"]'); | |
| 105 | +await p.click('#tabs button[data-tab="skills"]'); | |
| 106 | +await tarjeta.locator('button', { hasText: 'Explorar' }).click(); | |
| 107 | +await hasta(async () => /reloj-bonito/.test(await tarjeta.locator('.repo-skills').innerText())); | |
| 108 | +for (const ancho of [1280, 1024, 768, 390]) { | |
| 109 | + await p.setViewportSize({ width: ancho, height: 900 }); | |
| 110 | + if (ancho <= 700 && !(await p.evaluate(() => document.body.classList.contains('show-viz')))) await p.click('#btn-flip'); | |
| 111 | + await p.evaluate(() => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)))); | |
| 112 | + const r = await p.evaluate(() => { | |
| 113 | + const panel = document.getElementById('panel-skills'); | |
| 114 | + const pr = panel.getBoundingClientRect(); | |
| 115 | + const fuera = [...panel.querySelectorAll('.card button')].filter(b => b.getClientRects().length).filter(b => { | |
| 116 | + const q = b.getBoundingClientRect(); | |
| 117 | + return q.left < pr.left - 1 || q.right > Math.min(pr.right, innerWidth) + 1; | |
| 118 | + }).map(b => b.getAttribute('aria-label') || b.textContent); | |
| 119 | + return { scrollW: panel.scrollWidth, clientW: panel.clientWidth, fuera, | |
| 120 | + botones: panel.querySelectorAll('.card button').length }; | |
| 121 | + }); | |
| 122 | + ok(`a ${ancho} px el panel no se desplaza de lado y todos los botones (Explorar, Quitar, Instalar…) están dentro`, | |
| 123 | + r.scrollW <= r.clientW + 1 && !r.fuera.length && r.botones >= 10, JSON.stringify(r)); | |
| 124 | +} | |
| 125 | +await p.setViewportSize({ width: 1400, height: 900 }); | |
| 126 | + | |
| 95 | 127 | ok('nada salió a GitHub de verdad', !fuera.some(u => /github/.test(u)), fuera.filter(u => /github/.test(u)).join(' | ')); |
| 96 | 128 | ok('sin errores de página', errores.length === 0, errores.slice(0, 3).join(' | ')); |
| 97 | 129 | await fin(b, 'SKILLS: explorar dentro de su tarjeta, instalar/quitar al momento, repos que aparecen y se quitan'); |
modified web/css/elffuss.css +12 −3
| @@ -322,10 +322,19 @@ | ||
| 322 | 322 | .card b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; } |
| 323 | 323 | .card code { background: var(--bg); padding: 2px 8px; border-radius: 6px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; } |
| 324 | 324 | .card.col { flex-direction: column; align-items: stretch; gap: 8px; } |
| 325 | -.card.col b { flex: none; } | |
| 325 | +/* Solo el título de la tarjeta (hijo directo). Con `.card.col b` también caía | |
| 326 | + en el nombre de la fila de cada skill y de cada repo, que ya no podía encoger | |
| 327 | + ni partirse: hasta 1280 px, «Explorar» y «Quitar» quedaban fuera del panel. */ | |
| 328 | +.card.col > b { flex: none; } | |
| 326 | 329 | /* Skills: enlaces a repos y SKILL.md, la lista de un repo dentro de su tarjeta y |
| 327 | - el texto que se le da al modelo */ | |
| 328 | -.repo-link { color: var(--accent2); font-size: .74rem; text-decoration: none; white-space: nowrap; } | |
| 330 | + el texto que se le da al modelo. La fila de cada tarjeta (nombre, repo, | |
| 331 | + enlace, botones) baja a otra línea lo que no cabe: el nombre va primero, entero | |
| 332 | + si cabe, y los nombres largos se parten en vez de empujar los botones fuera. */ | |
| 333 | +.repo-link { color: var(--accent2); font-size: .74rem; text-decoration: none; overflow-wrap: anywhere; min-width: 0; } | |
| 334 | +.skills-instaladas .row.between, .skills-fuentes .row.between, .repo-skills .card { flex-wrap: wrap; gap: 6px 10px; } | |
| 335 | +.skills-instaladas .row.between > :not(button), .skills-fuentes .row.between > :not(button), .repo-skills .card > :not(button) { min-width: 0; overflow-wrap: anywhere; } | |
| 336 | +.skills-instaladas .row.between > button, .skills-fuentes .row.between > button, .repo-skills .card > button { flex: none; } | |
| 337 | +.skills-instaladas .row.between > b, .skills-fuentes .row.between > b, .repo-skills .card > b { flex: 1 1 auto; } | |
| 329 | 338 | .prov-name { font-weight: 700; flex: 1; cursor: pointer; } |
| 330 | 339 | .panel .card a { color: var(--accent2); } |
| 331 | 340 | .repo-link:hover { text-decoration: underline; } |