style(correspondence): flatten history and linked thread surfaces
This commit is contained in:
@@ -9,9 +9,11 @@ import ts from 'typescript';
|
||||
const compiled = ts.transpileModule(fs.readFileSync(new URL('../src/i18n/translations.ts', import.meta.url), 'utf8'), { compilerOptions: { module: ts.ModuleKind.ESNext } }).outputText;
|
||||
const { translations } = await import(`data:text/javascript;base64,${Buffer.from(compiled).toString('base64')}`);
|
||||
const pasted = process.env.A3_PASTED_EMAIL === '1';
|
||||
const out = path.resolve(import.meta.dirname, `../../docs/ui-modernisation/evidence/${pasted ? 'pasted-email-recovery' : 'correspondence-recovery'}`);
|
||||
const flatCorrespondence = process.env.A3_FLAT_CORRESPONDENCE === '1';
|
||||
const out = path.resolve(import.meta.dirname, process.env.A3_EVIDENCE_DIR ?? `../../docs/ui-modernisation/evidence/${pasted ? 'pasted-email-recovery' : 'correspondence-recovery'}`);
|
||||
fs.mkdirSync(out, { recursive: true });
|
||||
const configurations = process.env.A3_PILOT ? [[390, 'nb', 'dark']] : [390, 1440].flatMap(width => ['en', 'nb'].flatMap(language => ['light', 'dark'].map(theme => [width, language, theme])));
|
||||
const widths = flatCorrespondence ? [390, 768, 1440] : [390, 1440];
|
||||
const configurations = process.env.A3_PILOT ? [[390, 'nb', 'dark']] : widths.flatMap(width => ['en', 'nb'].flatMap(language => ['light', 'dark'].map(theme => [width, language, theme])));
|
||||
const report = { journeys: [], captures: [], writes: [], errors: [], unavailableReads: [], blockedExternal: [] };
|
||||
const browser = await chromium.launch();
|
||||
try {
|
||||
@@ -67,6 +69,7 @@ try {
|
||||
await page.goto('http://localhost:4338/jobs/42?section=timeline&sub=correspondence');
|
||||
const retry = page.getByRole('button', { name: copy.retry, exact: true });
|
||||
await expect(retry).toBeVisible();
|
||||
if (flatCorrespondence) await expect(page.locator('.MuiPaper-outlined')).toHaveCount(0);
|
||||
const note = page.getByRole('textbox', { name: copy.correspondenceLogNoteOrMessage, exact: true });
|
||||
let draft = note;
|
||||
await draft.fill('Retain the synthetic note');
|
||||
|
||||
@@ -533,7 +533,7 @@ export default function Correspondence({ jobId, jobContext }: { jobId: number; j
|
||||
return (
|
||||
<Box>
|
||||
<ViewStateNotice title={t("correspondenceLoadFailed")} loading={messagesLoading} error={messagesError ? { kind: "error", message: getApiErrorMessage(messagesError.cause, t("correspondenceLoadFailed")), retryable: true } : null} onRetry={() => load().catch(() => undefined)} compact />
|
||||
<Paper variant="outlined" ref={scrollRef} sx={{ p: 1.5, maxHeight: 360, overflowY: "auto", bgcolor: "background.paper", borderRadius: 1 }}>
|
||||
<Box ref={scrollRef} sx={{ py: messages.length > 0 || (!messagesLoading && !messagesError) ? 1.5 : 0, maxHeight: 360, overflowY: "auto" }}>
|
||||
{messages.length === 0 && !messagesLoading && !messagesError ? (
|
||||
<Typography sx={{ color: "text.secondary", py: 2, textAlign: "center" }}>{t("correspondenceNoMessages")}</Typography>
|
||||
) : (
|
||||
@@ -569,9 +569,9 @@ export default function Correspondence({ jobId, jobContext }: { jobId: number; j
|
||||
})}
|
||||
</Box>
|
||||
)}
|
||||
</Paper>
|
||||
</Box>
|
||||
|
||||
<Box sx={{ mt: 1.5, p: 1.5, borderRadius: 1, border: 1, borderColor: "divider", bgcolor: "background.default", "& .MuiChip-root": { maxWidth: "100%", height: "auto", minHeight: 24 }, "& .MuiChip-label": { whiteSpace: "normal", overflowWrap: "anywhere" } }}>
|
||||
<Box sx={{ mt: 1.5, py: 1.5, borderTop: 1, borderColor: "divider", "& .MuiChip-root": { maxWidth: "100%", height: "auto", minHeight: 24 }, "& .MuiChip-label": { whiteSpace: "normal", overflowWrap: "anywhere" } }}>
|
||||
<Typography variant="overline">{t("correspondenceLinkedContinuity")}</Typography>
|
||||
<Typography variant="body2" sx={{ color: "text.secondary", mb: 1.25 }}>
|
||||
{t("correspondenceLinkedContinuityHelp")}
|
||||
|
||||
Reference in New Issue
Block a user