openproject icon indicating copy to clipboard operation
openproject copied to clipboard

[#68462] Migrate ReportingWidgets to ViewComponent

Open myabc opened this issue 5 months ago • 0 comments

⚠️ ~~This PR is based off #20562. Please review/merge that first.~~

Ticket

https://community.openproject.org/wp/68462

What are you trying to accomplish?

  • Replaces custom widget implementation with standard ViewComponents.
  • Begins Primerization / style refresh:
    • cost type radios
    • buttons
    • dialogs
  • Begins migration of jQuery-implemented behavior to Turbo.

Screenshots

Screenshot 2025-10-20 at 15 29 39 Screenshot 2025-10-20 at 15 29 06

What approach did you choose and why?

Merge checklist

  • [x] Added/updated tests
  • [ ] Added/updated documentation in Lookbook (patterns, previews, etc)
  • [ ] Tested major browsers (Chrome, Firefox, Edge, ...)

myabc avatar Oct 15 '25 19:10 myabc

2 Warnings
:warning: Attention developer & reviewer: Files with potential user references found:
  • db/migrate/tables/remote_identities.rb (migration with user reference)
  • modules/costs/db/migrate/tables/time_entries.rb (migration with user reference)
  • modules/costs/db/migrate/tables/time_entry_journals.rb (migration with user reference)
  • modules/meeting/db/migrate/tables/recurring_meetings.rb (migration with user reference)

Please make sure:

  1. You've added proper relationships (has_many, belongs_to, …) and their inverse in your models
  2. You deal with model destruction dependencies: dependent: :destroy or dependent: :delete_all
  3. You add behavior and tests for the Principal::DeleteJob (app/workers/principals/delete_job.rb)
  4. You replace references to users with deleted user in Principal::ReplaceReferencesService (app/services/principals/replace_references_service.rb) by adding to the replacements initailizer (config/initializers/replace_references_service.rb) for the core, or using the replace_principal_references helper in modules/plugins.
  5. You test the above behaviors with an integration test (e.g., like this one to confirm deletion of users is possible.

This helps prevent dangling database objects when users are deleted and resulting bugs.

:warning: This PR has migration-related changes on a release branch. Ping @opf/operations

Generated by :no_entry_sign: Danger

github-actions[bot] avatar Nov 24 '25 17:11 github-actions[bot]