Skip to content

Update with branch param instead of search - #3147

Merged
calvin-codecov merged 4 commits into
mainfrom
cy/fix-params
Sep 10, 2024
Merged

calvin-codecov merged 4 commits into
mainfrom
cy/fix-params

Conversation

@calvin-codecov

@calvin-codecov calvin-codecov commented Aug 27, 2024 •

Copy link
Copy Markdown
Contributor

Description

Closes codecov/engineering-team#2187. Investigation plan linked in ticket

General schema:

  • base path like /commits and /components will direct to default branch (staying at /commits & /components)
  • for /commits, if default branch has no commits, it will swap to showing All branches (without url change); this keeps existing functionality (feat: Default to All branches when default branch has no commits - Round 2 #2449)
  • switching to another branch through the selector will append to the bath /{encodedBranchname)
  • if you initially land at /commits/{encodedBranchname), it will start off the experience with that branchname selected and showing

Code Example

Notable Changes

Screenshots

Screenshot 2024-08-28 at 9 40 48 AM Screenshot 2024-08-28 at 9 41 07 AM Screenshot 2024-08-28 at 9 40 59 AM Screenshot 2024-08-28 at 9 41 17 AM Screenshot 2024-08-28 at 9 41 27 AM Screenshot 2024-08-28 at 9 41 36 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-staging

codecov-staging Bot commented Aug 27, 2024 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 352 bytes ⬆️

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

@codecov-staging

codecov-staging Bot commented Aug 27, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files Patch % Lines
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 93.75% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3147      +/-   ##
==========================================
- Coverage   98.24%   98.14%   -0.11%     
==========================================
  Files         935      935              
  Lines       14491    14498       +7     
  Branches     3954     3956       +2     
==========================================
- Hits        14237    14229       -8     
- Misses        249      264      +15     
  Partials        5        5              
Files Coverage Δ
.../RepoPage/CommitsTab/CommitsTable/CommitsTable.tsx 100.00% <ø> (ø)
...poPage/CoverageTab/ComponentsTab/ComponentsTab.tsx 100.00% <100.00%> (ø)
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.77% <100.00%> (+0.22%) ⬆️
...te/ComponentsTable/hooks/useRepoComponentsTable.ts 96.66% <100.00%> (ø)
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 98.83% <100.00%> (+0.01%) ⬆️
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.75% <93.75%> (-31.25%) ⬇️
Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <96.55%> (-0.20%) ⬇️
Services 99.44% <100.00%> (+<0.01%) ⬆️
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 6b9e281...7a5bea7. Read the comment docs.

@codecov

codecov Bot commented Aug 27, 2024 •

Copy link
Copy Markdown

Bundle Report

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

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

@codecov-public-qa

codecov-public-qa Bot commented Aug 27, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.14%. Comparing base (6b9e281) to head (7a5bea7).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3147      +/-   ##
==========================================
- Coverage   98.24%   98.14%   -0.11%     
==========================================
  Files         935      935              
  Lines       14491    14498       +7     
  Branches     3871     3929      +58     
==========================================
- Hits        14237    14229       -8     
- Misses        249      264      +15     
  Partials        5        5              
Files Coverage Δ
.../RepoPage/CommitsTab/CommitsTable/CommitsTable.tsx 100.00% <ø> (ø)
...poPage/CoverageTab/ComponentsTab/ComponentsTab.tsx 100.00% <100.00%> (ø)
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.77% <100.00%> (+0.22%) ⬆️
...te/ComponentsTable/hooks/useRepoComponentsTable.ts 96.66% <100.00%> (ø)
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 98.83% <100.00%> (+0.01%) ⬆️
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.75% <93.75%> (-31.25%) ⬇️
Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <96.55%> (-0.20%) ⬇️
Services 99.44% <100.00%> (+<0.01%) ⬆️
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 6b9e281...7a5bea7. Read the comment docs.

@codecov-releaser

codecov-releaser commented Aug 27, 2024 •

Copy link
Copy Markdown
Collaborator

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
27d5a44 Tue, 27 Aug 2024 08:35:05 GMT Expired Expired
dad8a7f Wed, 28 Aug 2024 15:44:15 GMT Expired Expired
5e7faeb Wed, 28 Aug 2024 16:12:06 GMT Expired Expired
5e7faeb Wed, 28 Aug 2024 16:15:45 GMT Expired Expired
e85d82e Thu, 29 Aug 2024 07:42:34 GMT Expired Expired
6080855 Thu, 29 Aug 2024 22:24:42 GMT Expired Expired
309bc33 Thu, 29 Aug 2024 23:05:15 GMT Expired Expired
e9ddba4 Thu, 05 Sep 2024 00:41:34 GMT Expired Expired
da36d47 Fri, 06 Sep 2024 18:52:25 GMT Expired Expired
883921d Fri, 06 Sep 2024 19:54:14 GMT Expired Expired
76bce52 Tue, 10 Sep 2024 18:02:29 GMT Expired Expired
7a5bea7 Tue, 10 Sep 2024 20:59:17 GMT Cloud Enterprise

@codecov-qa

codecov-qa Bot commented Aug 27, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.14%. Comparing base (6b9e281) to head (7a5bea7).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 93.75% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3147      +/-   ##
==========================================
- Coverage   98.24%   98.14%   -0.11%     
==========================================
  Files         935      935              
  Lines       14491    14498       +7     
  Branches     3954     3873      -81     
==========================================
- Hits        14237    14229       -8     
- Misses        249      264      +15     
  Partials        5        5              
Files with missing lines Coverage Δ
.../RepoPage/CommitsTab/CommitsTable/CommitsTable.tsx 100.00% <ø> (ø)
...poPage/CoverageTab/ComponentsTab/ComponentsTab.tsx 100.00% <100.00%> (ø)
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.77% <100.00%> (+0.22%) ⬆️
...te/ComponentsTable/hooks/useRepoComponentsTable.ts 96.66% <100.00%> (ø)
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 98.83% <100.00%> (+0.01%) ⬆️
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.75% <93.75%> (-31.25%) ⬇️
Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <96.55%> (-0.20%) ⬇️
Services 99.44% <100.00%> (+<0.01%) ⬆️
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 6b9e281...7a5bea7. Read the comment docs.

@codecov

codecov Bot commented Aug 28, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.14%. Comparing base (6b9e281) to head (7a5bea7).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 93.75% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##               main      #3147        +/-   ##
================================================
- Coverage   98.24000   98.14000   -0.10000     
================================================
  Files           935        935                
  Lines         14491      14498         +7     
  Branches       3871       3873         +2     
================================================
- Hits          14237      14229         -8     
- Misses          249        264        +15     
  Partials          5          5                
Files with missing lines Coverage Δ
.../RepoPage/CommitsTab/CommitsTable/CommitsTable.tsx 100.00% <ø> (ø)
...poPage/CoverageTab/ComponentsTab/ComponentsTab.tsx 100.00% <100.00%> (ø)
...onentsTab/Header/BranchSelector/BranchSelector.tsx 96.77% <100.00%> (+0.22%) ⬆️
...te/ComponentsTable/hooks/useRepoComponentsTable.ts 96.66% <100.00%> (ø)
src/pages/RepoPage/CoverageTab/CoverageTab.tsx 100.00% <ø> (ø)
...ages/RepoPage/CoverageTab/CoverageTabNavigator.tsx 100.00% <100.00%> (ø)
src/pages/RepoPage/RepoPage.tsx 100.00% <100.00%> (ø)
src/services/navigation/useNavLinks/useNavLinks.js 98.83% <100.00%> (+0.01%) ⬆️
src/pages/RepoPage/CommitsTab/CommitsTab.jsx 68.75% <93.75%> (-31.25%) ⬇️
Components Coverage Δ
Assets 53.48% <ø> (ø)
Layouts 98.87% <ø> (ø)
Pages 98.84% <96.55%> (-0.20%) ⬇️
Services 99.44% <100.00%> (+<0.01%) ⬆️
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 6b9e281...7a5bea7. Read the comment docs.

@suejung-sentry suejung-sentry left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice, approved!

) => {
if (branch) {
return `/${provider}/${owner}/${repo}/components?branch=${branch}`
return `/${provider}/${owner}/${repo}/components/${branch}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What do you think about doing like /${provider}/${owner}/${repo}/components/${encodeURIComponent(branch)} so that we don't have to remember to call encode at all usages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this makes sense! I'll add this change

@calvin-codecov
calvin-codecov force-pushed the cy/fix-params branch 3 times, most recently from 309bc33 to e9ddba4 Compare September 5, 2024 00:36
@calvin-codecov
calvin-codecov added this pull request to the merge queue Sep 10, 2024
Merged via the queue into main with commit 2086819 Sep 10, 2024
@calvin-codecov
calvin-codecov deleted the cy/fix-params branch September 10, 2024 21:05
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.

Convert Query String Managed Branch Selection to URL Parameters

3 participants