Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: User flow redesign #736

Merged
merged 45 commits into from
Jun 2, 2018
Merged

WIP: User flow redesign #736

merged 45 commits into from
Jun 2, 2018

Conversation

markbao
Copy link
Collaborator

@markbao markbao commented May 18, 2018

Redesign the user flow so a listing of the month's tea times in all cities (at /tea_times) is the central place where people will interact with the application.

Todo

  • New /tea_times page that displays tea times scheduled in the current month.
  • Homepage CTAs now go to /tea_times.
  • /tea_times is publicly viewable, and the CTAs for signing up for tea times will go to signup/login pages if not logged in.
  • If a user is not signed in when they select a tea time, the tea time they selected will be saved in the session and they will be redirected to it after signup/login.
  • If a user does not have a home city when they sign up for a tea time, their home city will be set to the home city of that tea time.
  • Users can select "Email me " on the /tea_times page.
  • Update links in navigation and user flow redirects
  • Add city selector to signup page
  • Auto-select city selector for signing up from tea time page

Waiting for

  • Decide whether or not we want to remove city pages
  • /tea_times/123 page should be redesigned.
  • /tea_times page needs additional styling.
  • Tea time list on host page: show only month, expand for future tea times?
  • Determine what to do about next month's tea times (do we display them?)
  • Determine if we need to change the tea times that city pages contain and any other changes to the other parts of the application.
  • Determine what to do about user profile pages for users who haven't set a home city (currently it's a big button that says "Set your home city" that goes to /cities)
  • Determine if we show "past" tea times on /tea_times (probably not)

Copy (marked with COPYTODO)

  • views/tea_times/index.html.erb

Stuff for the future

  • Consider putting full tea times toward the end of the list for a given city?

markbao added 3 commits May 18, 2018 18:22
New /tea_times (TeaTimes controller, index action) page showing the
month's tea times.

Old /tea_times path moved to /tea_times/list.

Homepage updated so the CTAs on the homepage now lead to /tea_times.
…login

After selecting a tea time at /tea_times, save the tea time they
selected in Devise's stored location in the session and redirect to it
after signup/login.
If the user's home city is blank and they sign up for a tea time, set
their home city to that tea time's city.
@coveralls
Copy link

coveralls commented May 18, 2018

Coverage Status

Coverage decreased (-0.2%) to 90.584% when pulling d5c7ce8 on mb/user-flow-redesign into 7df3a5d on master.

before_action :authenticate_user!
before_action :authorized?, only: [:new, :edit, :create, :update, :cancel, :destroy, :index]
before_action :set_tea_time, except: [:index, :list, :new, :create]
before_action :authenticate_user!, except: [:index]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/tea_times is accessible publicly now.

before_action :use_new_styles, except: [:create, :update, :cancel, :destroy]

# GET /tea_times
# GET /tea_times.json
def index
@tea_times = TeaTime.this_month.order(start_time: :asc).includes(:city).all

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we are converting a list of tea times into a hash like:

{
  "San Francisco": [TeaTime, TeaTime, ...]
  "NYC": [TeaTime, TeaTime, ...]
}

along with a list of names in @cities.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will return an array of TeaTime, not a hash. Additionally, this_month isn't a standard AR Scope and it's not defined on the TT model, so you'll need something like where(:created_at => Time.now.beginning_of_month..Time.now.end_of_month) instead I think. Might want to make the span a rolling 4 week period too so it doesn't weirdly cut over towards the end of a month?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickbarnwell

Re: array: Whoops, my bad for not being clear. I meant this comment to 'introduce' the following lines of code which are doing the process of converting that list to a hash.

Re: scope: I added a custom scope in the model, let me know if it looks right: https://github.com/TeaWithStrangers/tws-on-rails/pull/736/files#diff-c0448cf921e60c620dcf5c85c1718605R35

Re: rolling period: This was something Ankit requested in the spec - I think the idea was to have tea times come out in "batches" at the beginning of the month.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markbao @nickbarnwell

Re: rolling period — Mark is right on what I suggested in the spec. We discussed having following month's tea times be available with the click of a "Show Next Month's Tea Times" button. Not sure if we landed on a conclusion there. @markbao Do you remember?

@@ -70,8 +70,20 @@
</button>
<% end %>
<% end %>
<% elsif (no_signin_button ||= false) # No signin button; don't show signin CTA text %>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the /tea_times page with the new flow, we only want to display "Count Me In" and "Join Waitlist" buttons. We don't want to display "Sign in" buttons, so we have a special branch for the /tea_times page.

<% else %>
<%= link_to new_user_session_path do %>
<%= link_to new_user_session_path(redirect_to_tt: tea_time.id) do %>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/signup page now accepts a ?redirect_to_tt=123 querystring parameter which is saved in the session as the tea time to redirect to.

@@ -0,0 +1,50 @@
<% next_month_name = Date.today.next_month.strftime("%B") %>

<div class="cover-photo" style="background-image: linear-gradient(to bottom, rgba(247, 191, 77, 0.87), rgba(247, 191, 77, 0.87)), url('<%= image_path("missing-city-image.jpg") %>'); margin-bottom: 50px;">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styles are inline because @ankitshah811 will do the CSS and I don't want to create classes that might be rewritten later.

</div>
<% @tea_times_by_city.each do |city, tts| %>
<div class="tt-set-container">
<div class="tt-container tt-city-name" style="border: 5px solid #EF6236; color: #EF6236; font-weight: bold; height: 200px; padding: 20px; font-size: 30px; text-transform: uppercase; text-align: center;">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above (Styles are inline because @ankitshah811 will do the CSS and I don't want to create classes that might be rewritten later.)

<% end %>
</div>
<div>
<button>Email me in <%= next_month_name %></button>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet implemented.

# to redirect to after signup
# See https://github.com/plataformatec/devise/wiki/How-To:-Redirect-back-to-current-page-after-sign-in,-sign-out,-sign-up,-update
if params[:redirect_to_tt] && TeaTime.find(params[:redirect_to_tt])
store_location_for(:user, '/tea_times/' + params[:redirect_to_tt].to_i.to_s)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the param should be coerced to a string automatically when you concatenate it to the result of store_location_for - does it not work without the to_i.to_s that way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was a bit of a weird design decision. I was thinking that it was possible that params[:redirect_to_tt] might not be a string containing an integer, so here I was ensuring that it was an integer, but if we do TeaTime.find(params[:redirect_to_tt]) (which I added later) that already checks if it's an integer. I'll remove this.

markbao added 6 commits May 21, 2018 21:50
Button on /tea_times to remind next month now goes to signup page.
Shows alert that they will be reminded next month after singup.

Signup page now has home city selector.

Clicking a tea time as a logged-out user and going to the signup
page will fill in the home city automatically.

Updated redirect paths to remove city pages from user flow.
Previously, pages navigated to via Turbolinks did not cause modals
to be attched.
@ankitshah811
Copy link
Member

@markbao Misc q's —

If a user is not signed in when they select a tea time, the tea time they selected will be saved in the session and they will be redirected to it after signup/login.

Assuming this directs to http://www.teawithstrangers.com/signup. If user clicks link to go to http://www.teawithstrangers.com/signin from that page, does the ?redirect_to query hold? Or breaks

Users can select "Email me " on the /tea_times page.

Assuming this also redirects to Sign Up page?

Add city selector to signup page

At least, we want to wrap this selector in the drop down markdown/style used in settings page (see screenshot). If it's trivial, would love to use the Standard Select option here (https://harvesthq.github.io/chosen/) but with our styles.

2018-05-29 at 12 38 pm

Other:

"Sign up for a tea time" and "Join tea time" currently direct to home city page. Not sure what happens if no home city is selected. Regardless, these should point to /tea_times
(And later, this page should get a little more love because it is not very smartly designed)

2018-05-29 at 12 35 pm

@ankitshah811
Copy link
Member

ankitshah811 commented May 29, 2018

Decide whether or not we want to remove city pages

Yes, remove them. Redirect all city page references to /tea_times

/tea_times/123 page should be redesigned.

Working on this now and will commit changes

/tea_times page needs additional styling.

WIP @me

Tea time list on host page: show only month, expand for future tea times?

Same logic as /tea_times

Determine what to do about next month's tea times (do we display them?)

Link to see next month's tea times. Will design into /tea_times

Determine if we need to change the tea times that city pages contain and any other changes to the other parts of the application.

Don't understand this. Can you clarify @markbao ?

Determine what to do about user profile pages for users who haven't set a home city (currently it's a big button that says "Set your home city" that goes to /cities)

Remove 'set home city' button. All CTAs should be to (1) register for tea time > (2) sign up so we can tell you about tea times next month

Determine if we show "past" tea times on /tea_times (probably not)

No. If I understand correctly, this PR is still showing past tea times, right? / This needs to be changed

Figure out what to do about the old user paths (e.g. what happens if they go directly to the signup page, sign up, and then select a home city, and go to their city page, etc.)

Redirect to /tea_times after signing up. Logging in should also redirect to /tea_times

@ankitshah811
Copy link
Member

ankitshah811 commented May 30, 2018

Update 05/29/18:

New tea time page design
TODO @markbao :

  • Change style of city list to text-align:center; display: inline-block; and anchor link each city name (see design at bottom)
  • Double check that each city block in TT schedule is able to render more than 1 tea time (for some reason, I scheduled many TTs on my local db and couldn't get the localhost to show more than 1 tea time per city)

Ideal design for city anchor links:
2018-05-29 at 10 56 pm

To be done by AS 05/30/18:

  • Design /tea_times/123 page
    • Append corresponding host profile to the tea time display on event page (i.e. a tea time page should also display a modified host profile on the same page)
    • Adjust style of readonly form fields to make more obvious that they're un-editable
    • Ensure FB OG meta data is 👌
    • Add Share links
  • Add permalinks to each tea time on /tea_times
  • Revise copy on Sign Up page
  • Hide Host Commitment block on sidebar of /profile for hosts (confusing atm, as we don't enforce this at all)
  • Add Privacy Policy, TOS to site

@markbao TODO:

  • Build unsubscribe UI to Account Settings
  • pending changes for new /tea_times/123 design
  • Eliminate tea_times/123 modals
  • Add Privacy Policy and TOS links to Footer and create empty pages for AS to populate

@ankitshah811
Copy link
Member

New commit 05/31/18 06:34 PM:
Incomplete /tea_times/123 page, but bulk of work done. Right 2/3 of the page will have a slightly modified host profile. Will attempt to build this out myself after 7:30pm PT. @markbao will message you if I am having trouble doing this alone.

Also I apologize for dirty SCSS and markup. Eventually this will be cleaned up. Rush job.

2018-05-31 at 6 34 pm

@ankitshah811
Copy link
Member

ankitshah811 commented Jun 1, 2018

Summary of TODOs:

Note: @markbao I'm reasonably confident you can use this comment as a final to do list for the June push. Also, unless indicated otherwise, these are all assigned to you.
@nickbarnwell It would be very helpful if you could review this PR as soon as possible, as it would be ideal to push changes by the EOD Friday 06/01/18

Email UI

  • Create static pages for Privacy Policy and TOS, link at bottom of footer. Insert content from tos.html.erb and privacypolicy.html.erb
  • Add email newsletter unsubscribe link / section to Account Settings. Clarify that deleting account is the only way to eliminate transactional emails.
  • Provide link to documentation to use Sendgrid Email UI

Tea time flow

  • Adjust Jump to City section so each city is anchor-linked and in separate "pillbox" UI elements (see design in comment here)
  • (Ankit, after Mark) Confirm styles of Jump to City section
  • Double check that each city block in TT schedule is able to render more than 1 tea time (for some reason, I scheduled many TTs on my local db and couldn't get the localhost to show more than 1 tea time per city)
  • (Ankit) Add FB OG meta data to /tea_times/123 pages
  • (Ankit) Add more prominent 'Sign up for email updates' button to /tea_times page
  • (Ankit) Add Share links to /tea_times/123 pages
  • Add permalinks to each tea time on /tea_times
  • (Ankit, after Mark) Style permalinks on /tea_times
  • Eliminate /tea_times/123 modals. Direct all links that triggered modals to the tea_times/123 page itself
  • Hide past tea times
  • Redirect users from /signup and /signin to /tea_times

Double checking

  • Ensure Ankit didn't break anything while creating the new tea time event pages (/tea_times/123) or styling /tea_times)
  • Confirm there are no CTAs to 'Set your home city'

Notes

To do later (nonurgent)

  • Add link to toggle display next month's tea times

@ankitshah811 ankitshah811 merged commit 582c8ef into master Jun 2, 2018
@ankitshah811 ankitshah811 deleted the mb/user-flow-redesign branch June 2, 2018 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants