57 Commits

Author SHA1 Message Date
Dombi Attila b93cec29e4 [#75241] No "Undisclosed" mention for the parent work package on the wp card for a user without permissions to see the parent
https://community.openproject.org/wp/75241
2026-05-28 19:19:31 +03:00
Alexander Brandon Coles c1bb691d2b [#72945] Teach Border Box List title_arguments
Allows headers to receive title arguments so callers can pass system
arguments (including semantic attributes) to rendered headings.

https://community.openproject.org/wp/72945
2026-05-21 10:40:12 +02:00
Alexander Brandon Coles b481660d2f [#72945] Update BorderBoxList description slot
Wraps header descriptions in Primer text so callers can pass system
arguments for layout while keeping muted text as the default.

https://community.openproject.org/wp/72945
2026-05-21 10:39:35 +02:00
Alexander Brandon Coles d58b631b66 Merge branch 'dev' into feature/72945-backlogs-container-header-restyling 2026-05-20 13:13:53 +02:00
Dombi Attila f99dc882b0 [#74555] Rename and consolidate Backlogs row-menu components
https://community.openproject.org/wp/74555

- Use work_package variable name instead of story in Backlogs::WorkPackagesController
- Remove baclog_bucket flag from work packages controller spec
2026-05-20 00:11:59 +03:00
Alexander Brandon Coles 5db6e2b591 [#72945] Add configurable header padding
Allow BorderBoxList headers to override their vertical padding while
keeping row padding inherited from the underlying BorderBox.

Use spacious header padding for Backlogs lists that keep condensed rows,
and expose the option in Lookbook previews for review.

https://community.openproject.org/wp/72945
2026-05-19 14:41:49 +02:00
Alexander Brandon Coles 675ae511bf [#72945] Rework BorderBoxList header layout
Move non-collapsible header descriptions into a second grid row so the
actions and menus stay aligned with the heading line.

https://community.openproject.org/wp/72945
2026-05-19 14:41:49 +02:00
Alexander Brandon Coles 078cbb78e1 Show description: in Border Box List previews 2026-05-19 14:41:49 +02:00
Alexander Brandon Coles e372dc089b [#72945] Add BorderBoxList transparent scheme
Adds `scheme: :transparent` to BorderBoxListComponent with CSS overrides
for transparent header background and no separator line. Backlogs
callers adopt the transparent scheme.

https://community.openproject.org/wp/72945
2026-05-19 14:41:48 +02:00
Alexander Brandon Coles be4ef3360d Add BorderBoxList collapsible header option
Render plain BorderBoxList headers by default while keeping the
CollapsibleHeader toggle available behind an explicit option. Align the
plain header branch with CollapsibleHeader markup so later Backlogs
header restyling can reuse the same structure.
2026-05-16 22:03:04 +02:00
Alexander Brandon Coles 0fee00318a Filter reserved BorderBoxList ids
Drop caller-provided list/header/footer wiring ids before assigning the
internally derived ids used for BorderBox and collapsible header wiring.
2026-05-16 21:30:28 +02:00
Alexander Brandon Coles 4fb691df59 Make list announcements opt-in
Add interactive mode for dynamic BorderBox lists and enable it for
Backlogs lists. Generic lists stay quiet by default while Backlogs
updates remain announced.
2026-05-16 21:30:28 +02:00
Alexander Brandon Coles 08f3fec6d0 [#74684] Default counter aria in Header
Adds a `count_label:` keyword to `Header` that defaults to
`I18n.t(:label_x_items, count:)` and always sets `aria-live:
polite` on the counter badge. Callers no longer need to wire
up aria attributes manually. Uses `merge_aria` so additional
caller-provided aria attributes are preserved.

https://community.openproject.org/wp/74684
2026-05-14 16:47:52 +02:00
Alexander Brandon Coles 8f2cdab609 [#74684] Extract BorderBoxListComponent
Introduces a shared BorderBox-backed list component and moves the
Backlogs-specific work package card list into the Backlogs module.

Wires Backlogs callers to the new component API, keeps specialized
card rendering behind an item factory hook, and replaces old OpPrimer
work-package card list coverage with focused component specs.

https://community.openproject.org/wp/74684
2026-05-14 16:06:00 +02:00
Alexander Brandon Coles 7ef28be11b [#74779] Rename WorkPackageCardListComponent
https://community.openproject.org/wp/74779
2026-05-10 19:20:02 +02:00
Alexander Brandon Coles d8b3885d85 Merge branch 'dev' into merge-release/17.4-20260508131130 2026-05-08 15:26:29 +02:00
Alexander Brandon Coles 617dbd1554 [#73968] Move show-more out of common box
The common card box now exposes a generic `item` slot via `with_item`
for manually composed rows. Automatic rendering still only builds
work package items from the `work_packages:` argument.

The Backlogs inbox now owns the truncate-middle show-more row, its
route, Turbo frame, and draggable marker.

https://community.openproject.org/wp/73968
2026-05-01 22:36:50 +02:00
Alexander Brandon Coles 6c1a72dda1 [#73968] Add card menu slot
Expose a top-level menu slot on the common work package card so card
and card-box callers can configure action menus in the same style. Keep
menu_src as a compatibility shortcut for existing deferred Backlogs
menus while allowing inline non-deferred menu items through the slot.

https://community.openproject.org/wp/73968
2026-05-01 21:41:24 +02:00
Alexander Brandon Coles b6d78999d6 [#73968] Extract Backlogs card box items
Move Backlogs-specific item/card concerns behind Backlogs components
while keeping the common card box API focused on generic item
rendering. The common item keeps generic draggability hooks, while
Backlogs owns story points, menu URLs, and story controller row data.

https://community.openproject.org/wp/73968
2026-05-01 21:27:12 +02:00
Alexander Brandon Coles 35d3fc8e8b [#73968] Move card metrics to Backlogs
Remove the story-points display from the shared work package card and
expose a generic metric slot instead. Backlogs now opts into that slot
with a small story-points component when rendering sprint, bucket, and
inbox cards.

https://community.openproject.org/wp/73968
2026-05-01 19:48:20 +02:00
Alexander Brandon Coles 60bb8e1ea9 [#73968] Add card box item bridge
Extracts the BorderBox row arguments into a row-bridge object
(`WorkPackageCardBoxComponent::Item`) so the box can build rows without
forcing the visual card to render row-level concerns. The visual
`WorkPackageCardComponent` constructor narrows to
`(work_package:, menu_src:)`; in-repo callers updated.

Adds a polymorphic slot API (`with_work_package_item`,
`with_empty_item`) modeled on `Primer::Alpha::FileTreeView`, plus a
public `#build_item` for off-box callers. Renames the URL pass-through
to a generic `params:` kwarg, leaving Backlogs all-state handling at the
call sites.

https://community.openproject.org/wp/73968
2026-05-01 19:11:09 +02:00
Alexander Brandon Coles f60146aa45 [#73968] Generalize card box container IDs
Treat card box containers as Rails dom_target sources so shared card
boxes can accept symbols, strings, model classes, and model instances
without Backlogs-specific ID branching.

Move Backlogs drag-and-drop target IDs into explicit caller-provided
configuration, keeping the existing controller protocol while omitting
generic DnD data for consumers that do not opt in.

https://community.openproject.org/wp/73968
2026-05-01 15:51:03 +02:00
Alexander Brandon Coles e51dcbb7b2 [#73968] Allow card menus without src
Treat the work package card menu source as optional so the shared
card component can render inline menus as well as deferred menus.
Honor caller-provided menu IDs and use the header reader when
deriving the default card box header menu ID.

https://community.openproject.org/wp/73968
2026-05-01 14:54:01 +02:00
Alexander Brandon Coles 0794eb4497 [#73968] Add card box truncate-middle pagination
Teaches `WorkPackageCardBoxComponent` an optional
`with_show_more(truncate_middle:, text:)` slot. When set, the box
truncates `work_packages` to the first `truncate_middle` rows plus
a derived tail (20% of first page, min 1) and emits a
`Box-row scheme: :neutral` between them advertising the omitted
middle. The slot is also the toggle — leaving it unset means no
truncation, preserving sprint and bucket behaviour.

Default copy is sourced from the new
`work_package_card_box_component.show_more` locale key with
`one`/`other` plurals; consumers can override via `text:` (with a
`%{count}` placeholder). Adds a Lookbook preview for the slot.

https://community.openproject.org/wp/73968
2026-04-30 16:47:08 +02:00
Alexander Brandon Coles 393bd42741 [#73968] Extract work package card primitives
Adds the shared `WorkPackageCardBoxComponent` (with nested `Header`)
and `WorkPackageCardComponent` (with nested `Menu`), so
`SprintComponent`, `BucketComponent`, and the inbox can converge on
a single Primer `BorderBox` + card-row rendering path.

The box derives its DOM id, list id, drop-target id, and per-card URLs
from a single `container:` argument (`Sprint`, `BacklogBucket`, or
`nil` for the inbox). It exposes `header`, `empty_state`, and
`footer` slots; the header exposes `description`, `actions` (typed
`:button` slot), and `menu`.

Adds component specs for all four classes plus Lookbook previews for
the two top-level primitives. Consumers are migrated in follow-up
commits.

https://community.openproject.org/wp/73968
2026-04-30 16:46:19 +02:00
Henriette Darge d9339747e9 Revert "Use CustomValue.formatted_value instead of formatting the values manually"
This reverts commit 2d92b5ddcf.
2026-03-20 09:05:30 +01:00
Henriette Darge 2d92b5ddcf Use CustomValue.formatted_value instead of formatting the values manually 2026-03-20 08:42:27 +01:00
Henriette Darge ee83264379 Continue the endless journey of adapting the tests to the new inplaceEditFields. 2026-03-18 14:03:52 +01:00
Henriette Darge f2410d0b43 Add comment fields to the displayFields in case a user w/o permissions opens the dialog to see the comment in readonly mode 2026-03-18 10:08:11 +01:00
Henriette Darge a445cc196c * Take care that newly created CF are also correctly registered
* Introduce spec helper for inplace edit fields
* Preserve system_arguments for calculated fields when they are updated
2026-03-17 15:13:21 +01:00
Henriette Darge 0f4f0d11ce Adapt tests to new inplaceEditFields 2026-03-13 14:19:50 +01:00
Henriette Darge 66dc6835e7 Add unit tests for new inplace edit fields 2026-03-13 12:57:14 +01:00
Alexander Brandon Coles 3c6dee61d2 Inject update_registry instance into component and controller
Passes an `UpdateRegistry` instance as a parameter to
`InplaceEditFieldComponent` and `InplaceEditFieldsController` instead of
referencing the global class directly. Updates both specs to inject a
dedicated `UpdateRegistry.new` instance rather than stubbing class-level
methods.
2026-03-05 07:13:50 -03:00
Henriette Darge 71592a79fc Remove eager loading option from the inplace edit fields. Now all fields are rendered the same way, making it easier to understand und use the code. 2026-01-29 14:37:14 +01:00
Henriette Darge c09af64fe1 Add first tests for new inplace edit fields 2026-01-29 14:37:12 +01:00
OpenProject Actions CI cbdde02105 Merge branch 'release/17.0' into dev 2026-01-26 14:33:05 +00:00
Alexander Brandon Coles 12a586d80f Make MainMenuToggleComponent set aria-expanded
For symmetry with navigation toggler (see 2185756ddae).

Also sets `aria-controls` when rendered outside `#main-menu` container.
2026-01-23 05:51:40 -03:00
Alexander Brandon Coles 5f22828fe5 Provide CheckAllComponent separator slot
Supports customization (or removal) of separator.
2026-01-14 14:17:31 -03:00
Alexander Brandon Coles 897205b379 Fix customization of CheckAllComponent buttons
Support content block rather than `text:` param, thereby fixing calling
button methods (e.g. `with_leading_visual_icon`). from slots.

Also support overriding `scheme:` param.
2026-01-14 13:47:29 -03:00
Alexander Brandon Coles 4cf187ae65 Make CheckAllComponent generate button ids
Generates stable IDs when used with outlets.
2025-12-15 11:08:02 -03:00
Alexander Brandon Coles c7a695abe8 Apply aria-controls on non-descendant buttons
Set the `aria-control` attribute server-side in `CheckAllComponent` and
client-side in `CheckAllController` (belt and braces approach).

Also introduces `attributeTokenList` helper function to ease working
with HTML attributes that accept a space-delimited list of tokens.
2025-12-10 22:51:58 -03:00
Alexander Brandon Coles 8e25e2f5ba [#69325] Rework "Check all" with Stimulus
Resolves an issue when used inside collapsible section headers: clicking
"Check all"/"Uncheck all" should not toggle the collapsible section.

**Behavior**

Introduces `CheckableController` and `CheckAllController`, replacing
`GlobalHelpers` functions and `link_to_function` calls.

**Rendering**

Provides `OpenProject::Common::CheckAllComponent` to render a standard
UI and take care of connecting appropriate Stimulus controller/outlets,
actions.
2025-12-10 22:08:19 -03:00
Henriette Darge 1a53b76a66 Allow required star to be shown for AttributeLabelComponent 2025-10-17 11:04:58 +02:00
Henriette Darge cc90002bef Take care that the main menu resizer toggles when the menu is collapsed/expanded
Clean-up sass code

Avoid that the type selector in the WP from is scrolled two far when being activated. Currently, it is scrolled twice (one time when activating it and once again when selecting an item). Thus the dropdown overlaps the actual input

Move logo to the left side

Make naming consistent for MainMenuToggleComponent and add a component test

Let menu toggle button scroll with the rest of the page

Move modules menu to the left and show it on mobile
2025-06-27 11:10:04 +02:00
Alexander Brandon Coles 055400ac8f Merge pull request #19091 from opf/code-maintenance/64475-replace-ng-opce-attribute-help-text-usages
[#64475] Replace ng `opce-attribute-help-text` component usages with Primer `AttributeHelpTextComponent`
2025-06-12 08:55:26 +01:00
Alexander Brandon Coles 988ef996a8 Merge pull request #19120 from opf/bug/64470-subproject-of-missing-attribute-help-text
[#64470] Missing help text for Subproject of field
2025-06-11 08:40:44 +01:00
Alexander Brandon Coles 259721f14d Define additional_label slot in AttributeHelpTextComponent
For feature parity with ng `opce-attribute-help-text`.
2025-06-09 19:10:01 +01:00
Alexander Brandon Coles 86a8136049 Make AttributeHelpTextComponent render QA data
Renders `data-qa-help-text-for` for interop with existing feature specs.
2025-06-09 18:21:38 +01:00
Alexander Brandon Coles 3f5dcafb46 [#64470] Fix missing help text for "Subproject of"
Fixes display of attribute help text for associations (e.g. `parent_id`).
2025-06-09 14:28:10 +01:00
Alexander Brandon Coles 6dec13b3ce Tighten up attribute help text tooltip wording 2025-06-09 11:10:56 +01:00