192 Commits

Author SHA1 Message Date
Alexander Brandon Coles 8cf44ef496 [OP-19459] Use Primer Counter in notifications menu
Switches from custom CSS implementation to `Primer::Beta::Counter` for
rendering counters in menu on Notifications page. Fixes clipping of
larger notification numbers (≥ 3 digits), including applying rounding
of very large numbers (e.g. `4k+`).

https://community.openproject.org/wp/OP-19459
2026-06-11 16:53:08 +01:00
Jens Ulferts bfd971bf3d Merge pull request #23443 from opf/bug/75241-no-undisclosed-mention-for-the-parent-work-package-on-the-wp-card-for-a-user-without-permissions-to-see-the-parent
[#75241] No "Undisclosed" mention for the parent work package on the wp card
2026-06-02 10:39:28 +02:00
Henriette Darge acfaf0fc5c Add truncation rules for WPCard component 2026-05-29 15:09:09 +02:00
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
Behrokh Satarnejad b59128a092 [68633] Asterisks on Project attributes displaced (#23280)
* Change dispaly of attribute label

* Align the help text

* Fix project attribute label icon alignment
2026-05-26 09:05:03 +02: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 cfb336787f Fix title truncation when collapsible: false 2026-05-20 10:12:30 +02:00
Alexander Brandon Coles 75be131ec2 [#72945] Adjust transparent header padding
Keep transparent BorderBoxList headers condensed on the bottom side
when default or spacious header padding is applied. This lets those
variants add breathing room above the header content without increasing
the gap to the first row.

https://community.openproject.org/wp/72945
2026-05-19 14:41:50 +02:00
Alexander Brandon Coles 64ffa78e1e [#72945] Style Sprint header description
https://community.openproject.org/wp/72945
2026-05-19 14:41:50 +02: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 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
Henriette Darge e0523a54ca Merge remote-tracking branch 'origin/dev' into feature/73089-restyled-work-package-card-in-backlogs-and-sprints-view 2026-05-19 09:37:17 +02:00
Henriette Darge 5691c55b58 Include parent, assignee and priority into the call directly to avoid n+1 queries when the WorPackageCardComponent is called 2026-05-19 09:28:15 +02:00
Henriette Darge 7dc866dfca Avoid that the status scheme is always set and status specific highlighting is ignored.
Include some further review feedback
2026-05-18 13:41:09 +02:00
Alexander Brandon Coles 1dac019468 Document interactive empty state behavior
Clarify that interactive lists only announce the empty state when
callers configure the slot, so manual list composition remains explicit.
2026-05-18 12:08:09 +02:00
Alexander Brandon Coles 6c0d121e84 Document work package item interface
Describe the initializer contract expected from custom work-package item
components so component_klass overrides fail less mysteriously.
2026-05-18 12:06:02 +02:00
Alexander Brandon Coles d51a9b5128 Align Header collapsible default
Match the internal Header default to BorderBoxListComponent so both
default to plain, non-collapsible header markup unless callers opt in.
2026-05-18 12:05:41 +02:00
Alexander Brandon Coles f9596bc63c Add full copyright preamble to header template 2026-05-16 22:08:03 +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 5ce3e5226a Use Blankslate description content helper
Render plain empty-state descriptions through Primer's string content
helper for consistency with the heading setup.
2026-05-16 21:30:29 +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 20a4783d96 [#72945] Default action button scheme in Header
Adds `DEFAULT_ACTION_SCHEME` (`:default`) to `Header` so callers
no longer need to pass `scheme:` for standard header buttons.
Updates Lookbook preview and Backlogs sprint component to use the
new default.

https://community.openproject.org/wp/72945
2026-05-14 17:02:39 +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
Henriette Darge 91de3310bd Extend the WorkPackageCardComponent with new optionss 2026-05-13 08:51:35 +02:00
Alexander Brandon Coles f8e3ea3019 Merge remote-tracking branch 'opf/dev' into HEAD
# Conflicts:
#	frontend/src/assets/sass/backlogs/_master_backlog.sass
#	modules/backlogs/config/locales/crowdin/es.yml
#	modules/backlogs/config/locales/crowdin/uk.yml
#	modules/storages/config/locales/crowdin/zh-CN.yml
#	modules/wikis/config/locales/crowdin/es.yml
#	modules/wikis/config/locales/crowdin/uk.yml
#	modules/wikis/config/locales/crowdin/zh-CN.yml
2026-05-11 17:31:22 +02:00
Alexander Brandon Coles 9cd4b59f25 Extract split-pane-active Sass mixin
Centralizes the `#content:has(#content-bodyRight > *)` selector
into a `split-pane-active` mixin so it is defined in one place.
Purely mechanical — no behavioral change.
2026-05-11 14:20:18 +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 50e7a2498d [#74683] Right align metric content 2026-05-05 15:17:45 +01:00
Alexander Brandon Coles 509c3de01d [#74683] Reduce metric content min-width 2026-05-05 15:17:45 +01:00
Alexander Brandon Coles d8d49fcbfa [#74683] Simplify story point metric
Render story point card metrics as numeric-only text while keeping the
full localized story point label available to assistive technology.

Remove the Backlogs-specific container query from the generic work
package card styles and cover the accessible metric behavior in
component specs.

https://community.openproject.org/wp/74683
2026-05-05 15:17:45 +01:00
Alexander Brandon Coles 61164e802f Fix WorkPackageCardComponent grid class generation
Makes `WorkPackageCardComponent` apply correct classes to grid areas.
2026-05-05 15:17:45 +01:00
Alexander Brandon Coles 5fdb03e8ad [#73968] Simplify empty card box item
Reuse the generic content item bridge for empty card box rows and keep
only the empty-row data override.

https://community.openproject.org/wp/73968
2026-05-05 13:26:32 +01: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 67723740bf [#73968] Note InfoLine arg passthrough TODO
Marks the hard-coded `InfoLineComponent.new(work_package:)` call in
the common card template as the integration point for InfoLine
variants and status presentation requested by WP 73089. Defers the
actual argument forwarding so this PR keeps a narrow scope.

https://community.openproject.org/wp/73968
2026-05-01 21:52:51 +02:00
Alexander Brandon Coles 7f96fb6e92 [#73968] Harmonize Backlogs card metric
Forward metric slot calls from the Backlogs card wrapper to the wrapped
common card so Backlogs card box items keep the same customization
surface as generic items. Keep story points as the default metric when
callers do not provide their own metric slot.

https://community.openproject.org/wp/73968
2026-05-01 21:42:59 +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 15ac6ebcec Merge branch 'dev' into code-maintenance/74088-backlog-sprints-component-renaming
# Conflicts:
#	modules/backlogs/app/components/backlogs/backlog_bucket_item_component.rb
#	modules/backlogs/app/components/backlogs/inbox_item_component.rb
#	modules/backlogs/app/components/backlogs/sprint_component.rb
#	modules/backlogs/spec/components/backlogs/backlog_bucket_item_component_spec.rb
#	modules/backlogs/spec/components/backlogs/inbox_item_component_spec.rb
#	modules/backlogs/spec/components/backlogs/sprint_component_spec.rb
2026-05-01 20:23:58 +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 f5405946f1 [#73968] Colocate card component styles
Renames the Backlogs-named card classes (`.op-backlogs-story`,
`.op-sprint-header`, `.op-backlogs-points-label`) after the
component classes extracted under `app/components/open_project/common/`
and moves the rules into colocated `.sass` files. Preparatory work
for https://community.openproject.org/wp/73890.

https://community.openproject.org/work_packages/73968
2026-04-30 17:43:52 +02:00
Alexander Brandon Coles 9f2896eaa0 [#73968] Document backlog card component API
Adds YARDoc to `WorkPackageCardComponent#initialize` and to
`WorkPackageCardBoxComponent` (constructor and the four slots:
`header`, `empty_state`, `footer`, `show_more`), so consumers can
read the API surface without reading the lambda bodies.

https://community.openproject.org/wp/73968
2026-04-30 16:47:09 +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