Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified archify.zip
Binary file not shown.
7 changes: 5 additions & 2 deletions archify/renderers/lifecycle/render-lifecycle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1017,11 +1017,14 @@ function legendCatalog() {
// The start marker and final ring remain meaningful in a change review.
const entries = reviewLegendEntries(changeReview, resolveLegend(config, LEGEND_CATALOG, presentKinds), config,
LEGEND_CATALOG.map((entry) => entry.kind).filter((kind) => kind !== 'start'));
if (config?.mode !== 'hidden' && config?.entries?.final?.visible !== false && [...states.values()].some(isFinal)) {
const changeEntries = changeLegendEntries(changeReview, config, lifecycle.meta.locale);
// The final ring explains other entries; on its own it would be legend chrome with nothing to explain.
if ((entries.length || changeEntries.length) && config?.mode !== 'hidden'
&& config?.entries?.final?.visible !== false && [...states.values()].some(isFinal)) {
Comment thread
tt-a1i marked this conversation as resolved.
Resolved
const label = config?.entries?.final?.label || i18nText(lifecycle.meta.locale, 'legend.lifecycle.final');
entries.push({ kind: 'final', label, interactive: false, present: true, swatchWidth: 16 });
}
return [...entries, ...changeLegendEntries(changeReview, config, lifecycle.meta.locale)];
return [...entries, ...changeEntries];
}
const legendEntries = legendCatalog();
const canvasWidth = Math.max(640, Math.ceil(geometry.contentRight + MARGIN_X));
Expand Down
8 changes: 8 additions & 0 deletions test/code-analysis-standalone-browser.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ test('standalone workbench keeps Atlas alongside evidence, both locales/themes a
const click = async selector => clickAt(await point(selector));
const hover = async selector => send('Input.dispatchMouseEvent', { type: 'mouseMoved', ...await point(selector) });
const drawSettled = "!document.documentElement.hasAttribute('data-bauify-atlas-animating')";
const readerWidthSettled = `!document.querySelector('main.container').getAnimations()
.some(animation => animation.transitionProperty === 'grid-template-columns')`;
const details = '#bauify-detail';
const priority = '.priority-card [data-finding]';
const copy = '.priority-card .quick-copy';
Expand Down Expand Up @@ -139,9 +141,15 @@ test('standalone workbench keeps Atlas alongside evidence, both locales/themes a
assert.equal(selected.kind, { 'coupling/cycle': 'modules', 'coupling/import-cycle': 'cycle' }[selected.code]);
await click(`${details} .inline-evidence .ref`);
assert.equal(await run("document.getElementById('bauify-code').hidden"), false);
// Changing reader width moves the Back buttons under the pointer.
await wait(readerWidthSettled, 'source reader did not finish expanding');
await click('#bauify-code .source-back');
await wait(`document.getElementById('bauify-code').hidden
&& document.querySelector('${details}').getClientRects().length
&& ${readerWidthSettled}`, 'finding reader did not return from source');
assert.equal(await run(selectedFinding), id, 'returning from source keeps the detail selected');
await click(`${details} .back`);
assert.equal(await run("document.getElementById('bauify-overview').hidden"), false, 'Back opens the overview');
assert.equal(await run(selectedFinding), '', 'returning to the overview restores no selection');
assert.equal(await run("!document.querySelector('.atlas-selection .selected')"), true);

Expand Down
Loading