Skip to content

Conversation

@siddharthpk
Copy link
Member

Overview

Closes #163

Added a redirect to the Github repo using an icon button.

Before

courseup-before

After

courseup-after

@siddharthpk siddharthpk requested a review from a team as a code owner June 7, 2021 17:11
setIsOpen(!isOpen);
window.open('https://github.com/VikeLabs/courseup');
};
return <IconButton aria-label="GitHub" icon={<DiGithubBadge />} borderRadius="50%" name="github" onClick={open} />;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of hooking into the state, you can add the props as="a" href="https://github.com/VikeLabs/courseup" which will do the same thing. Additionally, if you do it this way, you can add target="_blank" so clicking the link opens a new tab.

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: you can use the isRound prop instead of doing borderRadius="50%" (chakra docs for reference)

Copy link
Collaborator

Choose a reason for hiding this comment

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

my fault for not creating a mock-up to base styling off of, but if we can aim to make it look like the attached screenshot that would be 🔥
Screen Shot 2021-06-07 at 5 09 50 PM

Copy link
Member

@aomi aomi Jun 8, 2021

Choose a reason for hiding this comment

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

The black colour scheme would be better for a11y.
https://contrastchecker.online/000000/82cbee whereas the white variant wouldn't pass.

Another approach would be to change the header colour outright and fix some more issues.
If we want to use the white variant here we should try and make the title (CourseUp) and this GitHub logo compliant in the near future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the feedback guys! I'll change the code accordingly and request another review.

<TermButtons />
</GridItem>
<GridItem colStart={4}>
<ExternalLinks />
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you opt for going with the props over the useState approach, this doesn't have to be it's own component

Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't consider this approach as there isn't a need for useState and complicates the code unnecessarily let alone accessibility issues I imagine.

@keithradford
Copy link
Collaborator

@siddharthpk Hey! Just checking in to see the status of this PR. Are you still working on this? (no rush, just a check-in)

@siddharthpk
Copy link
Member Author

Oh yeah, last and this week has been midterms so gonna complete this during the weekend.

@aomi
Copy link
Member

aomi commented Jul 9, 2021

Closing due to inactivity. More than welcome to open a new PR if the issue is still open.

@aomi aomi closed this Jul 9, 2021
@szeckirjr szeckirjr mentioned this pull request Aug 4, 2021
5 tasks
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.

Link to GitHub repo from header

3 participants