Repository navigation
Add a start quiz, finish cards, Builder pages, and a correlation game - #58
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whengtagordataLayerexists and does nothing otherwise, so it ships before the measurement ID.click_featured,click_partner,select_route,quiz_start/quiz_complete,open_repo(withsource),click_outbound,mark_done,finish_card_open,share,open_builder,click_join. Game:game_start,game_answer,game_complete.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=1or#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.pywritesbuilders/<slug>.html,builders/index.htmlandbadges/<slug>.svgfrom the data files. Generated output is git-ignored; the deploy workflow runs the script.assets/og/builders/<slug>.jpgcome fromscripts/builder_cards.py(Playwright) and are committed.builders.jsongets a fixedslug.projects.jsonaccepts an optionalretro(why / learned / next), shown in the dialog and on the page only when filled.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
dataLayerin a test run.Generated by Claude Code
Review fixes (fresh-eyes review on desktop and mobile)
.skipclass; result states why the route was picked; "이 순서로 보기" scrolls to the shelf and opens at the suggested card, and the route note starts there.data-event(map lines useddata-trackand sent junk events); noopen_repoafter "학습 완료"; fineropen_repo.source;click_join.source;retryon quiz/game start;experiencekey;game_completecarriestotaland per-kind counts./#contribscrolls to the section. Privacy copy matches what is sent.Generated by Claude Code