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

Add Cohorts section and content tweaks for Supporting Devs section #19

Merged
merged 16 commits into from
Sep 21, 2023

Conversation

Pabl0cks
Copy link
Member

@Pabl0cks Pabl0cks commented Sep 15, 2023

Added Cohorts section and modified content from current Supporting Devs section according to figma prototypes and notion docs specifications.

Moving this PR to revision, specially to check this stuff that I'm not sure if it's implemented properly:

  • Couldn't manage to use daisyUI table. Tried giving "table" classname to my <table> but then it didn't display the styles I tried to pass with tailwind classes, or with globals.css.
  • Added some parameters to theme styles in tailwind.config.js
  • Set rounded borders to table content in globals.css
  • Wasn't sure if I had to do something special to make test environment be able to read new API stats, so hardcoded it to make sure it works, will remove before merge.

There are some details pending to confirm, but the will be minor tweaks over the core changes that are currently implemented in this PR.

ToDos

  • Polish tweaks on Supporting Devs section
  • Remove hardcoded API URLs.
  • Remove dummy stats under Cohorts.
  • Pending confirmation: Should we show Supporting Devs image on mobile?
  • Pending confirmation: ETH column from Cohorts table, it's Balance or Total Streamed by that Cohort? For now it's set to Balance.
  • Pending confirmation to show or hide "loogies" on Cohorts section background
  • Pending confirmation in what to do with Cohorts section and Learn more until we have a Stats band between them. (Same background color)

For next iteration

  • Add emojis for cohorts.
  • Change behavior of buttons from Cohorts => Embedded form (Typeform, Tally, Google Forms).
  • Pending confirmation how / where to get Supporting Devs and Cohorts stats from Figma.
  • Have square table with scrollbar.
  • Show the table on mobile too if it looks OK with scrollbar

@vercel
Copy link

vercel bot commented Sep 15, 2023

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

Name Status Preview Comments Updated (UTC)
buidlguidl ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 10:00am

@Pabl0cks Pabl0cks marked this pull request as draft September 15, 2023 23:19
<span className="ml-2 font-bold">
{
// Calculation for Total Number of Hackers
cohortsData?.reduce((acc, cohort) => acc + Object.keys(cohort.builders).length, 0)
Copy link
Member

@technophile-04 technophile-04 Sep 18, 2023

Choose a reason for hiding this comment

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

Maybe we can do this calculation in getStaticProps and pass in totalHackers :

// getStaticProps
  return {
    props: {
      stats,
      cohortsData,
      totalHackers,
    },
    // 6 hours refresh.
    revalidate: 21600,
  };

Copy link
Member Author

@Pabl0cks Pabl0cks Sep 19, 2023

Choose a reason for hiding this comment

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

Nice suggestion! I've just updated all calculations to do them in getStaticProps 🙌

If I didn't do it in the right way, let me know please! 😅

@@ -209,37 +217,125 @@ const Home: NextPage<{ stats: Stats }> = ({ stats }) => {

{/* Supporting Devs*/}
<div className="bg-base-300">
<div className="mx-auto lg:max-w-[1980px] bg-none lg:bg-[url('/assets/funding.png')] md:[background-position-x:40vw] md:bg-contain bg-no-repeat xl:bg-right">
<div className="mx-auto lg:max-w-[1980px] bg-none lg:bg-[url('/assets/support-high-impact-devs.png')] md:[background-position-x:45vw] [background-position-y:50%] md:bg-auto bg-no-repeat ">
Copy link
Member

Choose a reason for hiding this comment

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

Was wondering if we should keep this full image similar to other section, also found in Figma we have it similar to the other section (lol maybe Andrea was tweaking a few things while I was viewing) :
Screenshot 2023-09-18 at 8 50 10 PM

But I think I like it how we have it for other sections.

Also noticed that for some reason website image looks a bit blurry :
Screenshot 2023-09-18 at 8 57 40 PM

Copy link
Member

@technophile-04 technophile-04 Sep 20, 2023

Choose a reason for hiding this comment

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

Just tried this section making similar to other sections at 07a8cde as discussed in TG :

Screenshot 2023-09-20 at 7 41 40 PM

But on screens b/w 1024 - 1180 it looks a bit weird since we have alot description in this section as compared to other sections :

Current section Other similar section with less description
Screen.Recording.2023-09-20.at.7.35.55.PM.mov
Screen.Recording.2023-09-20.at.7.36.38.PM.mov

I have commented on your code below, lol was not sure which looks better maybe we could ask Andrea for suggestions too?

Here is the comparison links :

Current with new changes : https://buidlguidl-l2angsz0j-buidlguidldao.vercel.app/

Old one : https://buidlguidl-7ku1uzgrz-buidlguidldao.vercel.app/

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 playing with it and proposing a new version, I prefer your approach ♥.

I'll ask Andrea too 🙌

Copy link
Contributor

Choose a reason for hiding this comment

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

The old version doesn't display correctly in super big screens;

image

But it's fixed in the new one!

@technophile-04
Copy link
Member

Tysm @Pabl0cks !!! Looks nice ! added few small comments 🙌

Couldn't manage to use daisyUI table. Tried giving "table" classname to my <table> but then it didn't display the styles I tried to pass with tailwind classes, or with globals.css.

I think maybe you got this notion because daisy table class applies base-100 as table background and we also had base-100 as section background, I tried applying table-zebra, table-compact classes and they we getting applied

But yeah I think its fine we apply our own classes to table instead of relying on daisyUI v2 table class because the v2 table are hard to customize even their docs said they solved this in V3 :
Screenshot 2023-09-18 at 8 07 13 PM

So its fine if we don't use daisyUI table 🙌

@Pabl0cks
Copy link
Member Author

But yeah I think its fine we apply our own classes to table instead of relying on daisyUI v2 table class because the v2 table are hard to customize even their docs said they solved this in V3 :

So its fine if we don't use daisyUI table 🙌

Thanks for the awesome review and explanations Shiv, and thanks for the research on daisyUI v2 table limitations 🔥♥

I solved (or tried to!) all of the review issues except the Supporting Devs background that we discussed on TG.

Let me know if you see anything else, or if any of my fixes does not have the correct approach 🙌

@technophile-04
Copy link
Member

technophile-04 commented Sep 20, 2023

Tysm Pablo the changes looks great !! Just updated "supporting dev section" #19 (comment) was not sure which looks better so kept the previous one commented below because I kinda like that one too, we should remove either one before merging 🙌

One last thing (we could also maybe tackle this in another PR), regarding the Cohort section table should we shorten it a bit so that it looks "square" and have a scroll bar as Figma? :

Screenshot 2023-09-20 at 9 00 38 PM

So maybe we should add this to "next iteration" of #19 (comment) :

  • Have square table with scroll bar
  • Show the table on mobile too (I think once we have scroll we can show table on mobile too since it won't be too long)

@Pabl0cks
Copy link
Member Author

One last thing (we could also maybe tackle this in another PR), regarding the Cohort section table should we shorten it a bit so that it looks "square" and have a scroll bar as Figma? :

Andrea saw OK current table version with that size and no scrollbar, but asked what would happend when more Cohorts appear, and you're right! There is no scrollbar for now when that happens in the future.

Tried adding it to not make table grow with more cohorts, but found myself with problems because of the table shadow and thead border-less "background-less".

I think we can work on it on a future iteration, yep 🙌 Added to the "For next iteration" section from PR description

@carletex
Copy link
Contributor

I think we can work on it on a future iteration, yep 🙌 Added to the "For next iteration" section from PR description

Sounds good!

Show the table on mobile too (I think once we have scroll we can show table on mobile too since it won't be too long)

Maybe we could show this on mobile for now?

image

@Pabl0cks
Copy link
Member Author

Maybe we could show this on mobile for now?
image

Yes! I thought about it when I added it, but then forgot to implement it. Will get on it now 🙌

@Pabl0cks
Copy link
Member Author

I've just added Cohort stats badges on mobile, let me know if you would change its appearance or see any other issue 🙌

Thanks a lot for the reviews, appreciate your patience with this task!!

Copy link
Member

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

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

Looks great !! Tysm Pablo 🙌

@carletex
Copy link
Contributor

Amazing work @Pabl0cks and @technophile-04 !!

@carletex carletex merged commit 4f410e8 into main Sep 21, 2023
2 checks passed
@carletex carletex deleted the cohorts-section branch September 21, 2023 15:42
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