-
Notifications
You must be signed in to change notification settings - Fork 3k
[#70194] Primerize Admin Backlogs Settings #21528
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
base: dev
Are you sure you want to change the base?
Conversation
Makes `SelectPanel` easily usable via the Forms DSL. Based on upstream `ActionMenuInput` implementation.
d24f4ac to
6b55038
Compare
|
Caution The provided work package version does not match the core version Details:
Please make sure that:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the Backlogs Settings admin page from legacy form helpers to Primer components, introducing a new reusable SelectPanel form input component for the OpenProject Primer forms DSL.
Key changes:
- Introduces a new
SelectPanelform input component that wraps Primer's SelectPanel for use in OpenProject forms - Refactors the Backlogs settings page to use Primer form components with proper model validation
- Adds comprehensive test coverage including unit tests, form specs, and feature specs
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/lib/primer/open_project/forms/select_panel_spec.rb | Adds unit tests for the new SelectPanel component |
| spec/lib/primer/open_project/forms/dsl/input_methods_spec.rb | Adds test coverage for the select_panel input method |
| modules/backlogs/spec/forms/admin/settings/backlogs_settings_model_spec.rb | Tests the new BacklogsSettingsModel validation logic |
| modules/backlogs/spec/forms/admin/settings/backlogs_settings_form_spec.rb | Tests the BacklogsSettingsForm rendering |
| modules/backlogs/spec/features/admin/backlogs_settings_spec.rb | Feature tests for the Backlogs settings page functionality |
| modules/backlogs/spec/controllers/backlogs_settings_controller_spec.rb | Updates controller specs to use new validation approach |
| modules/backlogs/config/locales/en.yml | Adds translations for select panel labels and error messages |
| modules/backlogs/app/views/backlogs_settings/show.html.erb | Replaces legacy form with Primer form using new settings model |
| modules/backlogs/app/forms/admin/settings/backlogs_settings_model.rb | Introduces ActiveModel for settings with validation logic |
| modules/backlogs/app/forms/admin/settings/backlogs_settings_form.rb | Implements Primer form using select_panel inputs |
| modules/backlogs/app/controllers/backlogs_settings_controller.rb | Refactors to use model validation instead of custom validation |
| lib/primer/open_project/forms/select_panel.rb | New component wrapping Primer's SelectPanel |
| lib/primer/open_project/forms/select_panel.html.erb | Template for SelectPanel component |
| lib/primer/open_project/forms/dsl/select_panel_input.rb | Input class for SelectPanel in the forms DSL |
| lib/primer/open_project/forms/dsl/input_methods.rb | Adds select_panel method to forms DSL |
| frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts | Stimulus controller for mutual exclusion between story/task type selections |
| config/locales/en.yml | Updates type attribute translation to support pluralization |
frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts
Show resolved
Hide resolved
frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts
Show resolved
Hide resolved
frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts
Show resolved
Hide resolved
frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts
Show resolved
Hide resolved
frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts
Show resolved
Hide resolved
frontend/src/stimulus/controllers/dynamic/admin/backlogs-settings.controller.ts
Show resolved
Hide resolved
49bbc05 to
8ea3014
Compare
HDinger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
As discussed, I'd like to get a review from product people as well before we merge this.
|
As discussed yesterday, there are two issues worth fixing:
|
Ticket
https://community.openproject.org/work_packages/70194
What are you trying to accomplish?
Primerizes Administration > Backlogs page
Screenshots
What approach did you choose and why?
Merge checklist