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
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
This is intended to become a replacement for the angular-based
<opce-macro-wp-quickinfo> component.
However, the new component should be more generic, so that it can
also be used for other cases, such as rich links to wiki pages.
When trying to use this component, I wanted to use the input scheme
that I copied from elsewhere in the code. At first I was surprised that
the lookbook didn't yet contain a playground, where I could try this style out.
After adding it, I was surprised that it didn't look like an input at all and learned
that this scheme does not even exist... But it was already used multiple times :O
* Show ancestors of the project in project overview page
* add a feature spec
* Update docs
* remove feature flag for the test
* Update modules/overviews/app/components/overviews/page_header_component.rb
Co-authored-by: Henriette Darge <h.darge@openproject.com>
* update test
---------
Co-authored-by: Henriette Darge <h.darge@openproject.com>
* Dont check the first item in the list of search box, show the list items for screen reader
* highlight the WP if the full id is added and change aria-live message
* feature spec for live region
* use the global live region for announcing changes
* set void for promises