From a29c2b25d04cc42b0afbb568a8e4e35721e61149 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Sat, 13 Jun 2026 22:27:49 +0900 Subject: [PATCH] Research panel: Past Research library hint goes inline with section title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was rendering on a second row below the "Past research" header, inflating it to two rows. Now appended to the title span as a small inline chip — "Past research — all in Library, Research" — keeping the header at one row. Same click → close panel + open Library tab. --- static/js/research/panel.js | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/static/js/research/panel.js b/static/js/research/panel.js index 117addccc..a9fc9d96a 100644 --- a/static/js/research/panel.js +++ b/static/js/research/panel.js @@ -805,22 +805,26 @@ function _renderJobs() { }); const body = document.createElement('div'); body.className = 'research-section-body'; - // Hint inside the "Past research" header (second line, styled like the main - // Research description) — past research is kept in the Library's Research tab. + // Past Research header: link goes INLINE next to the title instead + // of on a second row. Append it to the title span as a small chip. if (key === 'past') { - const hint = document.createElement('div'); - hint.className = 'memory-desc doclib-desc research-library-hint'; - hint.innerHTML = 'All past research found in '; - hint.querySelector('.research-library-link').addEventListener('click', (e) => { - e.stopPropagation(); - // Close the research panel first so the Library opens ABOVE it on mobile - // (otherwise it stacks under the full-screen panel). - closePanel(); - if (window.documentModule && window.documentModule.openLibrary) { - window.documentModule.openLibrary({ tab: 'research' }); - } - }); - header.appendChild(hint); + const titleEl = header.querySelector('.research-section-title'); + if (titleEl) { + const hint = document.createElement('span'); + hint.className = 'research-library-hint research-library-hint-inline'; + hint.style.cssText = 'margin-left:8px;font-size:10.5px;opacity:0.65;font-weight:normal;'; + hint.innerHTML = '— all in '; + hint.querySelector('.research-library-link').addEventListener('click', (e) => { + e.stopPropagation(); + // Close the research panel first so the Library opens ABOVE it on mobile + // (otherwise it stacks under the full-screen panel). + closePanel(); + if (window.documentModule && window.documentModule.openLibrary) { + window.documentModule.openLibrary({ tab: 'research' }); + } + }); + titleEl.appendChild(hint); + } } arr.forEach(j => body.appendChild(_buildJobCard(j))); sec.appendChild(header);