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: Create Team Plan Table for the Files Changed Table on the Commit Detail Page #2309

Conversation

nicholas-codecov
Copy link
Contributor

Description

This investigation got a little large but the first team plan table is done for the files changed tab on the commit detail page. As a disclaimer future team plan tables should not be this size as this was a mere "investigation" that turned into a single PR.

Closes codecov/engineering-team#633

Notable Changes

  • Create new useCommitTeam hook
  • Create new useCompareTotalsTeam hook
  • Create new FilesChangedTableTeam component
  • Move CommitFileDiff to a local shared directory
  • Update useTierData to use team over lite
  • Update FilesChangedTab to check if on team plan and display FilesChangedTableTeam if true

Screenshots

Screenshot 2023-10-12 at 12 33 25 PM

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #2309 (e3c0f97) into main (086fc3e) will decrease coverage by 0.34%.
The diff coverage is 14.61%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2309     +/-   ##
=======================================
- Coverage   34.43   34.09   -0.34     
=======================================
  Files        656     659      +3     
  Lines       8080    8233    +153     
  Branches    1988    2010     +22     
=======================================
+ Hits        2782    2807     +25     
- Misses      5269    5397    +128     
  Partials      29      29             
Files Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 0.00% <ø> (ø)
src/services/tier/useTier.ts 0.00% <ø> (ø)
...lPage/subRoute/FilesChangedTab/FilesChangedTab.tsx 0.00% <0.00%> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.jsx 0.00% <0.00%> (ø)
src/services/commit/useCompareTotalsTeam.tsx 30.43% <30.43%> (ø)
src/services/commit/useCommitTeam.tsx 33.96% <33.96%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 0.00% <0.00%> (ø)

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 086fc3e...e3c0f97. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Oct 12, 2023

Codecov Report

Merging #2309 (e3c0f97) into main (086fc3e) will decrease coverage by 0.34%.
The diff coverage is 14.61%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2309      +/-   ##
==========================================
- Coverage   34.43%   34.09%   -0.34%     
==========================================
  Files         656      659       +3     
  Lines        8080     8233     +153     
  Branches     1939     2027      +88     
==========================================
+ Hits         2782     2807      +25     
- Misses       5275     5397     +122     
- Partials       23       29       +6     
Files Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 0.00% <ø> (ø)
src/services/tier/useTier.ts 0.00% <ø> (ø)
...lPage/subRoute/FilesChangedTab/FilesChangedTab.tsx 0.00% <0.00%> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.jsx 0.00% <0.00%> (ø)
src/services/commit/useCompareTotalsTeam.tsx 30.43% <30.43%> (ø)
src/services/commit/useCommitTeam.tsx 33.96% <33.96%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes


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 086fc3e...e3c0f97. Read the comment docs.

@codecov-public-qa
Copy link

codecov-public-qa bot commented Oct 12, 2023

Codecov Report

Merging #2309 (e3c0f97) into main (086fc3e) will decrease coverage by 0.34%.
The diff coverage is 14.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2309      +/-   ##
==========================================
- Coverage   34.43%   34.09%   -0.34%     
==========================================
  Files         656      659       +3     
  Lines        8080     8233     +153     
  Branches     1981     2010      +29     
==========================================
+ Hits         2782     2807      +25     
- Misses       5275     5397     +122     
- Partials       23       29       +6     
Files Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 0.00% <ø> (ø)
src/services/tier/useTier.ts 0.00% <ø> (ø)
...lPage/subRoute/FilesChangedTab/FilesChangedTab.tsx 0.00% <0.00%> (ø)
...ChangedTab/FilesChangedTable/FilesChangedTable.jsx 0.00% <0.00%> (ø)
src/services/commit/useCompareTotalsTeam.tsx 30.43% <30.43%> (ø)
src/services/commit/useCommitTeam.tsx 33.96% <33.96%> (ø)
...ab/FilesChangedTableTeam/FilesChangedTableTeam.tsx 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes


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 086fc3e...e3c0f97. Read the comment docs.

@netlify
Copy link

netlify bot commented Oct 12, 2023

Deploy Preview for gazebo-staging ready!

Name Link
🔨 Latest commit e3c0f97
🔍 Latest deploy log https://app.netlify.com/sites/gazebo-staging/deploys/652eb5088239300008c3b28d
😎 Deploy Preview https://deploy-preview-2309--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.

Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Generally looks good to me, it's under feature flag + tier so 👌. Left some typo fix + optional suggestions

src/services/tier/useTier.spec.tsx Outdated Show resolved Hide resolved
src/services/commit/useCompareTotalsTeam.tsx Outdated Show resolved Hide resolved
repo,
commitid,
filters = {},
refetchInterval = 2000,
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we don't need this refetch interval/polling related information for this hook. This was one of the earliest hooks we made and it was kind of an "all you can shove" kind of hook, so it would be ideal to get rid of this functionality if it's not an immense lift, up to you as this was probably mostly copy paste from the existing code 👌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see how we can not have it, if a commit has not finished processing then we went to poll until it has completed, so the user does not have to do anything (i.e. refreshing the page) to get the new information.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha gotcha, I was confusing this with the useResyncUser and thought this was logic inside of it. Sgsgsg

@nicholas-codecov nicholas-codecov force-pushed the gh-eng-633-feat-create-new-table-for-commit-files-changed-for-lite-plan branch from 0e006dc to bd4d31c Compare October 17, 2023 12:28
Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Lgtm. Do you foresee other table tickets being this chunky too? Just trying to gauge our timeline w/ the remaining changes 👌

@nicholas-codecov
Copy link
Contributor Author

Lgtm. Do you foresee other table tickets being this chunky too? Just trying to gauge our timeline w/ the remaining changes 👌

We updated the tickets to create new tickets for the related hooks, so I mean overall there will be more work, but hopefully in smaller broken down PRs instead.

@nicholas-codecov nicholas-codecov merged commit 882f9da into main Oct 17, 2023
23 of 30 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-633-feat-create-new-table-for-commit-files-changed-for-lite-plan branch October 17, 2023 16:43
terry-codecov pushed a commit that referenced this pull request Oct 17, 2023
…t Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633
terry-codecov added a commit that referenced this pull request Oct 17, 2023
* feat: setup pull request page to pass around selected flags in links

* Feedback, fix passing links to files+folders, additional testing

* fix file explorer test failing on href match due to new query param pass through

* airplane commit, cant check local dev server: Resolve merge issues / tests + unify codebases missed of commitSHA and commitSha to just commitSha

* Prevent multislect from collapsing + wire up PR details page to pass through flags links

* Fix accidental removal of ref on usePrefetchPullFileEntry

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

---------

Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>
RulaKhaled pushed a commit that referenced this pull request Oct 18, 2023
…t Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633
RulaKhaled pushed a commit that referenced this pull request Oct 18, 2023
* feat: setup pull request page to pass around selected flags in links

* Feedback, fix passing links to files+folders, additional testing

* fix file explorer test failing on href match due to new query param pass through

* airplane commit, cant check local dev server: Resolve merge issues / tests + unify codebases missed of commitSHA and commitSha to just commitSha

* Prevent multislect from collapsing + wire up PR details page to pass through flags links

* Fix accidental removal of ref on usePrefetchPullFileEntry

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

---------

Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>
RulaKhaled added a commit that referenced this pull request Oct 24, 2023
* Update with service less requests

* Make sure hook supports service less

* feat: Add Flag MultiSelect to CommitPageTabs (#2303)

Add a feature flagged multi select to the CommitPageTabs component.

GH codecov/engineering-team#344

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

* Setup pull request page to pass around selected flags (#2282)

* feat: setup pull request page to pass around selected flags in links

* Feedback, fix passing links to files+folders, additional testing

* fix file explorer test failing on href match due to new query param pass through

* airplane commit, cant check local dev server: Resolve merge issues / tests + unify codebases missed of commitSHA and commitSha to just commitSha

* Prevent multislect from collapsing + wire up PR details page to pass through flags links

* Fix accidental removal of ref on usePrefetchPullFileEntry

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

---------

Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>

* chore: Remove segment from frontend (#2314)

* Update with tests

* test with support service less

* adjust logic to handle original route

* it's fine it works with no providers

---------

Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>
Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: Terry <87824812+terry-codecov@users.noreply.github.com>
RulaKhaled added a commit that referenced this pull request Oct 31, 2023
* Update with service less requests

* Make sure hook supports service less

* feat: Add Flag MultiSelect to CommitPageTabs (#2303)

Add a feature flagged multi select to the CommitPageTabs component.

GH codecov/engineering-team#344

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

* Setup pull request page to pass around selected flags (#2282)

* feat: setup pull request page to pass around selected flags in links

* Feedback, fix passing links to files+folders, additional testing

* fix file explorer test failing on href match due to new query param pass through

* airplane commit, cant check local dev server: Resolve merge issues / tests + unify codebases missed of commitSHA and commitSha to just commitSha

* Prevent multislect from collapsing + wire up PR details page to pass through flags links

* Fix accidental removal of ref on usePrefetchPullFileEntry

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

---------

Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>

* chore: Remove segment from frontend (#2314)

* Update with tests

* test with support service less

* adjust logic to handle original route

* it's fine it works with no providers

---------

Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>
Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: Terry <87824812+terry-codecov@users.noreply.github.com>
RulaKhaled added a commit that referenced this pull request Nov 3, 2023
* first pass, wheeeeeo

* Sorting functionality

* Update with tests

* wrap up repos list:

* Spelling correction (#2336)

* 616 add patch setction pr page team tier (#2337)

* feat: add header component for team tier customers

* feat: converted Header.jsx to Header.tsx + tests

* fix: add comparison schema types

* fix: Filter out certain browser from sending events to Sentry (#2338)

Filter out events for a given browser because they don't have all JS functions fully implemented causing issues that we cannot address.

* feat: Hide Flag MultiSelect when on Team Plan on Commit Detail Page (#2327)

We will need to hide the flag multi select on the commit detail page when the user is on the team plan as they are not an available feature to those users.

GH codecov/engineering-team#687

* feat, ref: Disable Flag MultiSelect on Coverage Tab when on a Team Plan (#2329)

Disable the flag multi-select on the coverage tab when users/orgs are on a team plan.

GH codecov/engineering-team#685

* feat: Grab flags in IndirectChangesTable and pass along with request (#2335)

Update indirect changes tab on the commit detail page to grab flags from the url params and pass along as query args.

GH codecov/engineering-team#348

* feat: Update CommitDetailPage FilesChangedTable to pass along flags (#2334)

Update the files changed tab on the commit detail page to grab flags url param and pass along as query args.

GH codecov/engineering-team#347

* ref: Update TOS to work for service less users. (#2321)

* Update with service less requests

* Make sure hook supports service less

* feat: Add Flag MultiSelect to CommitPageTabs (#2303)

Add a feature flagged multi select to the CommitPageTabs component.

GH codecov/engineering-team#344

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

* Setup pull request page to pass around selected flags (#2282)

* feat: setup pull request page to pass around selected flags in links

* Feedback, fix passing links to files+folders, additional testing

* fix file explorer test failing on href match due to new query param pass through

* airplane commit, cant check local dev server: Resolve merge issues / tests + unify codebases missed of commitSHA and commitSha to just commitSha

* Prevent multislect from collapsing + wire up PR details page to pass through flags links

* Fix accidental removal of ref on usePrefetchPullFileEntry

* Add patch column to pulls table (#2308)

* feat: add patch column to the pulls list page

* uncomment development settings

* feat: Create Team Plan Table for the Files Changed Table on the Commit Detail Page (#2309)

Create new commit fetching hooks for the team plan, as well as creating a new table for files changed tab on the
commit detail page for the new team plan.

GH codecov/engineering-team#633

---------

Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>

* chore: Remove segment from frontend (#2314)

* Update with tests

* test with support service less

* adjust logic to handle original route

* it's fine it works with no providers

---------

Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>
Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: Terry <87824812+terry-codecov@users.noreply.github.com>

* restructure folders anticipating second header component for team tier (#2340)

* feat: add hook for commit detail page team tier (#2341)

* build: Update PostCSS (#2346)

Update PostCSS dependency.

* Migrate TextInput to TypeScript (#2342)

* Migrate textinput to TS

* Add story

* formatting

* organize imports

* Connect flag selector to flags filter on PR details page (#2343)

* feat: Update impacted files resolver for use pull, connect the flag selector to the api.

* update missing logic as requested + unknown flags message to be aligned with repo overview design

* Noticed the changing the pull query broke impacted files while smoke testing, dupicated the same compatibility work for the new resolver.

* Refactor to use a impacted files enum as requested.

* fix: Attempting to fix CommitDetailPage and RepoPage Tests (#2350)

Addressing flaky tests in CommitDetailPage and RepoPage.

* Add patch section commit detail page team tier (#2344)

* restructure folders anticipating second header component for team tier

* feat: add patch coverage section to commit detail page for team tier customer

* fix: rename HeaderDefault to HeaderTeam for team file

* Convert Sparkline to typescript (#2347)

* Convert sparkline to typescript

* Consistent type defs

* better variable names

* use enum

* quick fixes

* Update use memo

* Update tests with getSortingOption

* pull out the function of the test block

---------

Co-authored-by: Joe Becher <joe@codecov.io>
Co-authored-by: Adrian <adrian@codecov.io>
Co-authored-by: nicholas-codecov <nicholas.deschenes@sentry.io>
Co-authored-by: Terry <87824812+terry-codecov@users.noreply.github.com>
Co-authored-by: Rohit Vinnakota <148245014+rohitvinnakota-codecov@users.noreply.github.com>
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.

[Client] - Investigate loading Tables based on plan using new Table UI
3 participants