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.
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
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.
- admin setting forms can use as base component
`AdminSettingsFormComponent` and will benefit from the general
approved form container for admin setting pages
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
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.
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.