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: connect repositories page to API data and pagination #405

Merged
merged 13 commits into from
Sep 22, 2022

Conversation

brandonroberts
Copy link
Contributor

@brandonroberts brandonroberts commented Sep 20, 2022

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR connects the repositories page to more live data from the GS API.
Also connects pagination to the requested data

In Progress

  • Fetch and list first contributors per repos displayed
  • Connect Activity
  • Connect PR Velocity
  • Last 30 days of commits for sparkline graph

Related Tickets & Documents

fixes #384
#320

Mobile & Desktop Screenshots/Recordings

image

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Sep 20, 2022

βœ… Deploy Preview for oss-insights ready!

Name Link
πŸ”¨ Latest commit 475d6cc
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/632b778fce04090008ee0ad3
😎 Deploy Preview https://deploy-preview-405--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 20, 2022

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit 475d6cc
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/632b7790807fe00009f3d7b9
😎 Deploy Preview https://deploy-preview-405--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks

Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.

Watched Files

This pull request modifies specific files that require careful review by the maintainers.

Files Matched

  • npm-shrinkwrap.json
  • package.json

@brandonroberts
Copy link
Contributor Author

@pixelsbyeryc I'll need some guidance on how to add the images for the up/down arrows

@OgDev-01
Copy link
Contributor

OgDev-01 commented Sep 21, 2022

@pixelsbyeryc I'll need some guidance on how to add the images for the up/down arrows

I think I can help on this one...

On line 30 in the PullRequestOverview component file, were we have {churnDirection === "up" ? "+" : "-"}{churn}%
replace "+" and "-" with an icon component from Octicons library that matches the icon on the design.

I think that will do πŸ‘Œ.

Copy link
Contributor

@eryc-cc eryc-cc left a comment

Choose a reason for hiding this comment

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

All components seem to be getting data from the backend, as they should! ✨

I won't approve because I don't have knowledge to evaluate if everything's good, but otherwise, looks saucy to me πŸ•

added border to contributor avatars
updated calculation for PRs merged
Copy link
Contributor

@OgDev-01 OgDev-01 left a comment

Choose a reason for hiding this comment

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

Superb!! πŸ•πŸ•

Copy link
Contributor

@eryc-cc eryc-cc left a comment

Choose a reason for hiding this comment

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

Also, on the Pill file, we can change the text color from light-amber-11 to light-amber-10, I think it'll look a bit less rough. πŸ™

If you want, I can open an issue on these two things so it doesn't stagnate your PR.

Looks good to me πŸ•

@brandonroberts
Copy link
Contributor Author

@pixelsbyeryc no problem. I tweaked the color and icon

@eryc-cc
Copy link
Contributor

eryc-cc commented Sep 21, 2022

@pixelsbyeryc no problem. I tweaked the color and icon

@brandonroberts sorry, I meant below the {icon}, there's a div that defines text-light-amber-11, we can make it 10.

As for the bg, we can leave it as 200...

     ...
      {icon}
      <div
        className={`
        ${color === "green" ? "text-light-grass-11" : color === "yellow" ? "text-light-amber-10" : color === "red" ? "text-light-red-11" : "text-light-slate-11"}
          font-medium text-sm leading-none`}>
        {text}
      </div>
    </div>

Screen Shot 2022-09-21 at 6 05 09 PM

@brandonroberts
Copy link
Contributor Author

Ahh I see. Go ahead and put a follow-up issue in and I'll fix it after this gets merged

@bdougie
Copy link
Member

bdougie commented Sep 21, 2022

Not a review but an observation. At first glance this list looks inconclusive, but all the 0 PR projects would suggest that those projects are not maintained or taking contributions.

I am thinking that we should consider the sorting to not be based on stars, but instead based on last commit or activity. The most active projects will have the most data and despite the popularity of freeCodeCamp in stars, it doesn't belong on the top.

Screen Shot 2022-09-21 at 3 24 32 PM

@bdougie
Copy link
Member

bdougie commented Sep 21, 2022

This wasn't documented but the percents on the popular repos look weird.

image

React has 110 open PRs. Let's make this % a reflection of how many of the 110 PRs got commits in the last 30 days. This will provide an indication of how stale the PRs are getting.

Copy link
Member

@bdougie bdougie 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, just had one data question here, #405 (comment).

Can you update that calculation to see if it is a tad bit more readable. I also opened a bug issue, not related to this work but something I noticed.

@OgDev-01
Copy link
Contributor

@brandonroberts @bdougie I think I'll need this PR merged in order to complete #409 πŸ™πŸ™

@brandonroberts brandonroberts merged commit 634de8e into beta Sep 22, 2022
@brandonroberts brandonroberts deleted the feat-repositories-data branch September 22, 2022 13:26
@brandonroberts
Copy link
Contributor Author

Merged! Will follow up with calculation and style fixes

github-actions bot pushed a commit that referenced this pull request Sep 22, 2022
## [1.7.0-beta.1](v1.6.1-beta.3...v1.7.0-beta.1) (2022-09-22)

### πŸ• Features

* connect repositories page to API data and pagination ([#405](#405)) ([634de8e](634de8e)), closes [#320](#320) [#384](#384)
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.7.0-beta.1 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Sep 23, 2022
## [1.7.0](v1.6.0...v1.7.0) (2022-09-23)

### 🎨 Styles

* added hover state style to footer links ([#420](#420)) ([3aa5f17](3aa5f17))
* change text font and icon size to xs(12px) ([#401](#401)) ([741288e](741288e))
* refactor show us button style to match design ([#419](#419)) ([b6c21b1](b6c21b1)), closes [#408](#408)

### πŸ› Bug Fixes

* add tooltip message on information icon hover ([#421](#421)) ([12ff851](12ff851)), closes [#366](#366)
* adds brandon to top5 ([8bb56cb](8bb56cb))
* correct beta branch checking beta gitsense api ([2c6f576](2c6f576))
* redirect from onboarding if already complete with custom hook ([#388](#388)) ([8600c76](8600c76)), closes [#387](#387)
* update PR overview calculation to use active PRs in last 30 days / total PRs ([#423](#423)) ([05b48ff](05b48ff)), closes [#418](#418)

### πŸ• Features

* add privacy and license terms ([#422](#422)) ([0dcc161](0dcc161)), closes [#377](#377)
* connect repositories page to API data and pagination ([#405](#405)) ([634de8e](634de8e)), closes [#320](#320) [#384](#384)
* create mobile version of repo table ([#409](#409)) ([9355968](9355968))

### πŸ§‘β€πŸ’» Code Refactoring

* check avatarURL for orange avatar background and update pill colors ([#424](#424)) ([c821cd5](c821cd5)), closes [#414](#414) [#416](#416)
* Polish the Dashboard to match designs ([#427](#427)) ([f919c27](f919c27))
* Polish the Reports Page to match the design ([#425](#425)) ([87a2bdc](87a2bdc))
* Update text styles on Scatter Chart card ([#429](#429)) ([ab24703](ab24703))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.7.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.7.0-beta.1](open-sauced/app@v1.6.1-beta.3...v1.7.0-beta.1) (2022-09-22)

### πŸ• Features

* connect repositories page to API data and pagination ([#405](open-sauced/app#405)) ([634de8e](open-sauced/app@634de8e)), closes [#320](open-sauced/app#320) [#384](open-sauced/app#384)
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.7.0](open-sauced/app@v1.6.0...v1.7.0) (2022-09-23)

### 🎨 Styles

* added hover state style to footer links ([#420](open-sauced/app#420)) ([3aa5f17](open-sauced/app@3aa5f17))
* change text font and icon size to xs(12px) ([#401](open-sauced/app#401)) ([741288e](open-sauced/app@741288e))
* refactor show us button style to match design ([#419](open-sauced/app#419)) ([b6c21b1](open-sauced/app@b6c21b1)), closes [#408](open-sauced/app#408)

### πŸ› Bug Fixes

* add tooltip message on information icon hover ([#421](open-sauced/app#421)) ([12ff851](open-sauced/app@12ff851)), closes [#366](open-sauced/app#366)
* adds brandon to top5 ([8bb56cb](open-sauced/app@8bb56cb))
* correct beta branch checking beta gitsense api ([2c6f576](open-sauced/app@2c6f576))
* redirect from onboarding if already complete with custom hook ([#388](open-sauced/app#388)) ([8600c76](open-sauced/app@8600c76)), closes [#387](open-sauced/app#387)
* update PR overview calculation to use active PRs in last 30 days / total PRs ([#423](open-sauced/app#423)) ([05b48ff](open-sauced/app@05b48ff)), closes [#418](open-sauced/app#418)

### πŸ• Features

* add privacy and license terms ([#422](open-sauced/app#422)) ([0dcc161](open-sauced/app@0dcc161)), closes [#377](open-sauced/app#377)
* connect repositories page to API data and pagination ([#405](open-sauced/app#405)) ([634de8e](open-sauced/app@634de8e)), closes [#320](open-sauced/app#320) [#384](open-sauced/app#384)
* create mobile version of repo table ([#409](open-sauced/app#409)) ([9355968](open-sauced/app@9355968))

### πŸ§‘β€πŸ’» Code Refactoring

* check avatarURL for orange avatar background and update pill colors ([#424](open-sauced/app#424)) ([c821cd5](open-sauced/app@c821cd5)), closes [#414](open-sauced/app#414) [#416](open-sauced/app#416)
* Polish the Dashboard to match designs ([#427](open-sauced/app#427)) ([f919c27](open-sauced/app@f919c27))
* Polish the Reports Page to match the design ([#425](open-sauced/app#425)) ([87a2bdc](open-sauced/app@87a2bdc))
* Update text styles on Scatter Chart card ([#429](open-sauced/app#429)) ([ab24703](open-sauced/app@ab24703))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Repositories Table doesn't have empty states
5 participants