refactor: split oauth2 settings form#1034
Conversation
* refactor: split sso settings form Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> * refactor: remove unused code Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> fix: remove form stepper Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> * test: fix jest unit tests Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> * test: add FormSSOSettings component unit test Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> fix: consistent styles Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> --------- Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the admin settings UI by extracting the OAuth2 and OIDC/SSO configuration sections from AdminSettings.vue into dedicated components, and reorganizes Jest coverage accordingly. This aligns with the goal of reducing the size/complexity of AdminSettings.vue while keeping the multi-step admin setup behavior.
Changes:
- Split OAuth2 settings into a new
FormOAuthSettings.vuecomponent and corresponding Jest spec/snapshots. - Split OIDC/SSO settings into a new
FormSSOSettings.vuecomponent and corresponding Jest spec. - Simplify
AdminSettings.vueby removing the inline OAuth/SSO forms and the now-unusedsettingsFlowGenerator.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/AdminSettings.vue |
Removes inline OAuth/SSO blocks and renders new form components; adjusts completion logic/watchers. |
src/components/admin/FormOAuthSettings.vue |
New OAuth2 settings component (OpenProject + Nextcloud OAuth client handling). |
src/components/admin/FormSSOSettings.vue |
New SSO/OIDC settings component. |
src/components/admin/FormOpenProjectHost.vue |
Removes stepper-based gating (currentSetting) and always shows the server host form. |
src/components/admin/FormAuthMethod.vue |
Switches from currentSetting gating to formState.serverHost.complete. |
src/utils.js |
Removes settingsFlowGenerator; updates comments on form ordering. |
src/api/settings.js / src/api/endpoints.js |
Adds API helper + endpoint for creating a Nextcloud OAuth client. |
tests/jest/components/AdminSettings.spec.js |
Drops large in-component OAuth/SSO tests (moved to new component specs); updates remaining setup tests. |
tests/jest/components/admin/FormOAuthSettings.spec.js + snapshot |
Adds unit tests and snapshots for new OAuth settings component. |
tests/jest/components/admin/FormSSOSettings.spec.js |
Adds unit tests for new SSO settings component. |
tests/jest/components/admin/FormOpenProjectHost.spec.js |
Updates tests to match removal of currentSetting. |
tests/jest/components/admin/FormAuthMethod.spec.js + snapshot |
Updates tests and snapshots to use formState instead of currentSetting. |
tests/jest/components/__snapshots__/AdminSettings.spec.js.snap |
Removes snapshots for sections moved out of AdminSettings.vue. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
PHP Code CoverageCoverage after merging refactor/separate-oauth2-settings into release/2.11 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Description
Related Issue or Workpackage
Screenshots (if appropriate):
Types of changes
Checklist:
CHANGELOG.mdfile