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

MHP-3132-Render-Reported-Stories-and-Comments #1443

Merged
merged 12 commits into from
Feb 5, 2020
Merged

Conversation

TheNoodleMoose
Copy link
Contributor

Converted GroupReport to use graphql, update other components to hooks, update tests and snapshots

@TheNoodleMoose
Copy link
Contributor Author

@OzzieOrca This is my first pass at this but more changes will be coming as Robert's pr #1444 is touching some of the same screens. We want to get his ticket out first, but I figured you could take a look and give any suggestions on how I can improve what I have here 🙂

@TheNoodleMoose
Copy link
Contributor Author

@OzzieOrca This should be good to review. Hopefully the commit where I fixed the conflicts with me and Robert's changes is not too messy.

Comment on lines 28 to 41
const subject = {
id: 'commentId',
__typename: 'CommunityCelebrationItemComment' as 'CommunityCelebrationItemComment',
content: 'something',
createdAt: '2020-01-15T20:58:04Z',
typeName: 'CommunityCelebrationItemComment',
updatedAt: '2020-01-15T20:58:04Z',
id: 'commentId',
person: {
__typename: 'Person' as 'Person',
fullName: 'Christian Huffman',
firstName: 'Christian',
lastName: 'Huffman',
id: 'someid',
},
};
Copy link
Contributor

Choose a reason for hiding this comment

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

We should eventually use fragments instead of manually mocking all of this... See #1444 (comment). I don't want to hold up your PR though...

@@ -124,13 +128,16 @@ describe('report item', () => {
const StoryProps = {
...props,
item: {
__typename: 'ContentComplaint' as 'ContentComplaint',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So for some reason typescript yelled at me for just having 'ContentComplaint'. So I had to type ContentComplaint as ContentComplaint(?). I was a little confused because both are just strings, but I guess it wants a specific string? Had to do this is a couple of other places for the same reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ya I encountered that somewhere too. It's typed really specifically. This is fine until we can automock it.

@TheNoodleMoose TheNoodleMoose merged commit e351697 into develop Feb 5, 2020
@TheNoodleMoose TheNoodleMoose deleted the MHP-3132 branch February 5, 2020 18:20
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