webdevatlanta / GroupCollaborationTool

Tool to allow developers to collaborate on open source and private projects
https://groupcollaborationtool.web.app
1 stars 21 forks source link

Implement #36: Adds "Follow" feature to projects. #111

Closed abrie closed 4 years ago

abrie commented 4 years ago

With this PR user's gain the ability to "Follow" a project. When a user follows a project, their name is displayed in the Project's "Followers" list.

DanielJWagener commented 4 years ago

The new Firebase code relies on a variable called process.env.REACT_APP_PROJECTS_FOLLOWERS_COLLECTION but I don't see any such variable in .env.development. VS Code's search function also isn't showing me where that variable's defined. I don't know if I'm just missing something here, but regardless, I can't get this branch to run on my machine.

abrie commented 4 years ago

Thanks! Commit was missing the file. Fixed now.

DanielJWagener commented 4 years ago

Awesome! For some reason, my profile's displayName isn't persisted in the database, but I see an empty li next to where it should be after I follow a project. I'm guessing that this feature's working as it should and there's a separate Sign Up issue we need to fix.

abrie commented 4 years ago

That's a bug, due to the way Profiles are persisted in the database. The workaround is to log out and log back in; which creates and populates the necessary fields. Ideally this should have been done with a migration, but I know of no such Firestore feature.

See here, https://github.com/webdevatlanta/GroupCollaborationTool/blob/680de51fcd3142610b34d9108f8cc2ab4b093d38/src/components/Firebase/firebase.js#L50