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: Only show auto-activate toggle for admins when on enterprise cloud plan #3690

Merged

Conversation

spalmurray-codecov
Copy link
Contributor

@spalmurray-codecov spalmurray-codecov commented Jan 29, 2025

Title. Adds another data fetch hook call, but I think this is guaranteed to be a local cache hit as this same hook is used in a parent component.

Closes codecov/engineering-team#3201

@spalmurray-codecov spalmurray-codecov force-pushed the spalmurray/hide-auto-activate-enterprise-non-admins branch from f40451e to 43db784 Compare January 29, 2025 18:40
@codecov-staging
Copy link

codecov-staging bot commented Jan 29, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.22MB 93 bytes (0.0%) ⬆️
gazebo-staging-esm 6.27MB 130 bytes (0.0%) ⬆️

Copy link

codecov-public-qa bot commented Jan 29, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4174 1 4173 0
View the top 1 failed tests by shortest run time
src/pages/MembersPage/MembersActivation/MembersActivation.test.jsx > and they are an admin
Stack Traces | 0s run time
Error: [Vitest] Unexpected .only modifier. Remove it or pass --allowOnly argument to bypass this error

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (173686a) to head (8c2e3df).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3690   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         824      824           
  Lines       14811    14814    +3     
  Branches     4199     4208    +9     
=======================================
+ Hits        14632    14635    +3     
  Misses        170      170           
  Partials        9        9           
Files with missing lines Coverage Δ
...embersPage/MembersActivation/MembersActivation.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.41% <100.00%> (+<0.01%) ⬆️
Services 99.27% <ø> (ø)
Shared 99.36% <ø> (ø)
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 173686a...8c2e3df. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3690   +/-   ##
=======================================
  Coverage   98.79%   98.79%           
=======================================
  Files         824      824           
  Lines       14811    14814    +3     
  Branches     4199     4208    +9     
=======================================
+ Hits        14632    14635    +3     
  Misses        170      170           
  Partials        9        9           
Files with missing lines Coverage Δ
...embersPage/MembersActivation/MembersActivation.jsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.41% <100.00%> (+<0.01%) ⬆️
Services 99.27% <ø> (ø)
Shared 99.36% <ø> (ø)
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 173686a...8c2e3df. Read the comment docs.

@spalmurray-codecov spalmurray-codecov marked this pull request as ready for review January 29, 2025 18:48
Comment on lines 23 to 27
const showAutoActivate =
!isUndefined(planAutoActivate) &&
!planData?.plan?.isTrialPlan &&
planData?.plan?.trialStatus !== TrialStatuses.ONGOING
planData?.plan?.trialStatus !== TrialStatuses.ONGOING &&
!(planData?.plan?.isEnterprisePlan && !ownerData.isAdmin) // only show for admins on enterprise cloud plans
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a monster of a conditional 😭

@codecov-releaser
Copy link
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
8c2e3df Wed, 29 Jan 2025 19:26:00 GMT Cloud Enterprise

@spalmurray-codecov spalmurray-codecov added this pull request to the merge queue Jan 29, 2025
Merged via the queue into main with commit 5c7ed2b Jan 29, 2025
54 checks passed
@spalmurray-codecov spalmurray-codecov deleted the spalmurray/hide-auto-activate-enterprise-non-admins branch January 29, 2025 19:36
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.

[Gazebo] Hide Auto-activate members toggle for non-admins on enterprise cloud
3 participants