Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
41 changes: 41 additions & 0 deletions components/core/SlideshowViewer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,47 @@ describe("SlideshowViewer clicker keys", () => {
});
});

describe("SlideshowViewer mounting", () => {
const numbered = (n: number) =>
function NumberedSlide() {
return <p data-slide={n} />;
};
const deck = { ...config, slides: [0, 1, 2, 3, 4].map(numbered) };
const mounted = () =>
[...container.querySelectorAll<HTMLElement>("[data-slide]")].map((slide) => [
slide.dataset.slide,
slide.parentElement?.style.display,
]);

it("keeps each neighbor mounted and hidden across moves, and unmounts a slide two or more away", async () => {
await renderAt("/slides/demo?slide=2", deck);
expect(mounted()).toEqual([["1", "none"], ["2", "block"], ["3", "none"]]);
// The same node means React kept the slide's instance, so its state survives the move.
const shown = container.querySelector("[data-slide='2']");
await press("ArrowRight");
expect(container.querySelector("[data-slide='2']")).toBe(shown);
await press("ArrowLeft");
expect(container.querySelector("[data-slide='2']")).toBe(shown);
const neighbor = container.querySelector("[data-slide='3']");
await press("End");
expect(mounted()).toEqual([["3", "none"], ["4", "block"]]);
expect(container.querySelector("[data-slide='3']")).toBe(neighbor);
});

it("keeps each slide's instance while it or its neighbor steps through builds", async () => {
const built = { ...config, slides: [{ component: numbered(0), builds: 2 }, numbered(1)] };
await renderAt("/slides/demo", built);
expect(mounted()).toEqual([["0", "block"], ["1", "none"]]);
const first = container.querySelector("[data-slide='0']");
const second = container.querySelector("[data-slide='1']");
for (const key of ["ArrowRight", "ArrowRight", "ArrowLeft", "ArrowLeft"]) {
await press(key);
expect(container.querySelector("[data-slide='0']")).toBe(first);
expect(container.querySelector("[data-slide='1']")).toBe(second);
}
});
});

describe("SlideshowViewer exportBuilds", () => {
const seen: (number | undefined)[] = [];
const Probe = ({ buildStep }: { buildStep?: number }) => {
Expand Down
2 changes: 1 addition & 1 deletion slideshows/appam-2026/EVIDENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ We quote these on slide 7 and in the notes' Questions section, and we model none

## The web apps

We captured slide 12's coverage tracker from www.policyengine.org/us/model/rules/coverage on November 5, 2026. It shows 109 total programs, 87 complete, 18 partial and 4 in progress, and its top line reads "Coverage reflects policyengine-us 2.72.3 (main @ 4c65c82, fetched 2026-10-27). The production API served 2.2.1 when the snapshot was fetched." The deck's own runs use 2.90.2. Slide 12 loads that page in a live frame at the still's crop, and the still shows until the tracker renders and stands in for it in the PDF.
We captured slide 12's coverage tracker from www.policyengine.org/us/model/rules/coverage on November 5, 2026. It shows 109 total programs, 87 complete, 18 partial and 4 in progress, and its top line reads "Coverage reflects policyengine-us 2.72.3 (main @ 4c65c82, fetched 2026-10-27). The production API served 2.2.1 when the snapshot was fetched." The deck's own runs use 2.90.2. We load that page in a live frame on slide 12 at the still's crop, and print the still alone in an export. We show the still until the tracker prints that snapshot line and its four count cards finish fading in.

We captured slide 11's CliffWatch screenshot on November 4, 2026, and Build's report on November 5, 2026, from the live sites. We scripted the recording, built it from screenshots and drew its cursor and address bar. CliffWatch drew that run's chart in under a second. Other runs took longer.

Expand Down
2 changes: 1 addition & 1 deletion slideshows/appam-2026/SPEAKER-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ In Build, you can open the same Massachusetts credit, set it to $880, pick Massa

We model federal income and payroll taxes and credits and every state income tax, in 44 jurisdictions. We model TANF and child care subsidies in all 50 states and DC, plus SNAP, WIC, SSI, school meals, ACA premium tax credits, Medicaid and CHIP eligibility and local taxes such as Philadelphia's wage tax. Our coverage tracker lists 109 programs and marks 87 complete, 18 partial and 4 in progress.

*The tracker runs live in the frame, so you can click and scroll in it, and the arrows keep moving the deck. If you click its search box, click the slide outside the frame, which also moves to the next step.*
*Once the tracker loads, you can click and scroll in the frame, and the left and right arrow keys still move the deck. After you click in its search box, they move the box's cursor until you click elsewhere in the frame. If you pick a year in its menu, the four counts change, because the tracker counts only the programs we mark verified for that year.*

## 13. We build Microcosm, our microdata, from surveys and official totals (9:50, 50 seconds)

Expand Down
Loading
Loading