Skip to content

feat: Open coverage dropdown when linking from file explorer#3752

Merged
calvin-codecov merged 4 commits intomainfrom
cy/report_dropdown_default
Feb 20, 2025
Merged

feat: Open coverage dropdown when linking from file explorer#3752
calvin-codecov merged 4 commits intomainfrom
cy/report_dropdown_default

Conversation

@calvin-codecov
Copy link
Copy Markdown
Contributor

@calvin-codecov calvin-codecov commented Feb 19, 2025

Description

codecov/engineering-team#3129

Note: our current mechanism to open a dropdown is with the query param ?dropdown=. There is an opportunity where we could change to always open coverage dropdown by default instead of only when it is designated but after consulting with Nick, I decided that this still makes the most sense for the time being as the dropdown trigger bars have summary information. If we were to always open the coverage dropdown in all scenarios, it could possibly push the bundle report dropdown too far down and could be a disservice to the user.

Notable Changes

  • Open the coverage dropdown by default when opening a file explorer link in window or in a new tab

Screenshots

Link to Sample Entry

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.

@codecov-qa
Copy link
Copy Markdown

codecov-qa bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (9eac42c) to head (22ef91c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3752   +/-   ##
=======================================
  Coverage   98.67%   98.67%           
=======================================
  Files         825      825           
  Lines       14841    14843    +2     
  Branches     4241     4251   +10     
=======================================
+ Hits        14645    14647    +2     
  Misses        189      189           
  Partials        7        7           
Files with missing lines Coverage Δ
...ubroute/FileExplorer/shared/RepoContentsResult.tsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.jsx 100.00% <100.00%> (ø)
...able/TableEntries/CommitEntries/CommitDirEntry.tsx 100.00% <ø> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.tsx 100.00% <ø> (ø)
...ntsTable/TableEntries/PullEntries/PullDirEntry.tsx 100.00% <ø> (ø)
...tsTable/TableEntries/PullEntries/PullFileEntry.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9eac42c...22ef91c. Read the comment docs.

@codecov-public-qa
Copy link
Copy Markdown

codecov-public-qa bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.70%. Comparing base (3f72266) to head (33900f2).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3752   +/-   ##
=======================================
  Coverage   98.70%   98.70%           
=======================================
  Files         823      823           
  Lines       14801    14803    +2     
  Branches     4220     4230   +10     
=======================================
+ Hits        14609    14611    +2     
  Misses        186      186           
  Partials        6        6           
Files with missing lines Coverage Δ
...ubroute/FileExplorer/shared/RepoContentsResult.tsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.jsx 100.00% <100.00%> (ø)
...able/TableEntries/CommitEntries/CommitDirEntry.tsx 100.00% <ø> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.tsx 100.00% <ø> (ø)
...ntsTable/TableEntries/PullEntries/PullDirEntry.tsx 100.00% <ø> (ø)
...tsTable/TableEntries/PullEntries/PullFileEntry.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.37% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 3f72266...33900f2. Read the comment docs.

@codecov-staging
Copy link
Copy Markdown

codecov-staging bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3752   +/-   ##
=======================================
  Coverage   98.67%   98.67%           
=======================================
  Files         825      825           
  Lines       14841    14843    +2     
  Branches     4241     4243    +2     
=======================================
+ Hits        14645    14647    +2     
  Misses        189      189           
  Partials        7        7           
Files with missing lines Coverage Δ
...ubroute/FileExplorer/shared/RepoContentsResult.tsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.jsx 100.00% <100.00%> (ø)
...able/TableEntries/CommitEntries/CommitDirEntry.tsx 100.00% <ø> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.tsx 100.00% <ø> (ø)
...ntsTable/TableEntries/PullEntries/PullDirEntry.tsx 100.00% <ø> (ø)
...tsTable/TableEntries/PullEntries/PullFileEntry.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9eac42c...22ef91c. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2025

Bundle Report

Changes will increase total bundle size by 168 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 6.14MB 84 bytes (0.0%) ⬆️
gazebo-production-esm 6.2MB 84 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 40 bytes 125.7kB 0.03%
assets/index.*.js 40 bytes 125.37kB 0.03%
assets/RawFileViewer.*.js 4 bytes 127.08kB 0.0%

Files in assets/index.*.js:

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.tsx → Total Size: 508 bytes

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullDirEntry.tsx → Total Size: 484 bytes

Files in assets/index.*.js:

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.tsx → Total Size: 612 bytes

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitFileEntry.tsx → Total Size: 669 bytes

Files in assets/RawFileViewer.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.jsx → Total Size: 1.27kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 40 bytes 113.13kB 0.04%
assets/index-legacy.*.js 40 bytes 114.06kB 0.04%
assets/RawFileViewer-legacy.*.js 4 bytes 127.32kB 0.0%

Files in assets/index-legacy.*.js:

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.tsx → Total Size: 508 bytes

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullDirEntry.tsx → Total Size: 484 bytes

Files in assets/index-legacy.*.js:

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitFileEntry.tsx → Total Size: 669 bytes

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.tsx → Total Size: 612 bytes

Files in assets/RawFileViewer-legacy.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.jsx → Total Size: 1.27kB

@codecov-staging
Copy link
Copy Markdown

codecov-staging bot commented Feb 19, 2025

Bundle Report

Changes will increase total bundle size by 164 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.14MB 82 bytes (0.0%) ⬆️
gazebo-staging-esm 6.2MB 82 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 40 bytes 120.93kB 0.03%
assets/index.*.js 40 bytes 125.74kB 0.03%
assets/RawFileViewer.*.js 2 bytes 125.17kB 0.0%

Files in assets/index.*.js:

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.tsx → Total Size: 612 bytes

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitFileEntry.tsx → Total Size: 669 bytes

Files in assets/index.*.js:

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullDirEntry.tsx → Total Size: 484 bytes

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.tsx → Total Size: 508 bytes

Files in assets/RawFileViewer.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.jsx → Total Size: 1.27kB
view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 40 bytes 109.95kB 0.04%
assets/index-legacy.*.js 40 bytes 113.16kB 0.04%
assets/RawFileViewer-legacy.*.js 2 bytes 125.61kB 0.0%

Files in assets/index-legacy.*.js:

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitFileEntry.tsx → Total Size: 669 bytes

  • ./src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.tsx → Total Size: 612 bytes

Files in assets/index-legacy.*.js:

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.tsx → Total Size: 508 bytes

  • ./src/shared/ContentsTable/TableEntries/PullEntries/PullDirEntry.tsx → Total Size: 484 bytes

Files in assets/RawFileViewer-legacy.*.js:

  • ./src/shared/ContentsTable/DisplayTypeButton/DisplayTypeButton.jsx → Total Size: 1.27kB

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (9eac42c) to head (22ef91c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3752   +/-   ##
=======================================
  Coverage   98.67%   98.67%           
=======================================
  Files         825      825           
  Lines       14841    14843    +2     
  Branches     4241     4243    +2     
=======================================
+ Hits        14645    14647    +2     
  Misses        189      189           
  Partials        7        7           
Files with missing lines Coverage Δ
...ubroute/FileExplorer/shared/RepoContentsResult.tsx 100.00% <ø> (ø)
...tentsTable/DisplayTypeButton/DisplayTypeButton.jsx 100.00% <100.00%> (ø)
...able/TableEntries/CommitEntries/CommitDirEntry.tsx 100.00% <ø> (ø)
...ble/TableEntries/CommitEntries/CommitFileEntry.tsx 100.00% <ø> (ø)
...ntsTable/TableEntries/PullEntries/PullDirEntry.tsx 100.00% <ø> (ø)
...tsTable/TableEntries/PullEntries/PullFileEntry.tsx 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.26% <ø> (ø)
Services 99.24% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9eac42c...22ef91c. Read the comment docs.

@codecov-releaser
Copy link
Copy Markdown
Collaborator

codecov-releaser commented Feb 19, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
5a534ac Wed, 19 Feb 2025 18:10:27 GMT Expired Expired
31298ff Wed, 19 Feb 2025 20:07:17 GMT Expired Expired
96a27ce Thu, 20 Feb 2025 00:06:35 GMT Expired Expired
5b31645 Thu, 20 Feb 2025 16:51:48 GMT Expired Expired
eaefca9 Thu, 20 Feb 2025 20:05:09 GMT Expired Expired
33900f2 Thu, 20 Feb 2025 21:30:08 GMT Expired Expired
22ef91c Thu, 20 Feb 2025 22:30:44 GMT Cloud Enterprise

@calvin-codecov calvin-codecov force-pushed the cy/report_dropdown_default branch from 31298ff to 96a27ce Compare February 20, 2025 00:01
{!isLoading &&
active?.displayType === displayTypeParameter.list &&
dataLength && <span>{dataLength} total files</span>}
!!dataLength && <span>{dataLength} total files</span>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

was this a separate bug fix?

pageName="commitTreeView"
commitSha={commitSha}
queryParams={{ flags, components }}
queryParams={{ flags, components, dropdown: 'coverage' }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is the thing that actually does the fix right?

Copy link
Copy Markdown
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.

One small nit to tidy up

{!isLoading &&
active?.displayType === displayTypeParameter.list &&
dataLength && <span>{dataLength} total files</span>}
!!dataLength && <span>{dataLength} total files</span>}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this be moved to a ternary over && just so we don't accidentally render something we don't mean to, could render a 0 here 🙀

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can read more here if you're interested: notion doc

@calvin-codecov calvin-codecov force-pushed the cy/report_dropdown_default branch from eaefca9 to 33900f2 Compare February 20, 2025 21:24
@calvin-codecov calvin-codecov added this pull request to the merge queue Feb 20, 2025
Merged via the queue into main with commit e9a9a87 Feb 20, 2025
62 checks passed
@calvin-codecov calvin-codecov deleted the cy/report_dropdown_default branch February 20, 2025 22:31
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.

4 participants