Skip to content

Instantly share code, notes, and snippets.

View robertpenner's full-sized avatar

Robert Penner robertpenner

View GitHub Profile
@robertpenner
robertpenner / stately_editor_penner.css
Last active June 24, 2022 19:38
Stylebot for Stately.ai Editor
/* Restore blue shading to current state in Simulate */
.css-1brufv, .css-z8ukhg, .css-1c8j3c2, .css-1skrtun {
background-color: unset;
}
/* Remove square from start of transition arrow */
path {
marker-start: unset;
}
@robertpenner
robertpenner / machine.js
Last active May 10, 2022 16:48
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine(
{
id: "Search Field",
context: {
filterTyped: "",
filterApplied: "",
},
initial: "collapsed",
states: {
@robertpenner
robertpenner / machine.js
Created January 4, 2022 20:36
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Planning Poker",
initial: "playing",
states: {
playing: {
initial: "discussing story",
states: {
"discussing story": {
on: {
"REVEAL ESTIMATES": {
@robertpenner
robertpenner / machine.js
Last active November 18, 2021 21:37
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Workout",
type: "parallel",
context: {
timerSeconds: 60,
},
states: {
timer: {
id: "timer",
@robertpenner
robertpenner / machine.js
Last active November 8, 2021 16:53
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine(
{
id: "Stories",
type: "parallel",
states: {
playback: {
initial: "playing",
states: {
playing: {
initial: "counting down",
@robertpenner
robertpenner / machine.js
Last active October 28, 2021 19:28
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "PGA Onboarding & Login",
initial: "splash screen",
states: {
"splash screen": {
after: {
2000: "onboard or sign in",
},
},
"onboard or sign in": {
@robertpenner
robertpenner / machine.js
Last active October 28, 2021 19:55
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "PGA Onboarding",
initial: "Let's personalize",
states: {
"Let's personalize": {
on: {
"DO THIS LATER": "#app landing",
CONTINUE: "Favorite tour?",
},
@robertpenner
robertpenner / machine.js
Last active October 7, 2021 19:53
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "Page transition",
type: "parallel",
states: {
"current page": {
initial: "visible",
states: {
visible: {
on: {
"LOAD NEXT PAGE": "fading out",
@robertpenner
robertpenner / machine.js
Last active September 26, 2021 23:38
Generated by XState Viz: https://xstate.js.org/viz
/**
* Abstraction of:
* assign({ Player_1: ({ Player_1 }) => Player_1 + 1 })
*/
const addShot = (player) =>
assign({
[player]: (context) => context[player] + 1,
});
const machine = Machine(
@robertpenner
robertpenner / machine.js
Last active September 26, 2021 22:39
Generated by XState Viz: https://xstate.js.org/viz
const stroke = function score(player) {
return assign({
[player]: (context) => context[player] + 1,
});
}
const machine = Machine({
id: "Playoff: 3-hole aggregate",
context: {
P1: 0,