29 Commits

Author SHA1 Message Date
Mir Bhatia 6f207589ef Update label to change colours and include counter conditionally 2026-06-09 08:53:15 +02:00
Mir Bhatia cc3c3fbdf6 Add component specs 2026-06-09 08:51:19 +02:00
Mir Bhatia addc37c0ff Rename QuickFilter::SegmentedControlComponent 2026-06-09 08:51:17 +02:00
Alexander Brandon Coles 1a623ddf4b Add controller-aware OpPrimer::AttributesHelper
Stimulus supports multiple controllers on one element, but Primer's
`merge_data` is not controller-aware and silently drops a caller's
`data-controller` when a component merges in its own. Treat `controller`
as a plural data attribute so the values concatenate instead.
2026-06-02 19:05:56 +02:00
Alexander Brandon Coles 86e40ffffe Adapt specs to capybara_accessible_selectors 0.16
Refactors the custom `:list`/`:list_item` selectors onto CAS's
`add_role_selector` and drops the now-native `Capybara::Node::Simple#role`
hack. `:list_item` resolves the listitem role, so specs matching
non-listitem `<li>` are updated (`have_row` for the custom field table,
presentation dividers via CSS).

CAS 0.16 also resolves role selectors by computed role and accessible
name, which our CSS-styled tables and Primer menus do not expose through
plain markup. Affected feature specs switch to robust locators:
Capybara's `:table_row`, the FullCalendar `data-date`, and the action
menu's real accessible name ("Edit status").

The `:columnheader` `colindex` filter lost its off-by-one offset and now
uses the true 1-based `th` position. Also fixes Webhooks `RowComponent`
spec capitalization.
2026-05-29 20:41:25 +02:00
Alexander Brandon Coles 878ff28148 [#75275] Fix hellip/expandable text alignment
Extracts a shared `ExpandableTextComponent` for truncation with
`HiddenTextExpander`, preserving caller classes and data attributes.
Implements it on on the permissions report and workflows matrices so
expanded labels keep the ellipsis aligned with the first line.

https://community.openproject.org/wp/75275
2026-05-22 15:16:52 +02:00
Mir Bhatia f49a425f98 Move components to op_primer/ 2026-05-06 10:53:12 +02:00
David F 6e2efe8eb1 Merge branch 'dev' into feature/72383-workflows-ux-improvement-apply-workflow-setting-from-role-to-role 2026-04-09 09:42:46 +02:00
David F f24e41fd83 Turn full page forms into dialogs. wp/72383 2026-03-31 08:21:40 +02:00
David F 4690be175e Improve contextual information and navigation for workflow copy. wp/72383 2026-03-27 17:18:21 +01:00
Jan Sandbrink f9d8bc6614 Introduce SubclassResponsibility error
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.

This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported

Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:

> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]

Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
2026-03-27 08:14:56 +01:00
Behrokh Satarnejad e29a1f8798 Replace fieldset form component 2026-01-23 17:12:51 +01:00
Behrokh Satarnejad 66269ee57f Replace inline message component 2026-01-23 16:22:38 +01:00
Alexander Brandon Coles 07ae586e1a Rename WarningText to InlineMessageComponent
Aligns implementation with Primer React's InlineMessage component.

See: https://primer.style/product/components/inline-message/
2026-01-14 05:43:58 -03:00
Alexander Brandon Coles 5436a27358 [#70200] Introduce Fieldset component, input group
Introduces both an unstyled, low-level `FieldsetComponent` and the
`fieldset_group` input group for use with the Primer Forms DSL.

https://community.openproject.org/work_packages/70200
2026-01-14 05:43:56 -03:00
Alexander Brandon Coles f0371d164c Provide an accessible name (aria-label) for table 2025-12-31 13:53:12 -03:00
Alexander Brandon Coles d86d25233a Fix AXE best practice violations: replace UL/LI
`ul` elements should not have the `rowgroup` role.

See https://dequeuniversity.com/rules/axe/4.11/aria-allowed-role?application=AxeChrome
2025-12-31 13:53:12 -03:00
Alexander Brandon Coles 4d84e0aa1b [#70190] Add A11y semantics for Border Box Table
Add WAI-ARIA roles and relevant attributes to ensure Border Box tables
have table-like semantics. This commit makes changes to the structure of
the rendered markup to comply with the strict structure needed for ARIA
tables.

This commit also fixes BEM usage and removes some useless overrides.

https://community.openproject.org/work_packages/70190
2025-12-31 13:53:12 -03:00
Alexander Brandon Coles 21d4696309 Add rudimentary OpPrimer::WarningText component
`WarningText` renders `Primer::Text` with a leading alert Octicon using
the "attention" semantic color.
2025-12-17 18:41:48 -03:00
Alexander Brandon Coles b8e5ede4a3 Initial implementation of OpPrimer::ListComponent
Conceived as low-level component for building semantic lists.
2025-09-15 19:56:39 +01:00
Behrokh Satarnejad c0c11d340d a component spec 2025-09-08 09:09:29 +02:00
Alexander Brandon Coles cdeadda82b Make ConditionalLayoutComponent render fallback
Renders a fallback layout when the condition is false.
2025-09-02 16:59:10 +01:00
Alexander Brandon Coles adad3b295e Extract OpPrimer::ConditionalLayoutComponent 2025-09-02 16:59:05 +01:00
Mir Bhatia 67b3a3e835 Incorporate feedback 2025-08-06 17:21:14 +02:00
Mir Bhatia d660bdb0ea Add component specs 2025-08-06 09:01:26 +02:00
Alexander Brandon Coles 8e18e3b192 Also skip FlashComponent turbo stream rendering 2025-07-18 16:38:35 +01:00
Alexander Brandon Coles f5c28cc9d9 Skip FlashComponent rendering if content is blank 2025-07-18 16:38:35 +01:00
Oliver Günther 990335dfed Handle color modes in status button by passing __hl classes 2025-03-12 13:28:53 +01:00
Oliver Günther 2dd107d3c9 Generalize status button component for use in meetings and work packages 2025-02-27 11:09:03 +01:00