diff --git a/library/packet/countrySheet.js b/library/packet/countrySheet.js index 2be3ed1d9..78acd1625 100644 --- a/library/packet/countrySheet.js +++ b/library/packet/countrySheet.js @@ -79,7 +79,8 @@ export function seriesFor(countries, item) { * packet and cards are offered on a desktop or laptop only (a phone cannot draw a sheet that big). * The data (country-posters.json) still records why no PAPER sheet fits; this table is what prints instead. */ -export const LARGE_SHEETS = { IND: { format: '66x66', formats: ['66x66', '60x96', '36x60'], desktopOnly: true } } +// India: 5 x 8 ft (60x96) ONLY, the size its whole-country layout is built and tuned for. +export const LARGE_SHEETS = { IND: { format: '60x96', formats: ['60x96'], desktopOnly: true } } const largeOf = (item) => (item && LARGE_SHEETS[String(item.iso3 || '').toUpperCase()]) || null /** * ★ WITHHELD: a whole-country poster that is NOT shipped yet, though the renderer can draw it. India's 855 groups do diff --git a/plugin-designs/country-posters/scripts/check-country-sheet-one-path.mjs b/plugin-designs/country-posters/scripts/check-country-sheet-one-path.mjs index 559204dd5..7181239bd 100644 --- a/plugin-designs/country-posters/scripts/check-country-sheet-one-path.mjs +++ b/plugin-designs/country-posters/scripts/check-country-sheet-one-path.mjs @@ -99,11 +99,11 @@ export function armB(seriesFor, countries, sheetFormatFor = null) { const by = (iso) => countries.find((c) => c.iso3 === iso) const ind = by('IND') const s = ind && seriesFor(countries, ind) - // THE LARGE-SHEET FORMAT RULE: India prints the large size ASKED FOR, else its 66x66 default; a packet page stays a + // THE LARGE-SHEET FORMAT RULE: India prints 60x96 ONLY (any request but a packet page gets it); a packet page stays a // page; any other country gets exactly what it asked for. if (sheetFormatFor) { - const want = [[ind, '66x66', '66x66'], [ind, '36x60', '36x60'], [ind, '60x96', '60x96'], [ind, 'letter', '66x66'], [ind, '3x4', '66x66'], [ind, 'packet', 'packet'], - [by('NPL'), '3x3', '3x3'], [by('NPL'), 'letter', 'letter'], [by('CHN'), '3x4', '3x4']] + const want = [[ind, '60x96', '60x96'], [ind, '66x66', '60x96'], [ind, '36x60', '60x96'], [ind, 'letter', '60x96'], [ind, '3x4', '60x96'], [ind, 'packet', 'packet'], + [by('NPL'), '3x3', '3x3'], [by('NPL'), 'letter', 'letter'], [by('CHN'), '3x4', '3x4'], [by('NPL'), '66x66', '66x66']] for (const [item, ask, exp] of want) { const got = sheetFormatFor(item, ask); if (got !== exp) fails.push(`sheetFormatFor(${item?.iso3}, ${ask}) = ${got}, expected ${exp}`) } } const oversized = countries.filter((c) => (c.sheet ?? null) === null) @@ -182,8 +182,7 @@ export function armF(srcs) { // ARM G — WHAT OF A WHOLE COUNTRY IS WITHHELD (countrySheet.js WITHHELD), and the PREVIEW guard. India: // (a) BY DEFAULT (every public host: DX Life, the research landing, any embed) its whole-country POSTER is withheld // (the sentence; largeSheet() null) and its ROWS are withheld; -// (b) only in a PREVIEW context (globalThis.DXM_PREVIEW_UNRELEASED === true: the Plugin Studio on the pilot) the poster -// prints, 66x66 by default; its rows stay withheld. A state card is never withheld. +// (b) only in a PREVIEW context (the Vite dev server: the Plugin Studio on the pilot) the poster prints, 60x96 ONLY; its rows stay withheld. A state card is never withheld. // Each caller shows the sentence for a withheld POSTER and rejects the rows for withheld ROWS; Country Posters' India // tab exists only under the preview flag. export async function armG(cs, srcs, mfeSrc = '') { @@ -199,7 +198,7 @@ export async function armG(cs, srcs, mfeSrc = '') { } finally { if (was === undefined) delete globalThis.DXM_PREVIEW_UNRELEASED; else globalThis.DXM_PREVIEW_UNRELEASED = was } if (!cs.rowsWithheld(ind)) fails.push("India's rows are not withheld: its list/packet/cards (~1,000 pages) would print") const big = cs.largeSheet(ind, true) - if (cs.posterWithheld(ind, true) || !big || big.format !== '66x66') fails.push(`(b) an open preview does not print India's poster at 66x66 (${big && big.format})`) + if (cs.posterWithheld(ind, true) || !big || big.format !== '60x96' || big.formats.join() !== '60x96') fails.push(`(b) an open preview does not print India's poster at 60x96 only (${big && big.formats})`) if (cs.sheetWithheld(ind) !== cs.posterWithheld(ind)) fails.push('sheetWithheld() no longer means the poster') if (cs.rowsWithheld({ iso3: 'IND', indiaState: true, id: 'india-state-gujarat' })) fails.push('an India STATE card has withheld rows (only the whole country may)') for (const [name, src] of Object.entries(srcs)) { @@ -269,7 +268,7 @@ async function main() { ['a division silently dropped', () => armC(H, states.filter((st) => st.id !== 'india-mz'), adm1Ind)], ['the wall stops passing sectionTotal (India counted twice)', () => armE(countries, states, files[wall].replace(':section-total=', ':x-section-total='), readFileSync(join(ROOT, 'library/components/poster/PosterWall.vue'), 'utf8'), H).fails], ['India country card left in Asia', () => armE(countries, states, files[wall].replace("=== 'IND'", "=== 'XXX'"), readFileSync(join(ROOT, 'library/components/poster/PosterWall.vue'), 'utf8'), H).fails], - ['India ignores a requested 66x66', () => armB(seriesFor, countries, (it, f) => (it?.iso3 === 'IND' && f !== 'packet' ? '60x96' : f))], + ['India offered 66x66 again', () => armB(seriesFor, countries, (it, f) => (it?.iso3 === 'IND' && f === '66x66' ? '66x66' : sheetFormatFor(it, f)))], ['a packet page becomes a large sheet', () => armB(seriesFor, countries, (it, f) => (it?.iso3 === 'IND' ? '60x96' : f))], ['the wall resolves [] for a phone-blocked card', () => armF({ wall: files[wall].replace("const desktopOnly = () => Promise.reject(keyedError('poster.phoneLimitAll'", "const desktopOnly = () => Promise.resolve([]) || (keyedError('poster.phoneLimitAll'"), regions: REG })], ['the Regions list resolves [] for a phone-blocked card', () => armF({ wall: files[wall], regions: REG.replace("phoneBlocked(item) ? Promise.reject(keyedError('poster.phoneLimitAll'", "phoneBlocked(item) ? Promise.resolve([]) || (keyedError('poster.phoneLimitAll'") })],