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
8 changes: 4 additions & 4 deletions app/src/components/onboarding/ai-step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ export function useAiStep(): OnboardingStep {
<div className="flex flex-col gap-8">
<AiChooserPane personal={personal.data} />
{/*
* Room below it for the fade above the phone's pinned buttons (`before:h-8` in the frame's
* footer) and the frame's 16px gutter past it, so scrolled to the end, Sign out reads
* clear of it.
* No room of its own below: the frame keeps the fade's height above the phone's pinned
* buttons for every step, so scrolled to the end Sign out stops just above the fade, as
* Welcome's and the terms step's last lines do.
*/}
<div className="pb-12 lg:hidden">
<div className="lg:hidden">
<WayOut />
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions app/tests/connect-your-ai.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ describe.skipIf(!asked)("Connect your AI on OpenBot Cloud", () => {

for (const engine of engines)
for (const theme of THEMES)
test(`at a phone's width, scrolled to the end, Sign out clears the buttons' fade, in ${engine}, ${theme}`, async () => {
test(`at a phone's width, scrolled to the end, Sign out stops just above the buttons' fade as every step's last line does, in ${engine}, ${theme}`, async () => {
const server = new FakeServer("none", true);
server.acme = personalFor("organization");
const page = await open("/", server, engine, theme, PHONE);
Expand Down Expand Up @@ -874,7 +874,11 @@ describe.skipIf(!asked)("Connect your AI on OpenBot Cloud", () => {
);
});
expect(room).not.toBeNull();
expect(room ?? -1).toBeGreaterThanOrEqual(0);
// Clear of the fade, and no further: the frame keeps the fade's height above the
// buttons for every step, so a step adding room of its own doubles the gap. Within a
// pixel, for the sub-pixel sizes text is drawn at (styles.css scales it by 15/16).
expect(room ?? -2).toBeGreaterThanOrEqual(-1);
expect(room ?? Number.POSITIVE_INFINITY).toBeLessThanOrEqual(8);
if (shots) {
mkdirSync(shots, { recursive: true });
await page.screenshot({
Expand Down
Loading