34 Commits

Author SHA1 Message Date
Kabiru Mwenja 0e5e6e51cf Implementation/71141 remove work package activity tab lazy pagination feature flag (#21817)
https://community.openproject.org/work_packages/71141
2026-01-30 14:06:12 +03:00
Klaus Zanders 8efb3e0fd0 Allow replacing components with other components
Taken from https://github.com/opf/openproject/pull/20385
2025-10-21 14:44:51 +02:00
Kabiru Mwenja 2484b48525 Switch from infinite scrolling to managed lazy loaded pages
Akin to lazy frames but with better intersection threshold control
2025-10-08 15:42:42 +03:00
Kabiru Mwenja c1d070ab6f Extract journal_sorting.{asc?,desc?} inquiry 2025-10-08 15:42:40 +03:00
Kabiru Mwenja 447a45b575 Add infinite scrolling stimulus controller 2025-10-08 15:42:38 +03:00
Kabiru Mwenja fedfa10b1f Merge pull request #19633 from opf/code-maintenance/65033-decompose-workpackagesactivitiestabindex-stimulus-js-controller
Code maintenance/65033 Decompose WorkPackagesActivitiesTabIndex Stimulus JS Controller
2025-07-28 12:02:43 +03:00
Kabiru Mwenja d15e06f05e Restructure composition via Outlets + Mixin 2025-07-22 18:08:04 +03:00
Alexander Brandon Coles 04eefed350 Freeze string literals in app/components
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/components
2025-07-22 13:06:59 +01:00
Alexander Brandon Coles 3d212fcf45 Document #render_as_turbo_stream 2025-07-18 16:38:37 +01:00
Alexander Brandon Coles 809aa055ac Typo fix in error message 2025-07-18 16:38:36 +01:00
Alexander Brandon Coles 5c10801ba5 Move Streamable instance methods to module body
This is more idiomatic and ensures that the methods are visible in the
ancestor chain.
2025-07-18 16:38:36 +01:00
Behrokh Satarnejad 9b5fedb1ce [62708] Implementing ARIA live regions to communicate contextual changes (#17920)
* check if there is a screen reader active on page load

* hide the flat picker for screen readers

* make the banner focusable

* change the focus color in banner

* change disabled to readonly input fields

* change replace_via_turbo_stream to add a message to it

* add live region of github to out project

* add a method to send the aria message

* make it possible to pass the attributes

* pass type of aria live region to front-end based on the action

* remove focused field from date picker

* focus on tabs when there is no banner

* Revert "remove focused field from date picker"

This reverts commit ab5e3060343860e9c34514818f6d9eee59e91ee1.

* focus on the first element when opening the dialog

* remove auto-focus

* undo changes for adding a message

* add a new input method for adding a date and select today as a date

* remove label and name from form input

* change readonly to disabled

* undo changes for date-form

* delete dateform file

* add aria-live for fields in date pickr

* add a turbo stream to the component to load the messages for aria live regions

* undo changes for check f there is an active screen reader

* use settimeout instead of add event listener, so turbo frame also can be used hare

* undo changes for text with link form input

* remove text with link form input

* add documentation for aria-live region

* add an example for using current method in relation creation

* add aria live region in date-pickr dialog

* add some delay for polite messages to make sure it is caught

* send a message to be gotten by screen reader in date picker while changing inputs

* remove aria-live form inputs in date pickr

* show update message after any change in inputs of date picker

* fix rubocup errors in relation controller

* fix rubocup errors in datepicker controller

* fix eslint error

* update docs

* add some details to the aria live doc

* remove test for aria-live on inputs of date pickr

* remove unnecessary live region polite for date picker

* Update lookbook/docs/patterns/18-aria-live.md.erb

Co-authored-by: Henriette Darge <h.darge@openproject.com>

* Update lookbook/docs/patterns/18-aria-live.md.erb

Co-authored-by: Henriette Darge <h.darge@openproject.com>

* fix comment in preview controller

* remove role: alert

* set correct value for target

* move aria turbo stream below live region

* add missing spaces and a better headline for js handling turbo aria action

* move the exception of modals and dialogs to the end of doc file

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update frontend/src/turbo/aria-stream-action.ts

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/work_packages/date_picker_controller.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/concerns/op_turbo/component_stream.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/work_packages/date_picker_controller.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update app/controllers/work_packages/date_picker_controller.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* change parameter in update_inputs_aria_live_message string

* change type to politeness

* Update lookbook/docs/patterns/accessibility/18-aria-live.md.erb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

* set delay for polite updates

* use delay in relations tab update and date pickr update

* remove the usage of aria live region update message in relations tab, since we should handle update message here in another way

* use assistive technology instead of screen reader only

* change the stream action to live region

* change the aria action to live region

* remove alert role

* change the string in away that if there is no value for start date, finish date or duration, it shouldn't be part of the string

* remove aria-live from input text fields

* test for updated message in date pickr

* undo changes for relations updates

* check if message is null then return

* add more delay for updating data in date picker

* fix test for adding more delay for updating data in date picker

---------

Co-authored-by: Henriette Darge <h.darge@openproject.com>
Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
2025-05-21 13:08:21 +02:00
Kabiru Mwenja 08ab20d966 Improve naming for internal comment stimulus controller outlet selector 2025-05-07 13:47:08 +03:00
Kabiru Mwenja 78f0d16f21 Specify element id for work-packages--index stimulus controller
This is needed so that Stimulus Outlets can find the node where the respective stimulus controller is defined
2025-05-07 13:46:02 +03:00
Bruno Pagno 97ccf0bfc5 adjust internal comments internal representation 2025-04-24 13:12:32 +02:00
Kabiru Mwenja 9254492202 Define shared stimulus controllers mixin for activities tab 2025-03-21 11:31:08 +03:00
Dombi Attila 8040262a8b Enable morphing the Stages and Gates form preview action 2024-12-17 15:56:22 +02:00
Oliver Günther 1a287d6cfd Fix reference to INLINE_ACTIONS 2024-08-16 08:41:49 +02:00
Oliver Günther d593d4046c Replace inline actions with constant 2024-08-16 08:34:37 +02:00
Oliver Günther 6703a396d2 Merge remote-tracking branch 'origin/dev' into feature/meetings-update-flash 2024-08-12 15:52:38 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Oliver Günther 10386769b2 Add new flash stream action 2024-07-09 15:19:45 +02:00
Oliver Günther b9f9ec4ecb Replace AsyncDialogComponent with the truly async dialogs 2024-04-22 13:36:22 +02:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Dombi Attila 8e51dfe0fd [#50119] Deal with cancelling and data loss
https://community.openproject.org/work_packages/50119
2023-11-10 13:50:38 +02:00
Kabiru Mwenja 525f32d324 [Op#50212]: Add Turbo Stream and Frame View Components (#13932)
https://community.openproject.org/wp/50212

Co-authored-by: Aaron Contreras <aaronlcaq@gmail.com>
2023-10-18 19:38:19 +03:00
Aaron Contreras 7afed612ed Allow custom-rendered component_wrapper
We should be able to render a custom implementation of component_wrapper
in scenarios where we're sending turbo stream responses for a "Slot"
view component and wouldn't want to have a different DOM structure when
sending a "replace" action with an extra tag as compared to initial
renders.
2023-10-09 09:25:09 -05:00
Aaron Contreras 2fc035e6a6 Specify type of error on every raise in OpTurbo::Streamable 2023-10-05 10:30:26 -05:00
Aaron Contreras e6b1d7d9c8 Explain #wrapped? check on component instead of self 2023-10-05 10:30:25 -05:00
Aaron Contreras 9bbfbe00d8 Rename and expose instance variable via method 2023-10-05 10:30:24 -05:00
Aaron Contreras 9d635b12b1 Fix: @component_wrapper_used should be set on component and not target
The purpose of `@component_wrapper_used` in this scenario is to check
if the component that is to be inserted into the target has used
a `component_wrapper` in its template rendering.

This both:
* Fixes the issue where this will always raise an error as
  the target component is not being rendered (and doesn't need to be).

* Ensures that there is a unique ID set at the top-most level of
the turbo stream response and turbo can de-duplicate any existing
components that match the current ID of the component before
appending/prepending.
2023-10-05 10:30:22 -05:00
Aaron Contreras 48e7f277b8 Lint: Use !! instead of comparing to true 2023-09-28 17:48:34 -05:00
Aaron Contreras 158f180cd0 Fix: Correct :remove action for turbo stream response
Given I attempt to remove a component via a turbo stream, this resulted
in a

```
"You need to wrap your component in a `component_wrapper` block in order to use the turbo-stream methods"
```

error. This is due to the component template not being rendered and
the `@component_wrapped_used` instance variable not being set (because
the `component_wrapper` invocation in the component template is never
called.

The proposed fix for this is to render JUST the `component_wrapper` (without
its block content) in order to get the dom id that needs removal
and turbo streams is able to do its magic.

This is achieved by providing a `@wrapper_only` flag so when the
`component_wrapper` method is called within the component's template,
only the wrapper tag is rendered, making it enough to perform a
successful turbo stream removal of the component by handling this
case with the short circuit. We don't really care in this case about
rendering the entire component given all we care about is that
outer tag.
2023-09-28 17:48:25 -05:00
Jonas Jabari 5fa2eafc0a introduce turbo_stream view_component abstraction 2023-09-19 16:45:28 +02:00