-
Notifications
You must be signed in to change notification settings - Fork 189
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
POC for #2379: GithubInfo Custom Hook to remove duplicate Github Info code #2764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but let's shift the URL parsing into the provider.
@HyperTHD hm, something wrong with prerendering "/about" page . 🤔 |
Running another set of tests for the workflow just to be sure, but the e2e is failing. Looks good on deployment though. |
e2e tests breaking on a page I never touched is disappointing. Will investigate this |
cc @TueeNguyen
This is the same bug that was reported in Slack with docker builds on I'd say |
@HyperTHD now it's working, can you please rebase this and we will merge it 🙂 |
Rebased and ready to be looked at |
I still see five commits, can you re-check it please ? |
@humphd Can I just 'squash and merge' or the PR owner should do it ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HyperTHD can you squash, rebase, and merge this please?
Issue This PR Addresses
This PR addresses #2379
Type of Change
Description
As part of #2379, We needed a way to reduce the amount of duplicate code used in our github info related components. This PR creates a new custom hook that deals with maintaining the amount of props we were passing into the github info components. As such, there's 0 props on all the components except for the users component since it needs the avatarSize prop to adjust for the user icon size. I've also left the smaller function that uses a regex to sort out the urls since they all differ between the github info components. I can add them into the hook if needed.
The custom hook is wrapped inside the "Posts" component since it's the main component all the other components live inside and thus will be the only ones that need access to the context values provided.
Checklist