178 Commits

Author SHA1 Message Date
Kabiru Mwenja fd22629702 Code Maintenance/STC-462: Tidy the activity-tab paginator and centralise filter modes (#23552)
https://community.openproject.org/wp/STC-462

Two readability passes over the work package activity tab, no behaviour change. The paginator's private methods are reordered to follow their call order so the file reads top-down from `#call`, and the three activity filter modes (`:all`, `:only_comments`, `:only_changes`) — until now bare symbols duplicated across the controller, paginator, journal components and the hidden form — move into a single `WorkPackages::ActivitiesTab::Filters` module so the modes have one source of truth and can't drift apart. The diff reaches beyond the paginator into the controller, several components and a form, since that's where the symbols were scattered.
2026-06-05 16:50:08 +03:00
Kabiru Mwenja 8da4818eed Do not persist the internal state when the editor is closed
Use a control argument `{persist:boolean}`
2025-09-24 12:52:59 +03:00
Bruno Pagno 511ffe9434 use manually set storage key for storing editor revisions 2025-08-19 13:11:38 +02:00
Alexander Brandon Coles 66dd73c263 Fix copyright notice in app/forms 2025-07-30 17:21:50 +01:00
Alexander Brandon Coles 057f17b92c Freeze string literals in app/forms
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/forms
2025-07-30 17:21:50 +01:00
Eric Schubert e36d115295 [#65242] moved most of the wp types related files to new namespace
- https://community.openproject.org/work_packages/65242
- moved a lot of classes under ::Types or ::WorkPackages::Types to
  ::WorkPackageTypes namespace
2025-06-30 13:31:39 +02:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Eric Schubert a7e0dd3574 [#64615] add params validation for work package type updates
- https://community.openproject.org/work_packages/64615
- added validation of copy_workflow_from param
- added validation of project_ids param
- restructured set_attributes to run multiple pre-contract validations
2025-06-19 15:51:18 +02:00
Kabiru Mwenja 587f9ee6bf Replace custom activities tab onSubmit action with default turbo:submit
Reduce complexity by relying on `TurboDrive.navigator.submitForm(formElement, submitter)` action.

https://community.openproject.org/wp/63556
2025-06-18 14:50:28 +03:00
Kabiru Mwenja 86eb9eacef Use visually_hide_label option instead
Stay consistent with primer as pointed out in the following review!
https://github.com/opf/openproject/pull/18903#pullrequestreview-2833035563
2025-05-13 14:40:06 +03:00
Kabiru Mwenja f58a7a6714 Missing Form Label in work package comments rich text editor raises browser console error
https://community.openproject.org/work_packages/63898

Amend the text area label requirement introduced in 6bf31400ed to allow for an alternate
ARIA-label as not all use cases fit this requirement- but there should always be a reference for screenreaders.
`aria-labelled-by` OR `aria-label`

As CKEditor re-renders the text area aria-label in every focus/blur event, we rely on the focusTracker to keep the aria-label
updated
2025-05-13 14:32:13 +03:00
Jan Sandbrink 44bdb430ff Add link to documentation for supported attributes
This allows the user to directly see which attributes we
support for subject patterns.
2025-05-05 08:33:10 +02:00
Kabiru Mwenja 98b65c73f0 Implementation/63625 Rename restricted visibility checkbox to internal comment (#18726)
https://community.openproject.org/work_packages/62785
2025-04-24 18:52:00 +03:00
Bruno Pagno 97ccf0bfc5 adjust internal comments internal representation 2025-04-24 13:12:32 +02:00
Kabiru Mwenja 60855ba8b8 Embed workpackage in activity for mentions capability
See: https://github.com/opf/commonmark-ckeditor-build/pull/102

Co-authored-by: Bruno Pagno <b.pagno@openproject.com>
2025-04-14 15:14:32 +03:00
Kabiru Mwenja 00c7d1537a Make journals attachable in a basic form 2025-04-04 18:41:12 +03:00
Kabiru Mwenja 5c7a9434d8 Define @mention criterion for restricted comments- blueprint
https://community.openproject.org/wp/60988
2025-03-22 11:58:56 +03:00
Bruno Pagno be9afb37b8 Merge remote-tracking branch 'origin/dev' into implementation/60980-introduce-work-package-restricted-comments-as-part-of-journal-notes 2025-03-20 18:03:18 +01:00
Jan Sandbrink 112ae02926 Update Ruby copyright headers using rake task
This effectively removes the year from a bunch of copyright headers.
We stopped indicating a specific year at some point, but
didn't propagate this change to every file yet.
2025-03-18 14:23:54 +01:00
Kabiru Mwenja 8e9398b6a7 Merge branch 'dev' into implementation/60980-introduce-work-package-restricted-comments-as-part-of-journal-notes 2025-03-18 11:25:44 +03:00
Kabiru Mwenja cf74eb3d6f Add specs for cancel action + several fixes 2025-03-13 22:15:16 +03:00
Kabiru Mwenja 81002ac019 Attempt to align learn more link
Use padding for now- see if there's a better way
2025-03-13 21:47:10 +03:00
Kabiru Mwenja 85fac25271 [#62139] Implement redesign of "restricted visibility" checkbox placement in desktop and mobile
https://community.openproject.org/work_packages/62139
2025-03-13 20:57:42 +03:00
Eric Schubert dd47dfe13f [chore] added 680px as base value for admin settings form width 2025-03-13 13:38:15 +01:00
Eric Schubert 4a33a167a0 [chore] add container for admin settings form
- admin setting forms can use as base component
  `AdminSettingsFormComponent` and will benefit from the general
  approved form container for admin setting pages
2025-03-12 13:22:39 +01:00
Kabiru Mwenja e4270942f9 Ensure background color is reset on form submit end 2025-03-12 13:56:38 +03:00
Kabiru Mwenja 631104bb17 Revert "Revert "Use simpler default caption interface""
This reverts commit fd39fb7279987f308f44e5b203a6b2e0fcba4417.
2025-03-12 13:56:38 +03:00
Kabiru Mwenja 483aac68a9 Revert "Use simpler default caption interface"
This reverts commit be52e1f5bde99aee39df6ecede9f8b46258219f1.
2025-03-12 13:56:37 +03:00
Kabiru Mwenja a89f4370b4 Use domain names for stimulus action and target 2025-03-12 13:56:36 +03:00
Kabiru Mwenja 0b5277dfb4 Use simpler default caption interface
1.) Use primer default (form) layout
2.) Better for a11ly as there's no dissapearing and reappearing text
3.) Consistent on mobile layouts as no wrapping is done on smaller widths
2025-03-12 13:56:35 +03:00
Kabiru Mwenja 30c0351d56 Draft out restricted comment box 2025-03-12 13:56:34 +03:00
Henriette Darge 55ab827f84 Merge branch 'dev' into feature/47519-single-date-mode-for-work-package-date-pickers 2025-03-04 14:06:32 +01:00
Henriette Darge 0027d7f0eb Extract the event listeners into stimulus action calls 2025-03-04 13:41:20 +01:00
Christophe Bliard 11216aca21 Merge pull request #17235 from opf/feature/42388-new-automatic-scheduling-mode
[59539] Add automatic scheduling mode
2025-02-28 13:23:01 +01:00
Eric Schubert debe00de24 Merge pull request #18042 from opf/bug/61165-pattern-input-style-issues
[#61165] fixed separator spacing in pattern input
2025-02-27 12:06:49 +01:00
Henriette Darge a7af3736cb Let progress/preview controller inherit from the generic workpackage/dialog/preview controller again while keeping the special behaviour of focus/blur events. 2025-02-26 08:36:15 +01:00
Henriette Darge 58cb72e370 First draft of a single date mode in datepicker. Therefore, the form was manually build to add buttons into it 2025-02-26 08:36:07 +01:00
Oliver Günther e27db03fb0 Ensure existing keys have translations 2025-02-25 10:47:21 +01:00
Christophe Bliard 123626ae11 Handle dates swapping when editing dates fields directly
This logic was in the date picker component, meaning it was triggered
when picking another date, but not when editing dates in the input
fields directly.

This commit moves the logic to the preview controller, and removes
almost all responsibilities from the date picker component:

- It sends `date-picker:flatpickr-dates-changed` events to the
  controller when new dates are picked
- It receives `date-picker:flatpickr-set-values events from the
  controller to update its dates, mode, and display of non-working days.
  When the update is done, it does it without reinitializing itself.

Some logic still remains in the date picker component for its
initialization which is based on its HTML attributes.

The controller also changed how it gets the dates values after a turbo
morphing: the values are read from HTML inputs once the morph rendering
is finished.

There are also 2 different debounce for the preview: one of 200ms when
the user is typing in the input fields, and one of 0ms when the user is
clicking on a date in the calendar. In that case the debounce is not
needed as the date is set immediately.
2025-02-25 09:18:22 +01:00
Christophe Bliard d194ce1650 Restore progress preview controller as it was before
The date picker preview controller and the progress preview controller
were abstracted into a super class. It's too hard to make deep
modifications to the date picker preview controller while keeping the
compatibility with the progress preview controller.

For instance, we break the progress values being formatted on blur
without noticing. This commit adds a test just for this.

This commit undoes some changes made in 5429b8b (commit title is
"Extract logic of the progress modal to be reused for the datepicker
modal").

Once the date picker progress controller works as expected, we'll see
which part can be reused and extracted into an abstraction.
2025-02-25 09:18:22 +01:00
Henriette Darge f15e12f4a0 Add icon to remove start or due date 2025-02-25 09:18:20 +01:00
Henriette Darge 810a9832b1 Only change the focus when the triggered field was the combinedField. Otherwise we respect the users choice 2025-02-25 09:18:13 +01:00
Henriette Darge c1d01f1dfb Switch the focused date field if one of the values is empty 2025-02-25 09:18:13 +01:00
Henriette Darge ce9dfa8b99 Add trailing unit for duration field 2025-02-25 09:18:12 +01:00
Henriette Darge 3fe3f11737 Take care that creation of Milestones is working correctly 2025-02-25 09:18:11 +01:00
Christophe Bliard da85fa5c1d Fix rubocop complains 2025-02-25 09:18:09 +01:00
Christophe Bliard 436bf49fd8 Do not display 'Today' link for duration 2025-02-25 09:18:09 +01:00
Henriette Darge cde983d5e3 Disable duration and NonWorkingDays as specified 2025-02-25 09:18:08 +01:00
Henriette Darge e71770fede Define the currently active field correctly and respect that when selecting a date from the datepicker 2025-02-25 09:18:07 +01:00
Henriette Darge 89680d5491 Set the test_selector correctly 2025-02-25 09:18:07 +01:00