Skip to content

feat(client): add project links to certificate#40071

Merged
raisedadead merged 17 commits intofreeCodeCamp:mainfrom
ShaunSHamilton:feat/add-projects-to-cert
Feb 1, 2021
Merged

feat(client): add project links to certificate#40071
raisedadead merged 17 commits intofreeCodeCamp:mainfrom
ShaunSHamilton:feat/add-projects-to-cert

Conversation

@ShaunSHamilton
Copy link
Member

Checklist:

  • I have read freeCodeCamp's contribution guidelines.
  • My pull request has a descriptive title (not a vague title like Update index.md)
  • My pull request targets the master branch of freeCodeCamp.
  • All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

Closes #38917

@gitpod-io
Copy link

gitpod-io bot commented Oct 23, 2020

@ShaunSHamilton
Copy link
Member Author

Something to note: The modal shows this:
image

image

The borders and the word JS disappears with the light theme. This is the same as it is in production now.

Otherwise, as this PR is now(following commits):

image

@ShaunSHamilton ShaunSHamilton marked this pull request as ready for review October 28, 2020 11:25
@ShaunSHamilton ShaunSHamilton requested a review from a team October 28, 2020 11:25
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Comment on lines +362 to +374
{signedInUserName === username ? (
shareCertBtns
) : (
<>
<Spacer size={2} />
<ShowProjectLinks
username={username}
user={user}
name={userFullName}
certName={certTitle}
/>
</>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{signedInUserName === username ? (
shareCertBtns
) : (
<>
<Spacer size={2} />
<ShowProjectLinks
username={username}
user={user}
name={userFullName}
certName={certTitle}
/>
</>
)}
{signedInUserName === username && shareCertBtns}
<Spacer size={2} />
<ShowProjectLinks
username={username}
user={user}
name={userFullName}
certName={certTitle}
/>

I think we always want the share buttons to be there.

Copy link
Member Author

Choose a reason for hiding this comment

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

The share buttons, or the projects? Currently, I have not changed when the shareCertBtns are visible (only when the camper views their own cert), but I made it so the ProjectLinks are only visible to everyone else (not the camper themselves)

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I misspoke - I meant the projects. It seems a little weird (to me) that they are not visible when you're viewing your own cert. Let's leave this open until we've nailed down the technical issues.

Comment on lines +119 to +125
const renderProjectsFor = certName => {
return projectMap[certName].map(({ link, title, id }) => (
<li key={id}>
<Link to={link}>{title}</Link>: {getProjectSolution(id, title)}
</li>
));
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const renderProjectsFor = certName => {
return projectMap[certName].map(({ link, title, id }) => (
<li key={id}>
<Link to={link}>{title}</Link>: {getProjectSolution(id, title)}
</li>
));
};
const renderProjectsFor = certName =>
(projectMap[certName] || legacyProjectMap[certName]).map(
({ link, title, id }) => (
<li key={id}>
<Link to={link}>{title}</Link>: {getProjectSolution(id, title)}
</li>
)
);

This handles legacy certs.

I'm not sure what's the best way to handle a weird bug where the cert renders, but is not in either of the Maps. Maybe show

Something has gone wrong with this certification, please report this to our team

@ahmadabdolsaheb any thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a silly oversight of mine. Thanks, Oliver.

The only cert currently not in the map is the Fullstack cert. Once. #39695 is complete, then it should be easy enough to add. Should I push something dirty (hardcoded) through, for this PR?

@ShaunSHamilton
Copy link
Member Author

@ojeytonwilliams Oliver, I have pushed a hard-coded quick-fix for the Legacy Full Stack cert. The links go to the related campers certificate (thoughts?):
image

@ojeytonwilliams
Copy link
Contributor

I went ahead and replaced the a tags with the Link helper. That should handle things nicely.

The hardcoded solution looks good, though I think we need to change the wording in that case. It should say something like

As part of this Legacy Full Stack certification, Development User completed the following certifications:

More hard coding, I know.

@ShaunSHamilton
Copy link
Member Author

ShaunSHamilton commented Oct 30, 2020

@ojeytonwilliams When I tested with the Link component, clicking the links to the certs did not work. The URL bar showed the new address, but the page did not refresh.

Edit: Oh...they are different components....

Copy link
Contributor

@ojeytonwilliams ojeytonwilliams left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks for your patience as I reviewed this.

@ahmadabdolsaheb could you take a look before we ping Quincy for his input?

@ShaunSHamilton
Copy link
Member Author

Thanks for the back-and-forth, Oliver.

As far as my plans go, I have just pushed my final changes. Just pending others' input.

@ahmaxed
Copy link
Member

ahmaxed commented Nov 3, 2020

@SKY020, thank you for your progress on this feature.

Here are my humble thoughts:

  1. We could make the project titles bold or remove their underline since the list seem too underlineyy:
  2. Meta sections that are not part of the certificate should get a different background( can be tackled in another pr)
  3. The project links should be displayed to the certificate owners, so they would realize that those links are displayed to others as well.

However, it would be a good idea to get @QuincyLarson's feedback at this point to see if we are on the same line.

@ShaunSHamilton
Copy link
Member Author

@ahmadabdolsaheb Thank you, for the feedback.

  1. I am not a fan of all of the underlines either, but I did not want to remove the visual accessibility that there are links.
  2. I would prefer to get everything else about this PR sorted, then move on to the specific CSS.
  3. Sure, I will make those changes.

@ShaunSHamilton
Copy link
Member Author

Project Links are now always visible.
Links to the project pages are now in bold.

Let me know, what/if to change the background of non-certificate content to.

@Zou1738
Copy link

Zou1738 commented Nov 8, 2020 via email

@ojeytonwilliams
Copy link
Contributor

Unsubscribe me from this plz

Here's what you need to use to unsubscribe:

image

@QuincyLarson
Copy link
Contributor

QuincyLarson commented Nov 21, 2020

Hey @SKY020 First of all thanks for your work on this PR so far. This looks solid.

I recommend using underline instead of bold, because underline is associated with clickable links. Even underlined text is less aesthetically pleasing, it ensures people realize these are clickable.

Second, in this image, under the "built the following projects" text:

https://user-images.githubusercontent.com/51722130/97606130-5baba180-1a07-11eb-9eac-0d20266a7e9a.png

Those aren't project names, those are certification names. I just wanted to make 100% sure you weren't pulling from the wrong data. I do prefer the version you reference earlier:

https://user-images.githubusercontent.com/51722130/97212305-1c3b4600-17b8-11eb-97c0-b255c5dbfee0.png

Where there is a "Solution" link as well.

@ShaunSHamilton
Copy link
Member Author

@QuincyLarson Those screenshots are outdated. The certifications currently appear like this:
image

Fullstack:
image

APIs and Microservices:
image

@ShaunSHamilton ShaunSHamilton added platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: UI Threads for addressing UX changes and improvements to user interface status: need to test locally status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. labels Dec 20, 2020
@raisedadead
Copy link
Member

Hey @ShaunSHamilton can we get a rebase. Sorry we merged a lot of commits in recently, thanks for your hard work on this.

@gitpod-io
Copy link

gitpod-io bot commented Feb 1, 2021

@raisedadead raisedadead changed the base branch from master to main February 1, 2021 13:12
Copy link
Member

@raisedadead raisedadead left a comment

Choose a reason for hiding this comment

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

Tested this locally. Looks great.

Self

image

Other

image

@raisedadead raisedadead merged commit 5539dbf into freeCodeCamp:main Feb 1, 2021
@ShaunSHamilton ShaunSHamilton deleted the feat/add-projects-to-cert branch March 30, 2021 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: UI Threads for addressing UX changes and improvements to user interface status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add links to projects required to claim certificate above the certificate itself

6 participants