fix(skills): size the raw editor from its source lines

This commit is contained in:
red person
2026-10-28 06:54:12 +03:00
parent a646b59110
commit c207ed1ed8
5 changed files with 84 additions and 5 deletions
+1 -1
View File
@@ -2671,7 +2671,7 @@
<script type="module" src="/static/js/dragSort.js"></script>
<script type="module" src="/static/js/sessions.js"></script>
<script type="module" src="/static/js/memory.js"></script>
<script type="module" src="/static/js/skills.js?v=20260909kebabconsistency1"></script>
<script type="module" src="/static/js/skills.js?v=20261028skillheight1"></script>
<script type="module" src="/static/js/tourHints.js"></script>
<script type="module" src="/static/js/tourAutoplay.js"></script>
<script type="module" src="/static/js/fileHandler.js?v=20260909mobileattachmentedit1"></script>
+2 -2
View File
@@ -272,7 +272,7 @@ export function openMemoryModal(tabName = 'browse') {
if (tab) {
tab.click();
} else if (target === 'skills') {
import('./skills.js?v=20260909kebabconsistency1').then(m => {
import('./skills.js?v=20261028skillheight1').then(m => {
if (m.loadSkills) m.loadSkills(true);
else if (m.default?.loadSkills) m.default.loadSkills(true);
});
@@ -1613,7 +1613,7 @@ document.addEventListener('DOMContentLoaded', () => {
});
// Lazy-load skills tab (cascade=true → play the domino-in entrance)
if (target === 'skills') {
import('./skills.js?v=20260909kebabconsistency1').then(m => { if (m.loadSkills) m.loadSkills(true); else if (m.default?.loadSkills) m.default.loadSkills(true); });
import('./skills.js?v=20261028skillheight1').then(m => { if (m.loadSkills) m.loadSkills(true); else if (m.default?.loadSkills) m.default.loadSkills(true); });
}
});
});
+3
View File
@@ -1288,6 +1288,9 @@ function _toggleSkillEdit(card, name) {
ta.className = 'skill-md-editor';
ta.spellcheck = false;
ta.value = (card._md != null ? card._md : (pre ? pre.textContent : '')) || '';
// Let the source set the intrinsic height; the card's existing flex/max
// height keeps long files bounded and the Save footer reachable.
ta.rows = Math.max(ta.rows, ta.value.split(/\r\n|\r|\n/).length);
ta.addEventListener('click', (e) => e.stopPropagation());
if (pre) pre.style.display = 'none';
preview.insertBefore(ta, preview.querySelector('.doclib-card-expanded-actions'));
+2 -2
View File
@@ -7,7 +7,7 @@
// - Other static assets (images/fonts/libs): cache-first with bg refresh.
// - API / non-GET: never cached.
// Bump CACHE_NAME whenever the precache list or SW logic changes.
const CACHE_NAME = 'odysseus-v659-notes-reference';
const CACHE_NAME = 'odysseus-v660-skill-source-height';
// KaTeX resolves these from its own stylesheet, so caching the CSS without them
// gives offline math fallback glyphs instead of proper typesetting.
@@ -68,7 +68,7 @@ const PRECACHE = [
'/static/js/dragSort.js',
'/static/js/sessions.js',
'/static/js/memory.js',
'/static/js/skills.js?v=20260909kebabconsistency1',
'/static/js/skills.js?v=20261028skillheight1',
'/static/js/skillsMetrics.js?v=20260908autonomousskills1',
'/static/js/tourHints.js',
'/static/js/fileHandler.js?v=20260909mobileattachmentedit1',