From 6989fd4ecf029fea549c27a42f8d9a21f97e5679 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Wed, 27 Jun 2018 11:38:32 -0400 Subject: [PATCH] Added SVGs for add to studio modal --- src/components/modal/addtostudio/modal.jsx | 18 +++++------------- static/svgs/modal/add.svg | 10 ++++++++++ static/svgs/modal/confirm.svg | 10 ++++++++++ static/svgs/modal/spinner.svg | 10 ++++++++++ 4 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 static/svgs/modal/add.svg create mode 100644 static/svgs/modal/confirm.svg create mode 100644 static/svgs/modal/spinner.svg diff --git a/src/components/modal/addtostudio/modal.jsx b/src/components/modal/addtostudio/modal.jsx index b7eb9692c..817337ea6 100644 --- a/src/components/modal/addtostudio/modal.jsx +++ b/src/components/modal/addtostudio/modal.jsx @@ -1,25 +1,17 @@ // NOTE: next questions: // * what is the lifecycle of the getStudios etc. requests? Are they guaranteed to be there // on page load? Are they ever updated, e.g. after you join one? -// * should we treat "waiting" to mean, user has requested the modal to be closed; + +// design decisions: +// * we should treat "waiting" to mean, user has requested the modal to be closed; // that is, if you click ok and it's waiting for responses, then you click x, // it closes and sets waiting to false? // then in the checkForOutstandingUpdates function, we close the window // iff waiting is true. // that avoids the situation where you close the window while a request is // outstanding, then reopen it only to have it instantly close on you. -// * should the button to submit instantly? By clicking away shouldn't effectively undo what you thought you did. -// * should it really be pinned on the page? Isn't that something you're trying to move away from? -// * is it ok for me to make the spinner bigger and higher-radius-as-percent? (just for modal) -// * -// one way to go: no buttons at all. -// maybe let kids toggle on and off like crazy, then when you click ok it submits? -// * -// plan: -// * change joined to updateQueued = {[id]: {updateType: ['join':'leave']}, ...} -// * also maintain second hash, joined = {[id]: true, ...} -// in render, use joined to set color, and if queued, use spinner for icon. -// +// * keep the okay button, it sets up an overall spinner until everything is resolved +// * but you can totally close the window regardless // sample data: // this.studios = [{name: 'Funny games', id: 1}, {name: 'Silly ideas', id: 2}]; diff --git a/static/svgs/modal/add.svg b/static/svgs/modal/add.svg new file mode 100644 index 000000000..eec02a23e --- /dev/null +++ b/static/svgs/modal/add.svg @@ -0,0 +1,10 @@ + + + + add + Created with Sketch. + + + + + \ No newline at end of file diff --git a/static/svgs/modal/confirm.svg b/static/svgs/modal/confirm.svg new file mode 100644 index 000000000..586642228 --- /dev/null +++ b/static/svgs/modal/confirm.svg @@ -0,0 +1,10 @@ + + + + confirm + Created with Sketch. + + + + + \ No newline at end of file diff --git a/static/svgs/modal/spinner.svg b/static/svgs/modal/spinner.svg new file mode 100644 index 000000000..eb7eed3f2 --- /dev/null +++ b/static/svgs/modal/spinner.svg @@ -0,0 +1,10 @@ + + + + spinner + Created with Sketch. + + + + + \ No newline at end of file