Theseus 0.3.123 (cont'd): catalog visible by default, "+ Show more" at the bottom

The curated catalog was hidden behind the "+ Add search engine" button at
the top-right of the header, which buried the common case (pick one of
the five curated options) behind an extra click. Flipped the layout so
the curated catalog paints inline right below the Enabled list, and the
"+ Show more" button lives at the bottom — opens the Discover-more bank
and the custom-URL form. Same change on the AI engines page.
This commit is contained in:
Local Dev 2026-10-27 20:58:48 +02:00
parent ffc4d4d79e
commit fb3fa84d15

View file

@ -760,21 +760,21 @@
<div class="ctl"><div class="esel" id="searchEngine" tabindex="0" role="combobox" aria-haspopup="listbox" aria-expanded="false" title="Default search engine"><span class="eic"></span><span class="enm"></span><span class="caret">▾</span></div></div>
</div>
<div class="row" style="flex-direction:column;align-items:stretch;gap:10px">
<div class="txt" style="display:flex;align-items:center;justify-content:space-between;gap:12px">
<div>
<div class="t">Additional search engines</div>
<div class="d">These appear in the toolbar dropdown. Drag to reorder. Toggle off to move an engine back to the catalog.</div>
</div>
<button id="engAddBtn" class="btn" type="button">+ Add search engine</button>
<div class="txt">
<div class="t">Additional search engines</div>
<div class="d">These appear in the toolbar dropdown. Drag to reorder. Toggle off to move an engine back to the catalog.</div>
</div>
<div id="engineList"></div>
<!-- Catalog: hidden until "Add" is clicked. Three tiers, top to bottom:
1. curated built-ins the user hasn't enabled (tier="catalog")
2. wider bank filtered by a search box (tier="extra")
3. custom-URL form -->
<!-- Add from catalog is visible by default; the wider bank + the
custom-URL form live behind "+ Show more", which sits at the
bottom of the catalog so the common case (pick one from the
curated list) is one click. -->
<div class="ehdr">Add from catalog</div>
<div id="catalogList"></div>
<div style="display:flex;justify-content:flex-start;margin-top:6px">
<button id="engAddBtn" class="btn" type="button">+ Show more</button>
</div>
<div id="engineCatalog" class="engcat" hidden>
<div class="ehdr">Add from catalog</div>
<div id="catalogList"></div>
<div class="ehdr" style="display:flex;align-items:center;justify-content:space-between;gap:8px">
<span>Discover more engines</span>
<input id="engineFilter" type="search" placeholder="Filter by name…" autocomplete="off"
@ -805,17 +805,17 @@
<div class="ctl"><div class="esel" id="defaultLlm" tabindex="0" role="combobox" aria-haspopup="listbox" aria-expanded="false" title="Default AI engine"><span class="eic"></span><span class="enm"></span><span class="caret">▾</span></div></div>
</div>
<div class="row" style="flex-direction:column;align-items:stretch;gap:10px">
<div class="txt" style="display:flex;align-items:center;justify-content:space-between;gap:12px">
<div>
<div class="t">Enabled AI engines</div>
<div class="d">These appear in the sidebar strip's Pick-AI dropdown. Drag to reorder. Toggle off to move an engine back to the catalog.</div>
</div>
<button id="llmAddBtn" class="btn" type="button">+ Add AI engine</button>
<div class="txt">
<div class="t">Enabled AI engines</div>
<div class="d">These appear in the sidebar strip's Pick-AI dropdown. Drag to reorder. Toggle off to move an engine back to the catalog.</div>
</div>
<div id="llmEngineList"></div>
<div class="ehdr">Add from catalog</div>
<div id="llmCatalogList"></div>
<div style="display:flex;justify-content:flex-start;margin-top:6px">
<button id="llmAddBtn" class="btn" type="button">+ Show more</button>
</div>
<div id="llmEngineCatalog" class="engcat" hidden>
<div class="ehdr">Add from catalog</div>
<div id="llmCatalogList"></div>
<div class="ehdr" style="display:flex;align-items:center;justify-content:space-between;gap:8px">
<span>Discover more AI engines</span>
<input id="llmEngineFilter" type="search" placeholder="Filter by name…" autocomplete="off"
@ -2290,7 +2290,7 @@
llmAddBtn.onclick = () => {
const open = llmCatBox.hidden;
llmCatBox.hidden = !open;
llmAddBtn.textContent = open ? "− Hide catalog" : "+ Add AI engine";
llmAddBtn.textContent = open ? "− Show less" : "+ Show more";
};
}
const llmEngAdd = document.getElementById("llmEngAdd");
@ -2337,14 +2337,16 @@
renderEngines(d);
});
};
// "+ Add search engine" toggles the catalog panel below the enabled list.
// "+ Show more" opens the Discover-more engines list and the custom-URL
// form. The curated catalog above it is always visible — the common case
// (pick a curated engine) is one click.
const catBtn = document.getElementById("engAddBtn");
const catBox = document.getElementById("engineCatalog");
if (catBtn && catBox) {
catBtn.onclick = () => {
const open = catBox.hidden;
catBox.hidden = !open;
catBtn.textContent = open ? "− Hide catalog" : "+ Add search engine";
catBtn.textContent = open ? "− Show less" : "+ Show more";
};
}
C.engines().then(renderEngines);