revert(motion): drop the legacy-file edits, keep the Astro ones
The motion pass edited five legacy files. Two changes were behaviour regressions on the live site, and all five were out of scope: the brief asks for an inventory of `src/`, and the legacy pages are what visitors see until task 20 cuts over. The confirmed break: `styles.css` changed the reading-progress bar to `width:100%; transform:scaleX(0)`, but `app.js:406` still sets `style.width = "N%"`. The inline width applies, the scaleX(0) is never updated, and the bar renders at 0px on every legacy page. Verified in a headless browser at 1100px, scrolled halfway: computed transform `matrix(0, 0, 0, 1, 0, 0)`, bounding width `0`. The Astro island was updated to set `transform` and is correct -- its half-scrolled bar measures 595px -- so only the legacy half was broken. The route-meter change (`height:var(--score)` to `transform:scaleY(var(--score))` in `responsive.css`) does work: `--score` is a percentage and Chromium accepts a percentage in `scaleY()`. It is reverted anyway, because it belongs in the component. `responsive.css` is being retired by task 15e, which is porting these rules into the components that need them; that is where the meter should stop animating a layout property. Noted in the 15e brief. The three review-desk animations added to `skills-review/` are not broken, but they change live-site behaviour ahead of the cutover and the same motion already exists on the Astro side. Reverted for the same reason. Kept: every `src/` change -- the ReadingProgress transform, the guide panel swap, the change-lens and package-preview easing, and the vote widget tally pop.
This commit is contained in:
@@ -437,14 +437,10 @@ function previewMarkup(entry, available) {
|
||||
function renderDetail() {
|
||||
const entry = state.selected;
|
||||
const available = packageFiles(entry);
|
||||
const detailPanel = $('#detail');
|
||||
detailPanel.innerHTML =
|
||||
$('#detail').innerHTML =
|
||||
`<header><div><span class="status">${escape(entry.status)}</span><h2>${escape(entry.title)}</h2><p>Submitted by <a class="author-link" href="?author=${encodeURIComponent(entry.author)}">${escape(entry.author)}</a> · <a class="share-link" href="?author=${encodeURIComponent(entry.author)}&skill=${encodeURIComponent(entry.id)}&view=${state.preview}">share review ↗</a></p></div><div class="switch" role="group" aria-label="Preview version"><button class="${state.preview === 'original' ? 'active' : ''}" data-preview="original">Original</button><button class="${state.preview === 'improved' ? 'active' : ''}" data-preview="improved">Improved draft</button></div></header><div class="purpose"><span>THE JOB</span><p>${escape(entry.focus)}</p></div><div id="vote-widget"></div><div class="review-grid"><section><span>WHAT'S ALREADY WORKING</span><ul>${entry.wins.map((item) => `<li>${escape(item)}</li>`).join('')}</ul></section><section><span>HIGHEST-VALUE IMPROVEMENTS</span><ul>${entry.improve.map((item) => `<li>${escape(item)}</li>`).join('')}</ul></section></div><aside class="extras"><span>GOOD NEXT ADDITION</span><p>${escape(entry.extras)}</p></aside>${previewMarkup(entry, available)}`;
|
||||
detailPanel.classList.remove('is-swapping');
|
||||
void detailPanel.offsetWidth;
|
||||
detailPanel.classList.add('is-swapping');
|
||||
renderVoteWidget($('#vote-widget'), entry.id);
|
||||
detailPanel
|
||||
$('#detail')
|
||||
.querySelectorAll('[data-file]')
|
||||
.forEach((button) =>
|
||||
button.addEventListener('click', () => {
|
||||
|
||||
Reference in New Issue
Block a user