capybara_accessible_selectors 0.16 resolves role selectors such as
`:columnheader` by the computed accessible name. In a browser that name
folds in the CSS `text-transform: uppercase` styling and the column
action-menu trigger text, so `have_columnheader("Subject")` no longer
matches a header whose accessible name resolves to "SUBJECT Open menu".
Sets an explicit `aria-label` equal to the plain caption on each header
cell, in both the server-rendered tables and the work package table, so
the accessible name is the column title alone. This also improves screen
reader output, which previously announced the uppercased text and the
menu label.
`format_text` accepts `render_mode:` (`:in_app_html`, `:external_html`,
`:external_text`), which resolves the `only_path`, `static_html` and
`plain_text` context flags as a set. External surfaces (mailer HTML
body, future RSS/PDF/webhook) need absolute URLs and static rendering
together; pinning the trio at the public API keeps callers from
forgetting one. Explicit primitive kwargs still override.
`MailFormattingHelper` exposes `format_mail_html` and `format_mail_text`
thin wrappers around `format_text(render_mode:)`. The `_html` / `_text`
suffix matches the `.html.erb` / `.text.erb` template extension so
caller intent stays visible in the view, with no introspection of
`formats`.
The five WorkPackageMailer view sites use the helpers; `_work_package_details`,
`mentioned.html`, `mentioned.text`, `watcher_changed.html`, `watcher_changed.text`
drop the `static_html:`/`only_path:`/`plain_text:` boilerplate.
* Show filed type beside its name
* Add feature spec
* Add a comment for field_type_label
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Add custom field type label assertion to feature spec
* Move custom field to active group before asserting type label
* Rename the displayed field format value from field_type to
field_format_label and reuse CustomFieldsHelper for custom field format
labels.
* Make the table configuration modal wait more and embedded work package table loading take longer to avoid flaky failures when the modal or embedded table is still refreshing in CI
* Undo changes for switch_to method
* Undo changes for the tests that are sometimes failing on CI
* Update spec/features/types/form_configuration_spec.rb
Co-authored-by: Henriette Darge <h.darge@openproject.com>
* Update spec/helpers/types_helper_spec.rb
Co-authored-by: Henriette Darge <h.darge@openproject.com>
* Rubocop errors fixed
* Fix flaky field format labels spec by revisiting page after custom field creation
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Henriette Darge <h.darge@openproject.com>
- Pin literal "MACROPROJ-42" in helper spec so a regression where
the helper accidentally returns `#N` shape still trips the
assertion. Previously the expected string was built from the
same accessor under test.
- Drop framework-mechanics narration from the cause spec comment.
The assertion already conveys intent.
The activity feed renders an automatic entry whenever a parent / child /
predecessor / related work package change cascades dates onto the
current WP. Both render paths spoke numeric ids:
- The plain-text branch (used for the API JSON) hardcoded `##{id}`.
- The HTML branch went through `link_to_work_package`, which built the
visible link label as `Type ##{id}: subject`.
Both now use `formatted_id`, which produces `PROJ-7` in semantic mode
and `#42` in classic — same shape, mode-aware. The link href was
already mode-correct via `to_param`; only the visible label needed the
swap.
* Create the section component
* Create the form configuration component
* Create a controller
* change form template
* Use primer dialog for reset to defaults button
* show WP configuration modal while creating a related WPs table
* Fix the drag and drop functionality without save button
* Fix renaming functionality
* Use generic drag and drop in form configuration and move all client side action handling to server side
* Fix embedded query form configuration regressions
* Add data test selectors to all elements that we used for test
* update the current tests with the new implementations and design
* Add new tests for new controller of sections and rows
* WP quesry row should only have edit quesry action
* Update transformer spec regarding the new changes
* Fix the failing test in reset form configuration and some tests for actions
* Fix rubocop errors
* Fix eslint errors
* Add spec for removing a section
* Use condensed border boxes
* fix failing specs
* fix failing specs
* Switch the buttons in form configuration component
* Create the section at the top of the list
* Instead of using UUID, use the name of the group as the key
* Add missing check for EE for section actions
* Remove angular components
* Use action list instead of a border box for left side panel
* Reduce the margin between the right side panel and sub header, add some space to the query table left side, span to the whole available space
* Show validation errors while updating and creating a section
* Use a danger dialog for reset to default
* Add a confirmation for removing the section
* Align items in the row
* Use test_selector instead of data-test-selector
* Create move_action in rb file
* Create move_action in rb file
* Simplify section component
* Simplify form configuration component
* Remove dialog for rename and delete section on missing EE
* Create a component for inactive attribute list
* Create a separate component for reset dialog
* Remove EE feedback dialog
* Remove form partial which is not needed anymore
* Remove unused js strings
* Update using update_via_turbo
* Remove form configuration rows controller
* Create a blanksalte component
* Fix failing specs
* Fix failing specs
* Fix failing specs
* Remove unused translation strings
* Align form configuration section routes with actual create flow
* Change section to group
* Change section to group in services and controllers
* Change section to group in en.yml
* Fix rubocop errors
* Move the query group persistence assertion from the JS feature spec
to the synchronous form configuration groups controller spec.
* Reuse query service result in embedded query build
* Keep inactive attribute filter after turbo list refresh
* Extract form configuration group edit state into form model
* Fix the failing test
* Potential fix for pull request finding 'CodeQL / Potentially uninitialized local variable'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Rename inactive attribute component inputs
* Refine reset dialog wording for form configuration
* Use direct Turbo action for adding attribute groups
* Reuse generic filter-list controller for inactive attributes
* Remove focus impelementation in ts
* Group form configuration Stimulus controllers under one namespace
* Use turbo request service in form configuration controller
* Clarify legacy group key normalization in form config contract
* Replace inactive attribute list wrapper via turbo stream
* Extract duplicate untitled group key generation into Type::FormGroup.next_untitled_key
* Auto-generate untitled group name on create instead of returning an error
* Avoid mixed return types in form config group create service
* Extract shared form configuration group service behavior into concern
* Fix spacing for the last group and italic font for the placeholder rows
* Replace Angular no-results component with Primer Banner on form configuration page
* Hide dropped element immediately to prevent flickering before Turbo Stream response
* Reload type before rendering create error to prevent duplicate groups
* Await service initialization before use to prevent potential race condition
* Replace sleep calls with deterministic waits in form configuration spec
* Handle malformed JSON and invalid query errors gracefully in form configuration update
* Make query group label a clickable button and empty group hint italic
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
We used request.url and a back_url for the home path to redirect users
if they did not end up trying to access on a deep link.
In case you access / and get redirected by require_login, you want users
to end up on the after_login_default_redirect_url
Likewise, if you access /login without a back_url, you want the same
behavior
Deep linking logins are unchanged
https://community.openproject.org/work_packages/74756
https://community.openproject.org/wp/73986
The meta-tags gem truncates the page title to 70 characters by default,
which caused the browser title bar to show incomplete page titles.
Add initializer that disables that limit so the full title is always
displayed.
Adds `GET /api/v3/projects/:id/configuration` endpoint that returns
all global configuration properties plus project-specific settings.
This allows client apps to check both enterprise token features
(availableFeatures) and project settings (enabledInternalComments)
in a single API call.
Based on `My::TimeZoneForm` implementation.
Should also reduce allocations (however, possible performance/memory
usage improvements have not been benchmarked).
* Make link_to_content_update forward all arguments
Supports block arguments.
Makes param names match `link_to`.
* [#65625] Provide A11y labels for pagination links
Applies `aria-label`, `role` and uses semantic markup where possible.
This should bring parity with the recently-updated Angular
`TablePaginationComponent`.
* Make internal PaginationHelper methods private
* Rework PaginationHelper to use keyword arguments
* Move custom LinkRenderer out of PaginationHelper
Works around `Rails/HelperInstanceVariable` offense false positives.
* Remove unnecessary LinkRenderer#to_html override
* Use text and chevron Octicons for Previous, Next
* Fix vertical alignment of pagination items
* Remove classes only used for Rails impl. specs
Test using semantic elements where possible.
https://community.openproject.org/wp/64635
This follows the design on Figma:
- 4 columns: subscription, active users, domain, dates
- subscription shows plan name, subscriber, and some labels depending on
the token validity and attributes
- the dates are highlighted if they have an influence on the token status
Renders flash messages wrapped in `<turbo-stream>` tags, suitable for
inlining as part of an HTML response (e.g. within a `turbo-frame`).
See: https://turbo.hotwired.dev/handbook/streams#stream-messages-and-actions
> Also, any <turbo-stream> element that’s inserted into the page (e.g.
> through full page or frame load), will be processed by Turbo and then
> removed from the dom. This allows stream actions to be executed
> automatically when a page or frame is loaded.
/ HT @bsatarnejad