Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

Profile changes#108

Open
tescher wants to merge 18 commits into
CV19Assist:nextfrom
tescher:profile-changes
Open

Profile changes#108
tescher wants to merge 18 commits into
CV19Assist:nextfrom
tescher:profile-changes

Conversation

@tescher

@tescher tescher commented May 14, 2020

Copy link
Copy Markdown
Collaborator

I got most of the user profile fka account setup working if either of you can look at it. It's in tescher/app.git in branch profile-changes I'm new to React so there may be things I'm doing completely wrong. I also have a bunch of clean-up to do, but it would be good if you could make a quick pass.

Basic functionality is this:

  • From the Login screen, you can press the "I'm new here" link and it will take you through a new user sign-up.
  • Also from Login screen you can press the Google button, and it will do the same, except skip the email/password part.
  • From NavBar/User/Profile menu, you'll be taken to the same flow, except with a different header (My Profile instead of I Want To Help)
  • If you log in (with either email/pw or Google) and you're missing required profile data, it will tell you and take you through the profile flow.

When you get through the profile flow, it will attempt to create an account/profile for you. If the email already exists and you didn't use Google, it will tell you and take you back to the beginning.

Things I still need to figure out:

  • The NavBar issue where you're shown as logged in before you get through the new user flow and you started with Google. I tried storing something in users-public so I could look at it without being logged in, but I don't think that's optimal. Need something else. A custom Firebase user property maybe?
  • Alignment of the Google button.
  • Am I saving all the needed data in the right places? Seems like location isn't completely there because the Search keeps using the default location even if I choose a location in my profile.
  • Tests
  • We still need a "Forgot Password" flow. Was this already started previously?

thebitguru and others added 14 commits May 5, 2020 00:11
* fix(SearchPage): fix the responsive styling of the results
* fix(ClickableMap): switch to calling Google Maps API directly

Previously, we were using the react-geocode library which was a server side library and did not
support domain-based key restrictions. Now using the API directly because it's simple enough and
will allow us to support key restrictions.

Closes CV19Assist#94

* chore(*): upgrade a few of the older packages.
* refactor(AccountMenu): switch to Link component to allow opening in new window
* feat(ClickableMap): allow user to enter address

We now allow users to enter address on the new request and volunteer sign up pages. On the
volunteer sign up page, the address also populates the separate address fields for the volunteer.

Closes CV19Assist#29

* fix(NewRequestPage): fix the .length error and styling

Fix an error when the user doesn't have the diplayName filled out. Also default displayName
to `firstName lastName` when it's not set. Lastly, fix the styling on small screens.

Closes CV19Assist#85

* feat(RequestSuccessfulPage): add link to the newly created request
* feat(*): hook up sentry.io. (CV19Assist#95)
* fix(Discussion): remove the incorrect limit(1) from private comments.
* chore(*): update version
* Check version before creating new release (CV19Assist#100)
* Only run release logic for production branch

* refactor(ClickableMap): switch to async/await as suggested
* refactor(useNewRequest): copy the requestLocation object before deleting the unneeded property
* refactor(utils/geo): log to Sentry when API is not found

Co-authored-by: Scott Prue <prescottprue@users.noreply.github.com>
…pp into default-contact-info

Pulling in milestone-5 changes
@thebitguru
thebitguru changed the base branch from master to next May 14, 2020 07:45

@thebitguru thebitguru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few issues.

  • I am getting a permission error when creating a new user.
  • Pressing enter on a field (e.g., email) shows the "Please fix the errors above" message, but the errors on subsequent steps so the actual error is not visible.
  • I agree that we need to work on the styling.
  • How can we merge this with the AccountEditor which will soon display the notification preferences?

Comment thread db.json-schema.json Outdated
"type": "string",
"description": "A name for the location, generally 'City, State'."
},
"hasAccount": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we change this to something like profileFilledOut?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure

@@ -0,0 +1,51 @@
import React from 'react';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the GoogleSignIn component be inside the Login component since that's the only place it will be needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It will be in both the login and new user forms. I just haven't refactored the login form for it yet.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Better idea - I'm going to remove it altogether from the profile flow. It will only live on the login page, and if they press it and don't have a profile, they will be redirected to the profile flow to fill out what's needed. We don't need two buttons.

@tescher

tescher commented May 14, 2020

Copy link
Copy Markdown
Collaborator Author
  • on the permission error, was that an email/pw user or Google user?
  • it's on my list to figure out how to show the right page based on the error
  • What will be in the Account page? Maybe the stepper only makes sense for a new user?

@tescher

tescher commented May 15, 2020

Copy link
Copy Markdown
Collaborator Author

Done:

  • Put in code to take user back to the step with validation errors
  • Removed the Google button from the flow, left it in the Login page
  • Handle email and password changes (it might require a re-login if the user hasn't logged in recently. May want to handle this somehow. We just show the error currently)

ToDo:

  • Handle location changes. Will try to geocode the address fields (which are fed by the map, but can be edited) and load the precise location into the user's profile. If the geocode fails, send them back to the map to try again.
  • Still issue with the NavBar prematurely showing logged in
  • Create a "Forgot Password" flow
  • Tests

@tescher
tescher marked this pull request as ready for review May 15, 2020 20:02
@thebitguru

Copy link
Copy Markdown
Contributor
  • on the permission error, was that an email/pw user or Google user?

Google user.

  • it's on my list to figure out how to show the right page based on the error
  • What will be in the Account page? Maybe the stepper only makes sense for a new user?

Right. The stepper only seems to be appropriate for new users.

@tescher

tescher commented May 16, 2020

Copy link
Copy Markdown
Collaborator Author

Added:

  • Forgot password (only uses the Firebase default reset page for now)
  • Save precise location based on address

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants