Skip to content

Instantly share code, notes, and snippets.

@mrlarner
Last active March 5, 2019 00:59
Show Gist options
  • Save mrlarner/e1a3041ed5985a6b0b5c836bf3d098eb to your computer and use it in GitHub Desktop.
Save mrlarner/e1a3041ed5985a6b0b5c836bf3d098eb to your computer and use it in GitHub Desktop.
Search
Search
# When the App loads, it should check if a query is provided.
# If query is provided, automatically issue the search
autosearch -> Search Provided?
Search Provided?
have query in input field -> Searching
no query in input field -> Inactive
Input*
Inactive*
focused -> New Search
New Search
canceled -> Inactive
changed -> Try Search?
# Validation optional
Try Search?
valid input -> Searching
invalid input -> Problem
Searching
# This state should communicate work is being done
Waiting*
done waiting -> Results?
# If one result is returned, automatically show details
Results?
still waiting -> Waiting
oops -> Problem
some -> Results
none -> No Results
one -> Result Details
Results
show result -> Result Details
search again -> New Search
go to page -> More Results?
Only Page
Page*
Last Page
More Results?*
some -> Page
none -> Last Page
Result Details
view results -> Results
search again -> New Search
No Results
try again -> New Search
Problem
try again -> New Search
const render = () => {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment