feat(services): add general settings#2454
Conversation
|
Qovery can create a Preview Environment for this PR.
This comment has been generated from Qovery AI 🤖.
|
…nization object and remove deprecated general settings feature
…d update routing to use organization data
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## new-navigation #2454 +/- ##
==================================================
- Coverage 44.07% 43.89% -0.19%
==================================================
Files 1045 562 -483
Lines 20320 12572 -7748
Branches 5887 3624 -2263
==================================================
- Hits 8957 5519 -3438
+ Misses 9753 6128 -3625
+ Partials 1610 925 -685
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rmnbrd
left a comment
There was a problem hiding this comment.
In my opinion we should avoid prop drilling, especially while creating new components, it is a good opportunity to get rid of the ones that can be retrieved using hooks.
| @@ -1,353 +0,0 @@ | |||
| import { | |||
There was a problem hiding this comment.
This test file is gone, right?
There was a problem hiding this comment.
This is from the pages library that we are currently removing
...tionId/project/$projectId/environment/$environmentId/service/$serviceId/settings/general.tsx
Outdated
Show resolved
Hide resolved
...zationId/project/$projectId/environment/$environmentId/service/$serviceId/settings/route.tsx
Outdated
Show resolved
Hide resolved
libs/domains/service-helm/feature/src/lib/source-setting/source-setting.tsx
Show resolved
Hide resolved
...rvice-settings/feature/src/lib/service-danger-zone-settings/service-danger-zone-settings.tsx
Outdated
Show resolved
Hide resolved
| organization: Organization | ||
| } | ||
|
|
||
| export function ApplicationGeneralSettings({ service, organization }: ApplicationGeneralSettingsProps) { |
There was a problem hiding this comment.
Here too, could we get rid of these props?
There was a problem hiding this comment.
We could get rid of organization if you want to remove this prop. But for service, I think it's a good thing to keep it because I would like to return only the Application type. This way, the component knows only this type and not others, which avoids having to cast inside it
For organization, I don't have strong concerns, but in my mind it could avoid calling the hook inside the component and prevent potential circular dependencies. Let me know what you prefer!
…emoving unused parameters and utilizing useParams for organization data
… support and refactor component structure
Summary
I introduced a new library:
@qovery/domains/service-settings/feature:@qovery/domains/services/featurefocused on shared service logic/hooks/payload builders@pagesassociated to the general settings serviceRouting integration:
apps/console-v5/.../settings/route.tsx->ServiceSettingsLayoutapps/console-v5/.../settings/general.tsx->ServiceGeneralSettingsapps/console-v5/.../settings/danger-zone.tsx->ServiceDangerZoneSettingsLet me know wdyt!
Screenshots / Recordings
https://www.loom.com/share/2c4077f28e6645fcbc8263fc316b1ddc
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release