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: Update NotFoundError to have login button #3804

Merged

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR updates the NetworkErrorBoundary component when a 404 error occurs to conditionally render a Login button with a redirect to the current page if the user is currently not logged in

Closes: codecov/engineering-team#3453

Notable Changes

  • Add login button to NetworkErrorBoundary
  • Update copy for when 404's occur, and DocErrorMessage to conditionally render capital letters
  • Update tests

Screenshots

Screenshot 2025-03-11 at 11 34 49

@nicholas-codecov nicholas-codecov changed the title feat: Update not found error to have login button feat: Update NotFoundError to have login button Mar 11, 2025
@codecov-staging
Copy link

codecov-staging bot commented Mar 11, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.11MB 689 bytes (0.01%) ⬆️
gazebo-staging-esm 6.19MB 690 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 663 bytes 639.87kB 0.1%
assets/index.*.css 27 bytes 101.43kB 0.03%

Files in assets/index.*.js:

  • ./src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx → Total Size: 7.85kB
view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 689 bytes 718.97kB 0.1%

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

  • ./src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx → Total Size: 7.87kB

Copy link

codecov bot commented Mar 11, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 6.11MB 689 bytes (0.01%) ⬆️
gazebo-production-esm 6.19MB 690 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 663 bytes 639.87kB 0.1%
assets/index.*.css 27 bytes 101.43kB 0.03%

Files in assets/index.*.js:

  • ./src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx → Total Size: 7.85kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 689 bytes 718.97kB 0.1%

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

  • ./src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx → Total Size: 7.87kB

Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.73%. Comparing base (9699c04) to head (008a93c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3804   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files         826      826           
  Lines       14981    14994   +13     
  Branches     4270     4277    +7     
=======================================
+ Hits        14792    14805   +13     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+0.01%) ⬆️
Pages 98.30% <ø> (ø)
Services 99.38% <ø> (ø)
Shared 99.12% <ø> (ø)
UI 99.08% <ø> (ø)

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 9699c04...008a93c. Read the comment docs.

@codecov-notifications
Copy link

codecov-notifications bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3804   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files         826      826           
  Lines       14981    14994   +13     
  Branches     4270     4277    +7     
=======================================
+ Hits        14792    14805   +13     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+0.01%) ⬆️
Pages 98.30% <ø> (ø)
Services 99.38% <ø> (ø)
Shared 99.12% <ø> (ø)
UI 99.08% <ø> (ø)

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 9699c04...008a93c. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

codecov-public-qa bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.73%. Comparing base (9699c04) to head (008a93c).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3804   +/-   ##
=======================================
  Coverage   98.73%   98.73%           
=======================================
  Files         826      826           
  Lines       14981    14994   +13     
  Branches     4270     4285   +15     
=======================================
+ Hits        14792    14805   +13     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...ared/NetworkErrorBoundary/NetworkErrorBoundary.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <100.00%> (+0.01%) ⬆️
Pages 98.30% <ø> (ø)
Services 99.38% <ø> (ø)
Shared 99.12% <ø> (ø)
UI 99.08% <ø> (ø)

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 9699c04...008a93c. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Mar 11, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
337080c Tue, 11 Mar 2025 14:54:13 GMT Expired Expired
337080c Tue, 11 Mar 2025 14:54:17 GMT Expired Expired
008a93c Tue, 11 Mar 2025 16:09:36 GMT Cloud Enterprise

Comment on lines +117 to +119
DocErrorMessage.propTypes = {
capitalize: PropTypes.bool,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🤢

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Mar 11, 2025
Merged via the queue into main with commit b914c70 Mar 11, 2025
54 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-3453-update-not-found-error-to-have-login-button branch March 11, 2025 16:21
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.

[UI] Update NetworkErrorBoundary 404 to include login button
3 participants