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

Improve seedNotificationType #7

Merged
merged 10 commits into from
Oct 20, 2022

Conversation

mohammadranjbarz
Copy link
Contributor

@mohammadranjbarz mohammadranjbarz commented Oct 12, 2022

related to #6
@CarlosQ96

We had to add some HTML templates as https://gist.github.com/MohammadPCh/24434d50bc9ccd9b74905c271ee05482 so after merging we should delete some tables and migrations, to seed them again in staging DB, I added something to validate notificaiton's metadata as you wrote for segment data, and wrote lots of test cases to cover all notification types.

PS After this we should change impact-graph to send needed metadata when sending notifications and maybe calling notification-center in more places like when someone like a project

@mohammadranjbarz mohammadranjbarz marked this pull request as ready for review October 19, 2022 14:14
href: Joi.string().required(),
});

export const SEGMENT_METADATA_SCHEMA_VALIDATOR: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

@@ -48,7 +51,12 @@ async function runMigrations() {
}

const seedDb = async () => {
//
new ThirdParty();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why instanciate an empty class here? Can we remove it? I don't think it's doing anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh my mistake, I deleted that line

},
DRAFTED_PROJECT_SAVED: {
name: 'The project saved as draft',
description: 'The project saved as draftd',
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo here, remove the d of the word draftd


// https://github.com/Giveth/notification-center/issues/6 , https://gist.github.com/MohammadPCh/24434d50bc9ccd9b74905c271ee05482
Copy link
Contributor

Choose a reason for hiding this comment

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

We are missing the welcome notification type. I think we removed it on another PR. We should re add it, since it's part of the logic.

},
{
type: 'a',
content: 'clik here',
Copy link
Contributor

Choose a reason for hiding this comment

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

typo, click

},
],
content:
'Pssst! your rewards are ready to claim 😉\nCheckout GIVeconomey to claim your rewards.',
Copy link
Contributor

Choose a reason for hiding this comment

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

typo! GIVeconomy

{ type: 'br' },
{
type: 'a',
content: 'Clik here',
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo! Click

content: 'Your project update was successful.',
},
],
content: 'Your project update was succesful.',
Copy link
Contributor

Choose a reason for hiding this comment

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

typo! successful

pushNotifierService: null,
title: 'Donation has been failed',
title: 'Project posted an update',
Copy link
Contributor

Choose a reason for hiding this comment

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

You posted an update

Copy link
Contributor

@CarlosQ96 CarlosQ96 left a comment

Choose a reason for hiding this comment

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

Thanks a lot Mohammad, I read all notifications and fixed 5-6 typos, and fixed copies in the spreadsheet too.

I added the welcome notification type we missed. Everything else is good!

@mohammadranjbarz
Copy link
Contributor Author

@CarlosQ96 Thanks for your great review and made changes

@mohammadranjbarz mohammadranjbarz merged commit 62185f7 into staging Oct 20, 2022
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.

3 participants