Last active
April 24, 2025 14:49
-
-
Save EpocSquadron/9a6b10fc3b0ecbd2181c629647310dcb to your computer and use it in GitHub Desktop.
Doctor Finder Search Inputs&
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Doctor Finder Search Inputs& | |
Search Box | |
# To avoid complicating the statechart, i did not split has and no input out, but you can imagine an unfocused field with a query still in it, very much like Has Input | |
Unfocused | |
gainFocus -> Focused | |
Focused | |
loseFocus -> Unfocused | |
No Input* | |
type -> Has Input | |
Has Input | |
clear -> No Input | |
submit -> Searching | |
type -> Has Input | |
selectSuggestion -> Searching | |
# The three dots are an animated svg | |
Searching | |
# This event will also trigger the results to show in the results area | |
finished -> Unfocused | |
notFound -> No Results | |
errored -> Errored | |
Errored | |
gainFocus -> Has Input | |
# This would be reflected in the search results area and revert the field to Has Input | |
No Results | |
gainFocus -> Has Input | |
Geolocator | |
Awaiting Click | |
hover -> Active | |
Active | |
click -> Finding User | |
loseHover -> Awaiting Click | |
# The three dots are an animated svg | |
Finding User | |
found -> Searching | |
gotError -> Error Encountered | |
Error Encountered | |
timeout -> Awaiting Click |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
if (model.active_states[0].image_url && model.active_states[1].image_url) { | |
return ( | |
<div> | |
<img src={model.active_states[1].image_url}></img> | |
<img src={model.active_states[0].image_url}></img> | |
</div> | |
) | |
} else { | |
return `No image available for ${model.active_states[1].name} and ${model.active_states[0].name}` | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment