Skip to content

Instantly share code, notes, and snippets.

@rocktronica
Created December 19, 2014 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocktronica/87eab4f7a540a4321f1a to your computer and use it in GitHub Desktop.
Save rocktronica/87eab4f7a540a4321f1a to your computer and use it in GitHub Desktop.

Banners and modals

Banner CTAs can be largely navigational:

  • "Upload picture" -> /profile/services/SERVICE_ID/edit/profile-picture
  • "Describe youself" -> /profile/services/SERVICE_ID/edit/services
  • "Email review on my own" -> /profile/services/SERVICE_ID/edit/reviews

Two catches:

  1. There's currently no modal for submitting a list of email addresses to invite to review. Options:

    • a new modal, separate from the existing "edit" steps
    • use the existing modal setup but make this new step "hidden"
    • use the existing review link modal, adding (and conditionally showing) the emails list form [I like this one]
  2. The editing modals' submit buttons currently "Save and continue" into the next step, and we'll need them to "Save and close" when opened from our banner. Options:

    • Exploit angular's routing, appending something to the /edit/... URL so the button will do what we want
    • Use controller scope and leave the URLs clean [I like this one]

How does the form work

I suggest some sort of Ajax endpoint, because:

  • we want this kind of functionality in a couple places w/ differing copy
  • it's a better experience for the user to not get redirected around too much, especially in modal states of various pages

(A simpler short-term implementation would be a standalone page that we instead link out to instead of embed. It could take a URL param for where it redirects when you've successfully submitted.)

Validation

  • invalid emails, on keypress|blur|submit
    subtext: "asdf@123 is invalid", one at a time, until all are valid
  • duplicate emails or ones they've already told us about
    no feedback in browser but don't save in backend
  • their own personal email address
    again, no feedback in browser but don't save in backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment