{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":51668609,"defaultBranch":"main","name":"kurve","ownerLogin":"SimonAlling","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-02-13T22:22:37.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/7497533?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1697211574.0","currentOid":""},"activityList":{"items":[{"before":"582d40b2cd846fe2387f147758157266fab2d360","after":null,"ref":"refs/heads/wip-confirm-quit","pushedAt":"2023-10-13T15:39:34.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"}},{"before":"c4f39c27043d5ef0b09599515c38f85fe3c932cd","after":"75261c693c7fc84e842b520c7058aadf8035f452","ref":"refs/heads/WIP-declarative-heads","pushedAt":"2023-10-13T15:35:17.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"},"commit":{"message":"Vet inte vad detta är men nåt med onAnimationFrameDelta och inga huvuden","shortMessageHtmlLink":"Vet inte vad detta är men nåt med onAnimationFrameDelta och inga huvuden"}},{"before":null,"after":"97aa50352fbaef85c92868c8f9303e5050de0e19","ref":"refs/heads/WTF-stateToRender","pushedAt":"2023-05-02T07:24:37.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"},"commit":{"message":"console.warn","shortMessageHtmlLink":"console.warn"}},{"before":"6a457685de19dd64e56b0f3f0d073834ae0a3f68","after":"01ca8e7aff424418e78d3ad94da8afa8afb41a5f","ref":"refs/heads/EXPERIMENTAL-performance","pushedAt":"2023-05-02T07:24:26.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"},"commit":{"message":"DRY up init","shortMessageHtmlLink":"DRY up init"}},{"before":null,"after":"6a457685de19dd64e56b0f3f0d073834ae0a3f68","ref":"refs/heads/EXPERIMENTAL-performance","pushedAt":"2023-05-01T15:53:53.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"},"commit":{"message":"Implement \"Fix Your Timestep\"\n\nSee last code example here:\n\nhttps://gafferongames.com/post/fix_your_timestep/","shortMessageHtmlLink":"Implement \"Fix Your Timestep\""}},{"before":null,"after":"c4f39c27043d5ef0b09599515c38f85fe3c932cd","ref":"refs/heads/WIP-declarative-heads","pushedAt":"2023-04-26T12:59:45.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"},"commit":{"message":"First POC of declarative heads","shortMessageHtmlLink":"First POC of declarative heads"}},{"before":"b9188e7d3d524ba0c5b6d5fd467b536bae490aca","after":null,"ref":"refs/heads/confirm-quit","pushedAt":"2023-04-25T19:45:24.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"}},{"before":"05cef13f91f5be01866edb97c25c0311c96d9497","after":"2c25a7fb133fdd28ab41f3f752653396937bc0db","ref":"refs/heads/main","pushedAt":"2023-04-25T19:45:23.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"SimonAlling","name":"Simon Alling","path":"/SimonAlling","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/7497533?s=80&v=4"},"commit":{"message":"Add confirmation dialog when quitting (#83)\n\nIn the original MS-DOS game, when Escape is pressed between rounds, the\r\ngame immediately exits to the splash screen. In\r\n83ca2595037f462f6467d196d15ae146aaeec5b9, the legacy JavaScript version\r\nintroduced an optional confirmation dialog (enabled by default), because\r\naccidentally quitting in the middle of a game _sucks_. Unlike in the\r\noriginal game, \"quitting\" in the legacy JavaScript version means going\r\nto the lobby, not the splash screen, because that's almost always more\r\nuseful.\r\n\r\nThis PR brings a similar confirmation dialog to the Elm version. Since\r\nwe don't have any user-facing preferences (yet), it's always enabled.\r\n\r\nHaving experimented with various approaches, I've decided to go with\r\nthis one, which implements keyboard interaction entirely in Elm, instead\r\nof relying on the browser's native behavior.\r\n\r\nNeither solution is without its flaws. The browser approach has these\r\ndisadvantages:\r\n\r\n * The arrow keys don't work for moving focus between the buttons.\r\n * Pressing Tab (or Shift + Tab) cycles through _all focusable\r\n elements_ in the page, and even the browser chrome, so the dialog\r\n doesn't feel modal.\r\n * When the dialog is opened, the \"No\" button must be focused with\r\n `Browser.Dom.focus` and `Task.attempt`. That is, we must look it up\r\n by ID and handle the possibility that it doesn't exist, even though\r\n we know that it does.\r\n * We have to control in Elm whether we should call the\r\n `preventDefault` method in JavaScript or not (for example by\r\n conditionally setting an attribute in Elm and check for it in\r\n JavaScript).\r\n\r\nThe Elm approach has these:\r\n\r\n * We're reinventing the wheel when it comes to moving focus between\r\n input elements and interacting with them.\r\n * Supporting more than two input elements would require a more general\r\n implementation for the complexity to stay reasonable.\r\n * Since we use `event.code` (the physical key), not `event.key` (the\r\n meaning of the key), the dialog may not behave as expected with\r\n non-QWERTY layouts.\r\n\r\nWhile we suspect that the Elm approach may not cut it if/when we\r\nintroduce more input elements down the road, I think this implementation\r\nis good enough for now. I also believe there's value in documenting in\r\nthe Git history that we initially did it this way and why.\r\n\r\nI decided to go with `