Elffuss BraidHub

utopia-ia/elffuss-claw public

Skills panel fits its width again: rows wrap and names break

cc14335 put each source card and installed-skill card in
.card.col > .row.between. The old rule ".card.col b { flex: none }" then
also hit the name inside that row, so it could neither shrink nor wrap,
and the repo link was nowrap. Up to 1280 px wide the Browse button (and
Remove, for long names) ended up outside the panel, which scrolled
sideways with nothing showing there was more.

The rule now applies to the card's own title only (.card.col > b). In
the Skills rows and the browse-list cards the name takes its own line
when the row does not fit, long names and repo links break, and the
buttons keep their size and move to the next line.

ux-skills.mjs installs a skill with a long name, opens a browse list and
checks at 1280, 1024, 768 and 390 px that the panel does not scroll
sideways and that every button in it is inside the panel. All four fail
on the previous CSS.
Changeset7185ee918ff932590f60702cb88c62d1d0d85796a1882f964deebedf11bd3443
AuthorKikoCis <kikocisneros@gmail.com> · 2026-10-11 20:29 +02:00
CommitterKikoCis <kikocisneros@gmail.com> · 2026-10-11 20:29 +02:00
Parentsec220e436a4e

Browse the files at this changeset

2 files changed

modified tests/ux-skills.mjs +32 −0
@@ -92,6 +92,38 @@
9292 return document.getElementById('panel-skills').classList.contains('active') && c?.classList.contains('resaltado') && c.querySelector('details')?.open;
9393 })));
9494
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+
95127 ok('nada salió a GitHub de verdad', !fuera.some(u => /github/.test(u)), fuera.filter(u => /github/.test(u)).join(' | '));
96128 ok('sin errores de página', errores.length === 0, errores.slice(0, 3).join(' | '));
97129 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 @@
322322 .card b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
323323 .card code { background: var(--bg); padding: 2px 8px; border-radius: 6px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
324324 .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; }
326329 /* 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; }
329338 .prov-name { font-weight: 700; flex: 1; cursor: pointer; }
330339 .panel .card a { color: var(--accent2); }
331340 .repo-link:hover { text-decoration: underline; }