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: Pin default branch to top of branch selector items #3477

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

ajay-sentry
Copy link
Contributor

Description

This PR aims to pin the default branch (if it exists) to the top of the list of branches on the Branch Selector for the Failed Tests tab.

This is a quality of life fix to make it easy for folks to go back to the "main" view.

Closes codecov/engineering-team#2855

Screenshots

Screenshot 2024-11-08 at 10 23 10 AM Screenshot 2024-11-08 at 10 23 16 AM

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-releaser
Copy link
Contributor

codecov-releaser commented Nov 8, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
f5852f8 Fri, 08 Nov 2024 18:30:54 GMT Expired Expired
6c8a8ce Fri, 08 Nov 2024 19:27:04 GMT Cloud Enterprise

@@ -89,7 +89,17 @@ const BranchSelector = () => {
// @ts-expect-error - Select has some TS issues because it's still written in JS
dataMarketing="branch-selector-test-results-tab"
ariaName="test results branch selector"
items={branchList?.branches ?? []}
items={
overview?.defaultBranch
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be cleaner if we define a function for this logic and just do items={getBranchItems()}. Up to you

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 can get behind that, I also wasn't a huge fan of stuffing it in. Will make the update before merging

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6c8a8ce

Copy link

codecov bot commented Nov 8, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 5.77MB 132 bytes (-0.0%) ⬇️
gazebo-production-system-esm 5.83MB 505 bytes (0.01%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Nov 8, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.83MB 505 bytes (0.01%) ⬆️
gazebo-staging-system 5.77MB 132 bytes (-0.0%) ⬇️

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (4281615) to head (6c8a8ce).
Report is 1 commits behind head on tests-analytics-v2.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##           tests-analytics-v2    #3477   +/-   ##
===================================================
  Coverage               99.01%   99.01%           
===================================================
  Files                     812      812           
  Lines                   14448    14453    +5     
  Branches                 4113     4117    +4     
===================================================
+ Hits                    14306    14311    +5     
  Misses                    133      133           
  Partials                    9        9           
Files with missing lines Coverage Δ
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.68% <100.00%> (+<0.01%) ⬆️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <ø> (ø)

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 4281615...6c8a8ce. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (4281615) to head (6c8a8ce).
Report is 1 commits behind head on tests-analytics-v2.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           tests-analytics-v2    #3477   +/-   ##
===================================================
  Coverage               99.01%   99.01%           
===================================================
  Files                     812      812           
  Lines                   14448    14453    +5     
  Branches                 4113     4110    -3     
===================================================
+ Hits                    14306    14311    +5     
  Misses                    133      133           
  Partials                    9        9           
Files with missing lines Coverage Δ
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.68% <100.00%> (+<0.01%) ⬆️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <ø> (ø)

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 4281615...6c8a8ce. Read the comment docs.

@codecov-notifications
Copy link

codecov-notifications bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           tests-analytics-v2    #3477   +/-   ##
===================================================
  Coverage               99.01%   99.01%           
===================================================
  Files                     812      812           
  Lines                   14448    14453    +5     
  Branches                 4113     4110    -3     
===================================================
+ Hits                    14306    14311    +5     
  Misses                    133      133           
  Partials                    9        9           
Files with missing lines Coverage Δ
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.68% <100.00%> (+<0.01%) ⬆️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <ø> (ø)

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 4281615...6c8a8ce. Read the comment docs.

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (4281615) to head (6c8a8ce).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           tests-analytics-v2    #3477   +/-   ##
===================================================
  Coverage               99.01%   99.01%           
===================================================
  Files                     812      812           
  Lines                   14448    14453    +5     
  Branches                 4113     4110    -3     
===================================================
+ Hits                    14306    14311    +5     
  Misses                    133      133           
  Partials                    9        9           
Files Coverage Δ
.../SelectorSection/BranchSelector/BranchSelector.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.68% <100.00%> (+<0.01%) ⬆️
Services 99.36% <ø> (ø)
Shared 99.74% <ø> (ø)
UI 99.15% <ø> (ø)

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 4281615...6c8a8ce. Read the comment docs.

@ajay-sentry ajay-sentry merged commit b652a05 into tests-analytics-v2 Nov 8, 2024
59 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/2855-pin-default-to-top branch November 8, 2024 19:20
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