Skip to content

Latest commit

 

History

History
127 lines (105 loc) · 4.65 KB

TODO.md

File metadata and controls

127 lines (105 loc) · 4.65 KB

TODO

Logic

stateful logic

  • make Impossible States Impossible 🎉 🎉 🎉
    • managed certainty of type Status and type Output
      • Status: can only be Loading, Loaded something, and Errored
      • Output screen: can only show one line at the time, depending on user input
  • avoid boolean identity crisis 🥳 🥳 🥳
    • see type Sound

keyboard

  • display keyboard onscreen
  • onclick events to output
  • onclick events to sound
  • use an package to get user typing
  • get keycode from typing into onscreen keyboard
  • filter out KeyPressed to
    • if alt/meta/shift/ctrl/repeat is pressed do nothing
    • allow alphabet characters
    • allow commands keyboard shortcuts
      • FIX: Sumbit It keyboard shortcut doesn't use the right word
    • send keycode to screen (see "user feedback" section)
    • send keycode to speak (see "user feedback" section)

text to speech 🤖🤖🤖

  • SpeechSynthesis Web API with a JavaScript Port
  • let user disable voice
    • completely
    • for some features (no. API only pauses/resumes global state)
      • just keys
      • just feedback
  • no need for Sub (for now?)

refactor

  • refactor update and use helper functions
    • reuse helper functions to streamline code
    • declutter view's onClick events and use update for Msg
    • not all Msg need to be parametrized

output screen

  • use a Maybe String for model.click to
    • show default message or GuessWord
    • implement a conditional to only show GuessWord if valid
    • awlays show clicked Nothing if GuessWord is empty
  • switch to using type Output with a case ... of
    • much clearer and less convoluted code
    • it can either be Init, Holder, Word, or Result upon sumbit
    • avoid double use of Maybe Strings that depended on one another
  • has user started entering a word?
    • no: display default messasge telling the user what to do
    • yes: display typed text
  • erase letter: if guess word is emtpy display default message
  • retry/reset: display default message
  • submit: result text to take over as the only text on screen

UI/UX

  • look like Speak & Spell (make it look & feel like a toy)
    • keys (alphabet, commands) to look different
  • user feedback
    • feedback for keypresses
      • written feedback
      • auditory feedback with SpeechSynthesis
      • visual feedback (change color)
      • is key stuck?
    • feedback upon checking the spelling
      • written feedback
      • auditory feedback
  • screen
    • retro-looking/low-fi/8bit
    • fixed "field" for the user output
    • Elm Instruments
    • add logo besides "brand"
  • create a custom loading page
    • use elm logo :)
    • spell LOADING with Speak & Spell styled keys
    • animate the LOADING words on screen
  • create custom error page
    • implement function to handle http.error
    • and return custom (parsed) error messages
  • ARIA accessibility
  • SEO optimization
  • make elm-ui design responsive
    • elm ui seems abandonware
    • making it responsive is a bit PITA
    • leaving as is and will do proper CSS (elm-css?) reponsive design later

Improvements

  • Elm optmization:
    • remove debug.string + refactor those fn
    • use lazy
    • assets size
    • use local fonts
  • use parceljs

Maybe

  • make it so that KeyPressed triggers visual feedback on keyboard keys
    • should I use a Maybe KeyboardEvent?
    • refactor Msg and split into KeyPressed + KeyClicked types?
      • would this be too convoluted? Elm likes clarity over complexity

Provided that a polyglot API (or separate different languages APIs) exist, these are a number of items I'd like add to the app:

  • let user choose:
    • a different dictionary language
    • the voice language, params, and gender
  • internationalization depending on chosen dict language
    • UI
    • commands

Deploy

Once complete, deploy a static website:

  • deploy to GitHub Pages
    • gh pages sucks!!!
    • c'mon microsoft... learn from gitlab.
  • vercel app :)