8000 fix(menu): no empty foot under scrolling lists, an instant Back from the Builder by alexiscolin · Pull Request #3 · alexiscolin/gnogolf · GitHub
[go: up one dir, main page]

Skip to content
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
2 changes: 2 additions & 0 deletions web/app/title.css
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ body:has(.sheet) .modetag { visibility: hidden; }
its top, the rest in the middle of what is left (a column taller than that room: from its top, and the screen scrolls) */
.screen.front:is(.modes, .worlds--v2:has(.worlds__list), .screen--pick):not(.front--fit) { align-content: stretch; align-items: stretch; }
.screen.front--fit > .worlds__in.rival { flex-grow: 1; }
/* a screen whose last frame scrolls in itself: that frame runs down to the screen's foot, its own fade the edge */
.screen.front--fit:has(.ghosts__list, .lb--full) { padding-bottom: var(--sp-4); }
.front:is(.modes, .worlds--v2:has(.worlds__list)) > .worlds__in, .screen--pick > .pick { display: flex; flex-direction: column; align-items: center; }
.front:is(.modes, .worlds--v2:has(.worlds__list), .screen--pick) :is(.front__head, .pick__name) + * { margin-top: auto; }
.front:is(.modes, .worlds--v2:has(.worlds__list), .screen--pick) .front__veil { margin-bottom: auto; }
Expand Down
5 changes: 4 additions & 1 deletion web/components/builder/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { census } from "@/lib/builder/drawn";
import { isHoleId, makeChain } from "@/lib/chain";
import { startsIn } from "@/lib/builder/templates";
import { endpoints, playLink } from "@/lib/builder/holes";
import { goToMenu } from "@/lib/menu";
import { goToMenu, menuLink } from "@/lib/menu";
import { whenIdle } from "@/lib/idle";
import { proofKey } from "@/lib/builder/proof";
import { versionOf } from "@/lib/builder/testmode";
import { FIELD, weatherName, worldName } from "@/lib/builder/rules";
Expand Down Expand Up @@ -65,6 +66,8 @@ export default function Start({ author, drafts, said = "", onOpen, onAdd, onDele
const { rpc, web, keep } = endpoints(window.location.search);
return { chain: makeChain({ rpc, web }), keep };
}, []);
// the game's code and its menu fetched in idle moments, so Back to the game opens it with no loader
useEffect(() => whenIdle([() => router.prefetch(menuLink(keep)), () => import("@/components/Golf").catch(() => {})]), [keep]); // eslint-disable-line react-hooks/exhaustive-deps -- (the router: the app's own)
// the author's holes on the chain: each draft's own (its alias), and those this browser has no draft of
const { got, reload } = useRewards(chain, author);
const rowOf = (d: Draft) => (author && d.slug && got?.rows.find((h) => h.slot === `${author}/${d.slug}`)) || null;
Expand Down
Loading
0