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

Fix #974 Extra infromation on Profile #1031

Closed

Conversation

alromh87
Copy link
Collaborator

@alromh87 alromh87 commented Sep 5, 2020

Shows information on user profile

  • Location with link to map pin
  • Accepted HowTos
  • Accepted Events

User stats are computed via firebase function triggered by database changes

BenGamma and others added 3 commits July 21, 2020 13:56
Bring latest changes to branch 974

Conflicts:
	src/pages/User/content/UserPage/UserPage.tsx
Shows information on user profile
- [x] Location with link to map pin
- [x] Accepted HowTos
- [x] Accepted Events

User stats are computed via firebase function triggered by database changes
@cypress
Copy link

cypress bot commented Sep 5, 2020



Test summary

60 0 0 0


Run details

Project onearmy-community-platform
Status Passed
Commit 5d43a9f ℹ️
Started Sep 10, 2020 1:15 PM
Ended Sep 10, 2020 1:21 PM
Duration 05:42 💡
OS Linux Ubuntu Linux - 16.04
Browser Multiple

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@alromh87
Copy link
Collaborator Author

alromh87 commented Sep 5, 2020

This profiles show different validations:

  • alromh87
    • Pin
    • Events
    • HowTos
  • bentest12
    • Only Pin
  • 7pgee0qxlzmdbxmfdtbe4hcdzom2
    • Only HowTos
  • 4vd2ejopw1ftcunhj01o8vpbgq62
    • Only Event
  • 1qsijzipovtkqrryfavkzc1dzd93
    • No Pins, events or howTos

As requested in #974

Copy link
Contributor

@BenGamma BenGamma left a comment

Choose a reason for hiding this comment

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

If I understand well the counts for how-to and events will be triggered on creation or on edit right ?
So to have this information available we'll need to modify all the existing howtos and events ? I'm trying to understand how we are going to proceed for migration.
Other than that see my comments for small changes.
Thanks for the work !

@@ -8,6 +8,7 @@ interface IProps {
width?: string
ticked?: boolean
contain?: boolean
mr?: number
Copy link
Contributor

Choose a reason for hiding this comment

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

In that case it will be better to extend the props from rebass BoxProps directly, but I don't think you need to add it here, and I don't see it used anywhere else anyway ?

Copy link
Collaborator Author

@alromh87 alromh87 Sep 10, 2020

Choose a reason for hiding this comment

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

It was needed to be able to change the margin of the internal box, which had it fixed to 4, now it will default to 4(avoid braking other displays), but can be overwiten when usng component, used to make howto event display in one line

03b17a9

Maybe your right, but i dont know how to do that 😓

src/models/user.models.tsx Outdated Show resolved Hide resolved
@alromh87
Copy link
Collaborator Author

alromh87 commented Sep 10, 2020

The user stats will be stored under as a map under user collection, update of this values will be triggered by how-to/events update using firestore functions.

Functions are at functions/src/Integrations/user-stats.ts , I gess I'm missing some config since they where not deployed.

I already have script for the initial calculation and update of user.stats for migration, this would be executed just once, after that updates will be calculated based on individual howto/event data, for faster execution

@BenGamma
Copy link
Contributor

Functions are at functions/src/Integrations/user-stats.ts , I gess I'm missing some config since they where not deployed.

As far as I know they will need to be deployed on firebase once merged with master.

I already have script for the initial calculation and update of user.stats for migration, this would be executed just once, after that updates will be calculated based on individual howto/event data, for faster execution

Ok nice, can I see this script ?

@BenGamma
Copy link
Contributor

I added a commit so I had to create a new branch and new PR, discussion moved to #1040

@BenGamma BenGamma closed this Sep 14, 2020
@alromh87
Copy link
Collaborator Author

alromh87 commented Sep 14, 2020

Migration script:
#1040 (comment)

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.

2 participants