refactor: split oauth2 settings form#1034
Draft
saw-jan wants to merge 8 commits into
Draft
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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue or Workpackage
Screenshots (if appropriate):
Types of changes
Checklist:
CHANGELOG.mdfile