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

Refactor Repos table in owner page and analytics page #2518

Merged
merged 28 commits into from
Feb 6, 2024

Conversation

rohitvinnakota-codecov
Copy link
Contributor

@rohitvinnakota-codecov rohitvinnakota-codecov commented Jan 16, 2024

Description

Updates the ReposTable component to use tanstack. This table is rendered on the owner page and the analytics page. This PR also includes typescript conversions to ReposTable as well as useRepos. This closes codecov/engineering-team#583.

Screenshots

Screen.Recording.2024-01-17.at.4.33.24.PM.mov

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

netlify bot commented Jan 16, 2024

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit 9bcaffd
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/65c23f4c95bdda00086bcca6
😎 Deploy Preview https://deploy-preview-2518--gazebo-staging.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 configuration.

isCurrentUserPartOfOrg: PropTypes.bool.isRequired,
activated: PropTypes.bool.isRequired,
active: PropTypes.bool.isRequired,
owner: PropTypes.string,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Long term fix here is to convert this file to typescript

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7aed025) 98.36% compared to head (0049dea) 98.36%.

❗ Current head 0049dea differs from pull request most recent head 9bcaffd. Consider uploading reports for the commit 9bcaffd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2518   +/-   ##
=====================================
  Coverage   98.36   98.36           
=====================================
  Files        813     814    +1     
  Lines      10653   10676   +23     
  Branches    2729    2717   -12     
=====================================
+ Hits       10478   10501   +23     
  Misses       173     173           
  Partials       2       2           
Files Coverage Δ
src/pages/AnalyticsPage/AnalyticsPage.jsx 100.00% <ø> (ø)
...es/AnalyticsPage/ChartSelectors/ChartSelectors.jsx 100.00% <100.00%> (ø)
src/services/repos/useRepos.tsx 100.00% <100.00%> (ø)
src/shared/ListRepo/ListRepo.jsx 100.00% <100.00%> (ø)
...hared/ListRepo/OrgControlTable/OrgControlTable.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/NoRepoCoverage.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/ReposTable.tsx 100.00% <100.00%> (ø)
...ared/ListRepo/ReposTable/getReposColumnsHelper.tsx 100.00% <100.00%> (ø)

... and 10 files with indirect coverage changes

Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <100.00%> (-0.01%) ⬇️
Services 99.56% <100.00%> (-0.01%) ⬇️
Shared 99.83% <100.00%> (+<0.01%) ⬆️
UI 94.23% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aed025...9bcaffd. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7aed025) 98.35% compared to head (9bcaffd) 98.36%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2518   +/-   ##
=======================================
  Coverage   98.35%   98.36%           
=======================================
  Files         813      814    +1     
  Lines       10653    10698   +45     
  Branches     2721     2732   +11     
=======================================
+ Hits        10478    10523   +45     
  Misses        173      173           
  Partials        2        2           
Files Coverage Δ
src/pages/AnalyticsPage/AnalyticsPage.jsx 100.00% <ø> (ø)
...es/AnalyticsPage/ChartSelectors/ChartSelectors.jsx 100.00% <100.00%> (ø)
src/services/repos/useRepos.tsx 100.00% <100.00%> (ø)
src/shared/ListRepo/ListRepo.jsx 100.00% <100.00%> (ø)
...hared/ListRepo/OrgControlTable/OrgControlTable.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/NoRepoCoverage.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/ReposTable.tsx 100.00% <100.00%> (ø)
...ared/ListRepo/ReposTable/getReposColumnsHelper.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <100.00%> (+<0.01%) ⬆️
Services 99.56% <100.00%> (+<0.01%) ⬆️
Shared 99.83% <100.00%> (+<0.01%) ⬆️
UI 94.23% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aed025...9bcaffd. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2518   +/-   ##
=======================================
  Coverage   98.35%   98.36%           
=======================================
  Files         813      814    +1     
  Lines       10653    10698   +45     
  Branches     2710     2740   +30     
=======================================
+ Hits        10478    10523   +45     
  Misses        173      173           
  Partials        2        2           
Files Coverage Δ
src/pages/AnalyticsPage/AnalyticsPage.jsx 100.00% <ø> (ø)
...es/AnalyticsPage/ChartSelectors/ChartSelectors.jsx 100.00% <100.00%> (ø)
src/services/repos/useRepos.tsx 100.00% <100.00%> (ø)
src/shared/ListRepo/ListRepo.jsx 100.00% <100.00%> (ø)
...hared/ListRepo/OrgControlTable/OrgControlTable.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/NoRepoCoverage.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/ReposTable.tsx 100.00% <100.00%> (ø)
...ared/ListRepo/ReposTable/getReposColumnsHelper.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <100.00%> (+<0.01%) ⬆️
Services 99.56% <100.00%> (+<0.01%) ⬆️
Shared 99.83% <100.00%> (+<0.01%) ⬆️
UI 94.23% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aed025...9bcaffd. Read the comment docs.

Copy link

codecov-public-qa bot commented Jan 16, 2024

Codecov Report

Merging #2518 (9bcaffd) into main (7aed025) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2518   +/-   ##
=======================================
  Coverage   98.35%   98.36%           
=======================================
  Files         813      814    +1     
  Lines       10653    10698   +45     
  Branches     2729     2689   -40     
=======================================
+ Hits        10478    10523   +45     
  Misses        173      173           
  Partials        2        2           
Files Coverage Δ
src/pages/AnalyticsPage/AnalyticsPage.jsx 100.00% <ø> (ø)
...es/AnalyticsPage/ChartSelectors/ChartSelectors.jsx 100.00% <100.00%> (ø)
src/services/repos/useRepos.tsx 100.00% <100.00%> (ø)
src/shared/ListRepo/ListRepo.jsx 100.00% <100.00%> (ø)
...hared/ListRepo/OrgControlTable/OrgControlTable.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/NoRepoCoverage.jsx 100.00% <ø> (ø)
src/shared/ListRepo/ReposTable/ReposTable.tsx 100.00% <100.00%> (ø)
...ared/ListRepo/ReposTable/getReposColumnsHelper.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 59.37% <ø> (ø)
Layouts 96.95% <ø> (ø)
Pages 99.28% <100.00%> (+<0.01%) ⬆️
Services 99.56% <100.00%> (+<0.01%) ⬆️
Shared 99.83% <100.00%> (+<0.01%) ⬆️
UI 94.23% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aed025...9bcaffd. Read the comment docs.

@rohitvinnakota-codecov rohitvinnakota-codecov changed the title [draft] Refactor Repos table in owner page and analytics page Refactor Repos table in owner page and analytics page Jan 17, 2024
@rohitvinnakota-codecov rohitvinnakota-codecov marked this pull request as ready for review January 17, 2024 21:36
@nicholas-codecov
Copy link
Contributor

Before diving too deep into reviewing this PR, after playing around with it, when sorting it doesn't seem to update the query to the API so we're not sorting on the entire repository list that a given org has only the ones present in the table at a given time. Can you refactor the useRepos hook to accept those ordering and ordering direction args, as well as updating the table so when it's sorted they get updated accordingly and passed along to the API so we get the correct list of repos.

Here's an example for some greater detail as to what is required here.

@codecov-releaser
Copy link
Contributor

Visit https://preview-pr-2518.codecov.dev for your PR preview. Expires after 1 month automatically.

Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

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

Two things to look at

src/shared/ListRepo/ReposTable/ReposTable.tsx Outdated Show resolved Hide resolved
src/shared/ListRepo/ReposTable/ReposTable.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

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

Few things to take a peak at.

src/services/repos/useRepos.tsx Outdated Show resolved Hide resolved
src/services/repos/useRepos.tsx Outdated Show resolved Hide resolved
src/services/repos/useRepos.tsx Outdated Show resolved Hide resolved
src/shared/ListRepo/ReposTable/ReposTable.spec.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@nicholas-codecov nicholas-codecov left a comment

Choose a reason for hiding this comment

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

Thanks for those changes, approved ✅

@rohitvinnakota-codecov rohitvinnakota-codecov merged commit 3879353 into main Feb 6, 2024
52 checks passed
@rohitvinnakota-codecov rohitvinnakota-codecov deleted the rvinnakota/refactor-repo-table branch February 6, 2024 14:24
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.

OwnerPage
3 participants