Skip to content

Add a start quiz, finish cards, Builder pages, and a correlation game - #58

Merged
jsshin2022 merged 3 commits into
hub-intro-readmefrom
hub-service-layer
Oct 23, 2026
Merged

jsshin2022 merged 3 commits into
hub-intro-readmefrom
hub-service-layer

Conversation

@jsshin2022

@jsshin2022 jsshin2022 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Stacked on #57 (README). Merge #57 first; this PR then points at main.

Design and metrics: PM doc "Causal Inference Hub 서비스 레이어 설계와 지표" (event names below match its event list).

What changes

F0 Event layer (assets/js/track.js)

  • hubTrack(name, params) sends to GA4 when gtag or dataLayer exists and does nothing otherwise, so it ships before the measurement ID.
  • Hub events: click_featured, click_partner, select_route, quiz_start/quiz_complete, open_repo (with source), click_outbound, mark_done, finish_card_open, share, open_builder, click_join. Game: game_start, game_answer, game_complete.
  • Shared links get utm_source=share&utm_medium=… (finish_card, game, builder_page, badge).

F4 Start quiz: "잘 모르겠다면 3문항으로 시작점 찾기" under the goal chips. Three questions map to one existing route; people who already know the basics start after the L0 primer. Also opens with ?quiz=1 or #start. Answers are not stored.

F5 Finish card: when every item in a level is marked done, the dialog and the continue row offer a 1200×630 card (canvas) to save, plus a hub link to copy.

F1–F3 Builder pages, badges, retro

  • scripts/build_builders.py writes builders/<slug>.html, builders/index.html and badges/<slug>.svg from the data files. Generated output is git-ignored; the deploy workflow runs the script.
  • Share images assets/og/builders/<slug>.jpg come from scripts/builder_cards.py (Playwright) and are committed.
  • builders.json gets a fixed slug. projects.json accepts an optional retro (why / learned / next), shown in the dialog and on the page only when filled.
  • The Builder dialog links to the page and copies its share link.

F6 Game (game.html, assets/js/game.js, data/game.json): ten situations, each with a claim to judge, each with a reason and a web book chapter, then a score, chapters to revisit, and links to the quiz and sharing.

Docs: README lists the new things to try; CONTRIBUTING explains Builder page generation, share images, the game file, retro, and the event layer.

Checked

  • 1440px and 390px: no overflow, no console errors on hub, game, Builder pages and index.
  • Quiz → route applied to the shelf; L0 finish → banner → card → PNG download.
  • Game: 10 answers, score, events; Builder page timeline, badge, copy buttons.
  • All listed events reach dataLayer in a test run.

Generated by Claude Code

Review fixes (fresh-eyes review on desktop and mobile)

  • Quiz: optional first stop no longer hidden by the global .skip class; result states why the route was picked; "이 순서로 보기" scrolls to the shelf and opens at the suggested card, and the route note starts there.
  • Events: analytics attribute is now data-event (map lines used data-track and sent junk events); no open_repo after "학습 완료"; finer open_repo.source; click_join.source; retry on quiz/game start; experience key; game_complete carries total and per-kind counts.
  • Game: each situation states the claim; 5 causal / 5 correlational; assumptions written into the situations; answering "상관" every time no longer passes; share includes the score and uses the share sheet.
  • Finish card: optional name, next-level button, share sheet with download fallback.
  • Builder pages: badge "N기부터 · M개 기수", self-edit link, badge code wraps on phones. /#contrib scrolls to the section. Privacy copy matches what is sent.

Generated by Claude Code

…game

- assets/js/track.js: hubTrack() sends events to GA4 when it is
  installed and does nothing otherwise; shared copy and share-url
  helpers. Hub clicks are tagged with the names in the event list.
- Start quiz: three questions pick one of the existing routes and its
  first repo; reachable from the goal row, #start, or ?quiz=1.
- Finish card: when every item in a level is marked done, the hub
  offers a 1200x630 card to save, drawn on a canvas.
- Builder pages: scripts/build_builders.py writes builders/<slug>.html,
  an index, and an SVG badge per Builder; the deploy workflow runs it.
  Share images come from scripts/builder_cards.py. The Builder dialog
  links to the page and shows a project retro when one is filled in.
- game.html: ten situations to sort into correlation or causation,
  each answer linking to a web book chapter.
- Quiz: the optional first stop no longer hides behind the skip-link
  class; the result says why the route was picked, and "이 순서로 보기"
  scrolls to the shelf, opens at the suggested card, and the route note
  starts there. Marketing work with hands-on experience goes to the
  experiment route; "used it at work" plus "code" starts at L2.
- Events: analytics attribute renamed to data-event so map lines stop
  sending their track id; re-rendering after "학습 완료" no longer sends
  open_repo; open_repo sources split (continue, spotlight, fresh,
  map_list, builder_dialog); click_join carries source; quiz_start and
  game_start carry retry; quiz key exp renamed to experience.
- Game: each situation states the claim being judged; five causal and
  five correlational items; wording states the assumptions; the result
  splits the score by kind so answering "상관" every time does not pass;
  sharing includes the score and uses the share sheet when available.
- Finish card: optional name, wording for a single item, next level
  button, share sheet on phones with download as fallback.
- Builder pages: badge reads "N기부터 · M개 기수"; a self-edit link
  when the intro or photo is missing; badge code wraps on phones.
- /#contrib scrolls to the section; privacy copy matches what is sent.
@jsshin2022
jsshin2022 merged commit 03961a1 into hub-intro-readme Oct 23, 2026
@jsshin2022
jsshin2022 deleted the hub-service-layer branch October 25, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant