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

feat: About page #69

Merged
merged 3 commits into from
Dec 18, 2024
Merged

feat: About page #69

merged 3 commits into from
Dec 18, 2024

Conversation

IgboPharaoh
Copy link
Collaborator

@IgboPharaoh IgboPharaoh commented Dec 7, 2024

This pr adds the About page :

  • Adds design, icons and media responsiveness
  • Add setup script to fetch reviewer data from bitcointranscripts repository

The deployment is failing as a GITHUB_ACCESS_TOKEN will be needed to test this implementation.
A further discussion is needed to finalise on this implementation.

Copy link

vercel bot commented Dec 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 5:16pm

@Emmanuel-Develops
Copy link
Collaborator

Emmanuel-Develops commented Dec 7, 2024

The deployment is failing as a GITHUB_ACCESS_TOKEN will be needed to test this implementation.

Added access token and deployed

@IgboPharaoh IgboPharaoh marked this pull request as ready for review December 7, 2024 23:52
@IgboPharaoh IgboPharaoh marked this pull request as draft December 7, 2024 23:52
Copy link
Collaborator

@Emmanuel-Develops Emmanuel-Develops left a comment

Choose a reason for hiding this comment

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

Looks good!

only a couple of changes

const url = `https://api.github.com/repos/bitcointranscripts/bitcointranscripts`;
const token = process.env.GITHUB_ACCESS_TOKEN;

if (!process.env.GITHUB_ACCESS_TOKEN) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can use the token variable declared earlier.
i.e if (!token)

Copy link
Collaborator

Choose a reason for hiding this comment

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

also add a check for prod.
i.e (!process.env. GITHUB_ACCESS_TOKEN && process.env.NODE_ENV === "production")

having dev contributors generate gh keys to run adds extra restrictions

for (const {
author: { avatar_url, login },
} of commits) {
reviewers[login] = { image: avatar_url, title: trimText(login) };
Copy link
Collaborator

Choose a reason for hiding this comment

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

any specific reason why we are using objects and not an array

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its a matter of choice. I am using the the key to add reviewer data to the object which makes the addition on one pass. Using an array I will have to define a condition before it is been added and but for an object, new items with the same key replace existing items with the same key inside the object ensuring every item is unique without setting an extra condition.

page++;
}

const trimText = (text) => (text.length > 15 ? text.substring(0, 15) + "..." : text);
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets modify the data in the FE so we don't lose information here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no loss of information here as we are only trimming the string so reviewer title fits into the grid box

<div className='flex items-center justify-center pt-8 md:pt-14'>
<div className='flex gap-5 md:gap-5 max-w-[1060px] flex-wrap justify-center'>
{Object.values(data).map(({ title, image }) => (
<div key={title} className='flex flex-col items-center justify-center w-[150px] md:w-[160px] max-[340px]:w-[130px] gap-2 md:px-[14px]'>
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's have a link to the contributor profile


<GroupedImageSection
title='Reviewers'
subText='Editors evaluate and finalize Reviewers submissions, ensuring they’re consistently high quality.'
Copy link
Member

Choose a reason for hiding this comment

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

wrong copy here

@Emmanuel-Develops
Copy link
Collaborator

Nice work!
The link is linked to a trimmed version of the user github profile (for long usernames).
e.g https://github.com/Emmanuel-Develo..., https://github.com/ai-transcriber[..., https://github.com/alexanderwieder...

which correlates with this comment

it helps to have visual changes in the FE while we keep information intact. We can limit the characters with CSS in the component itself. This will be more dynamic and there won't be information loss
cc: @IgboPharaoh

@IgboPharaoh
Copy link
Collaborator Author

Nice work! The link is linked to a trimmed version of the user github profile (for long usernames). e.g https://github.com/Emmanuel-Develo..., https://github.com/ai-transcriber[..., https://github.com/alexanderwieder...

which correlates with this comment

it helps to have visual changes in the FE while we keep information intact. We can limit the characters with CSS in the component itself. This will be more dynamic and there won't be information loss cc: @IgboPharaoh

Great point which I didn't factor in, I've made necessary changes to fix this.

@Emmanuel-Develops
Copy link
Collaborator

Great point which I didn't factor in, I've made necessary changes to fix this.

nice. You can also limit with CSS using

    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

on the p tag.
from the preview deployment, it looks fine without the trim, solely because we do not have very long usernames.
I'm not peculiar on either but to account for future changes, the CSS trim is a good way to go
cc: @IgboPharaoh

@Emmanuel-Develops
Copy link
Collaborator

ACK!

@IgboPharaoh this looks good. Merging!

you can complete the dashed linking in a new PR

@Emmanuel-Develops Emmanuel-Develops changed the title Feat/About page feat: About page Dec 18, 2024
@Emmanuel-Develops Emmanuel-Develops merged commit a124087 into staging Dec 18, 2024
2 checks passed
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