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

Persist Selected Branch Across Tabs/Pages #3181

Merged
merged 6 commits into from
Sep 11, 2024

Conversation

calvin-codecov
Copy link
Contributor

@calvin-codecov calvin-codecov commented Sep 10, 2024

Description

Closes codecov/engineering-team#2188
Part 2/2 of https://www.notion.so/sentry/Branch-Selector-Mismatch-Experience-292469a7e517485b80eaf31f3f7d06d8

Code Example

Notable Changes

In order to share the link across page loads, I've tacked on the selected branch to the most of the Repo Page Tabs:

  • Coverage
    • Overview
    • Flags
    • Components
  • Bundles
  • Tests
  • Commits

I've excluded Pulls and Configurations as they don't really pertain to having a branch selected. If a user navigates to either of those with a selected branch, it will be wiped away and the user will need to manually switch away from the default branch when they go back to a tab that allows branch selection.

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.

@calvin-codecov calvin-codecov changed the title Cy/persist selected branch Persist Selected Branch Across Tabs/Pages Sep 10, 2024
@codecov-staging
Copy link

codecov-staging bot commented Sep 10, 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             @@
##             main    #3181      +/-   ##
==========================================
- Coverage   98.14%   98.13%   -0.01%     
==========================================
  Files         935      935              
  Lines       14500    14510      +10     
  Branches     3960     3973      +13     
==========================================
+ Hits        14231    14240       +9     
- Misses        264      265       +1     
  Partials        5        5              
Files Coverage Δ
src/App.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BranchSelector.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BundleSelector.tsx 93.93% <ø> (ø)
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.08% <ø> (-0.67%) ⬇️
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.55% <100.00%> (-0.23%) ⬇️
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
...FailedTestsTable/BranchSelector/BranchSelector.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <100.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <100.00%> (+<0.01%) ⬆️
Services 99.41% <100.00%> (-0.04%) ⬇️
Shared 99.50% <ø> (ø)
UI 94.67% <ø> (ø)

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 25d3193...05f0375. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (25d3193) to head (05f0375).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3181      +/-   ##
==========================================
- Coverage   98.14%   98.13%   -0.01%     
==========================================
  Files         935      935              
  Lines       14500    14510      +10     
  Branches     3955     3973      +18     
==========================================
+ Hits        14231    14240       +9     
- Misses        264      265       +1     
  Partials        5        5              
Files with missing lines Coverage Δ
src/App.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BranchSelector.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BundleSelector.tsx 93.93% <ø> (ø)
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.08% <ø> (-0.67%) ⬇️
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.55% <100.00%> (-0.23%) ⬇️
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
...FailedTestsTable/BranchSelector/BranchSelector.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <100.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <100.00%> (+<0.01%) ⬆️
Services 99.41% <100.00%> (-0.04%) ⬇️
Shared 99.50% <ø> (ø)
UI 94.67% <ø> (ø)

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 25d3193...05f0375. Read the comment docs.

Copy link

codecov-public-qa bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (25d3193) to head (05f0375).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3181      +/-   ##
==========================================
- Coverage   98.14%   98.13%   -0.01%     
==========================================
  Files         935      935              
  Lines       14500    14510      +10     
  Branches     3960     3973      +13     
==========================================
+ Hits        14231    14240       +9     
- Misses        264      265       +1     
  Partials        5        5              
Files Coverage Δ
src/App.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BranchSelector.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BundleSelector.tsx 93.93% <ø> (ø)
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.08% <ø> (-0.67%) ⬇️
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.55% <100.00%> (-0.23%) ⬇️
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
...FailedTestsTable/BranchSelector/BranchSelector.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <100.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <100.00%> (+<0.01%) ⬆️
Services 99.41% <100.00%> (-0.04%) ⬇️
Shared 99.50% <ø> (ø)
UI 94.67% <ø> (ø)

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 25d3193...05f0375. Read the comment docs.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (25d3193) to head (05f0375).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##               main      #3181        +/-   ##
================================================
- Coverage   98.14000   98.13000   -0.01000     
================================================
  Files           935        935                
  Lines         14500      14510        +10     
  Branches       3873       3968        +95     
================================================
+ Hits          14231      14240         +9     
- Misses          264        265         +1     
  Partials          5          5                
Files with missing lines Coverage Δ
src/App.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BranchSelector.tsx 100.00% <ø> (ø)
...b/BundleContent/BundleSelection/BundleSelector.tsx 93.93% <ø> (ø)
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.08% <ø> (-0.67%) ⬇️
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.55% <100.00%> (-0.23%) ⬇️
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
...FailedTestsTable/BranchSelector/BranchSelector.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <ø> (ø)
src/pages/RepoPage/RepoPageTabs.tsx 100.00% <100.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes

Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <100.00%> (+<0.01%) ⬆️
Services 99.41% <100.00%> (-0.04%) ⬇️
Shared 99.50% <ø> (ø)
UI 94.67% <ø> (ø)

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 25d3193...05f0375. Read the comment docs.

@codecov-staging
Copy link

Bundle Report

Changes will increase total bundle size by 887 bytes ⬆️

Bundle name Size Change
gazebo-staging-array-push 6.0MB 887 bytes ⬆️

Copy link

codecov bot commented Sep 10, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-array-push 6.0MB 887 bytes ⬆️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Sep 10, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
ca261cc Tue, 10 Sep 2024 23:24:10 GMT Expired Expired
05f0375 Wed, 11 Sep 2024 17:16:42 GMT Cloud Enterprise

@nicholas-codecov nicholas-codecov self-requested a review September 11, 2024 11:12
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.

LGTM

@calvin-codecov calvin-codecov added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit 860eac5 Sep 11, 2024
61 of 62 checks passed
@calvin-codecov calvin-codecov deleted the cy/persist-selected-branch branch September 11, 2024 18:19
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.

Propagate Selected Branch to All Pages/Tabs within Repo view
3 participants