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 / SketchSystems.spec
Last active March 7, 2022 17:25
SpirioCast Cast Flow
SpirioCast Cast Flow
home_screen*
PREPARE_TO_CAST -> preparing_to_cast_screen
cast_screens
BACK -> home_screen
VIEW_CAST_DETAILS -> cast_details_screen
VIEW_HELP -> help_page
cast_details_screen
# Would actually return to whichever the previous screen was (via memory state).
BACK -> preparing_to_cast_screen
@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: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 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 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(