The view-helper migration introduced by the parent PR now covers the
remaining mailer surfaces: UserMailer (`message_posted`, `news_added`,
`news_comment_added`), ProjectMailer (`project_created`),
ProjectArtifactsMailer (`creation_wizard_submitted`), MemberMailer
(`added_project`, `updated_project`, `updated_global`), AnnouncementMailer
(`announce`), DocumentsMailer (`document_added`), and the shared mailer
layout (`localized_emails_header`, `localized_emails_footer`).
Sites drop the `static_html: true` / `only_path: false` / `plain_text: true`
boilerplate; `render_mode:` pinning lives in the helper.
The layout previously called `OpenProject::TextFormatting::Renderer.format_text`
directly, bypassing the helper layer. The empty visibility cache (no
current_user-scoped preload at layout time) is handled by the existing
fallback in `LinkHandlers::WorkPackages#text_only?` — covered by a new
sanity spec in `user_mailer_spec.rb` that exercises the header path with
a WP reference and asserts plain-text formatted_id rendering.
Per-bucket regression coverage added: absolute-URL and formatted_id
assertions across both classic and semantic identifier modes, mirroring
the WorkPackageMailer spec pattern.
The previous behaviour of op-app-header--center was to not be centered
on mobile, but be right-aligned.
This was confusing and also led to undesired behaviour in the logo_only
layout, where the logo moved to the right unexpectedly.
The behaviour was originally intended for the search bar in the base layout.
To make the behaviour more clear, a new op-app-header--center_mobile-right was introduced,
making it clear that the behaviour of the box in the base layout is to be
centered normally, but right aligned on mobile.
This was omitted previously, resulting in an empty
header. That the logo moves to the right hand side
seems to be a conscious decision that's baked into
the .op-app-header--center class.
* 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
* Create a FullView::CopyComponent for WorkPackages which is routed from rails
* Remove angular splitCopy route and component as it was overwritten by the angular fullCopy route for quite some time already and nobody complained. So we decided to remove the splitCopy completely
* Create FullView::CreateComponent for WorkPackages which is now routed from rails instead of Angular
* First draft of implementing the FullView route for WorkPackages from rails
* Pass correct tab from the URL to the FullView::ShowComponent
* Do a hard reload to "create" route when we are not routed from Angular
* Adapt routing spec to new WorkPackage routes and to some fine-tuning with the WP routes
* Show correct tab in WP Full view and change URL when clicking a tab entry
* Adapt to new rails based routing
* Fix some routes and redirects
* Make sure, the split screen stil renders correctly
* Remove back button from WP full view
* Fix routing issues
* Start fixing specs
* Attempt to override the browser history to be able to use browser back
* Use helper function to build new WP url string
* Adapt spec that now partially renders backend toasts
* Remove ability to move to fullscreen
Theoretically, we can re-add it by posting to some form endpoint, but
not worth it for the first iteration
* Disable cache-control on angular routed pages, so back links work
* Fix double click to fullscreen
* Adapt navigation and title setting
* Let WP breadcrumb to a hard reload instead of Angular transition
* Redirect when the WP route is incomplete (this is the attempt to re-implement an angular functionality)
* Navigate with Turbo when double clicking a card
* Adapt onboarding tour to new hard reload when switching to WP full view
* Fix some specs
* Fix more tests
* Hide Overview tab on FullView
* Correct check for incomplete routes
* Do a hard refresh when coming from slpit screen to full view
* Fix notification navigation
* Adapt attachment spec as the tab switch cannot be done anymore while dragging
* Fix more tests
* Please rubocop and fix more tests
* Attempt to fix navigation_spec
* Add debian_base for pullpreview
---------
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* [#65606] Apply description to links with blank target
Uses a `ExternalLinksController` Stimulus controller to set
`aria-describedby` on all links with `target="blank"`. Uses a
`MutationObserver` to ensure links that are added to the DOM dynamically
(e.g. via Turbo Drive) are also updated.
Co-Authored-By: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com>
* add a documentation for the controller
* Add simple feature spec for external links
* Append id to aria-describedby if existing value
* Update the documentations on the lookbook for the links
---------
Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
Address code duplication concern raised in https://github.com/opf/openproject/pull/19746#discussion_r2256365160.
Encapsulate theme utilities into a class, with instances on the `window.OpenProject` and `AutoThemeSwitcher` interfaces.
AFAICT, it's not feasible to group the theme application in `base.html.erb` into the deffered `nonced_javascript_tag` as the
deffered script would run too late for theme application.
Removes `turbo:load` hack which resulted in rendering issues (white
screens) on form error submission for a number of pages.
`type="module"` rather than `defer` is the correct attribute value in
this case: the script will be also be deferred, but in a synchronous
execution order - after other `<script type="module" src="main.js"/>`.
See also 0e69c9e156
When using sync_with_system theme preference, there was a visible flicker
as the page defaulted to light theme before the Stimulus controller
could detect and apply the correct system theme.
This fix adds inline JavaScript in the layout head that detects the
system theme preference and applies it immediately before the body
renders, eliminating the flickering issue.
Clean-up sass code
Avoid that the type selector in the WP from is scrolled two far when being activated. Currently, it is scrolled twice (one time when activating it and once again when selecting an item). Thus the dropdown overlaps the actual input
Move logo to the left side
Make naming consistent for MainMenuToggleComponent and add a component test
Let menu toggle button scroll with the rest of the page
Move modules menu to the left and show it on mobile
Move the project selector to side bar menu
It doesn't show project selector in log in page any more, so we don't need to test showing favorite projects
Fix spacing in sidebar menu
Use a smaller header title for projects list modal
remove op-app-menu classes
Show project name on a tooltip and make the text ellipsis in menu
Add a divider between project selector and menu list
Remove border radius
Use spot divider
Undo changes for spec
Fix test by adding view_project permission to anonymous user
Use hr tag instead of spot divider
Add some space around the project selector
Fix spacing around the divider and fix the hover effect width
Reduce spacing to the top to match bottom spacing
remove overflow y for main menu sidebar and use button instead of anchor tag for trigger element
reduce the height of project selector from menu sidebar height, add a scroll for the menu when there is no sub menu
* 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>
* add a new helper for breadcrumb in wiki page
* set page header in destroy page
* set page header in edit page
* set page header in history and rename and edit parent pages
* change toolbar items into page header items
* add new wiki action to sub header
* remove version edit page which is not in use any more
* add export as a menu item of the header
* fix rubocup errors
* fix failing tests
* replace page header in annotate page
* replace page header in diff page
* add page header in select menu page
* fix rubocup errors
* fix errors on rename test
* fix errors on selecting items from toolbar
* fix errors on tests for child pages
* set correct permission for configure menu item
* replace page header in summary page
* replace page header in summary details page
* edit docs of sub header
* add page header in wiki new page
* remove controller and a route for edit method
* undo changes for docs of sub header
* extract header in show page into a new component
* use helper method in header component
* add wiki module to the breadcrumb
* rename page header component for wiki page
* simplify how lock and lock implemented
* extract sub header
* remove wiki title from header of history page
* fix page header in new page
* use page.find_test_selector in test
* fix failing test for summary page
* fix failing test for wiki child pages
* change the summary test
* use test selector for page header title
* undo changes for activate user in admin
* use test selector in adding editing history test
* use test selector in attachment upload test
* use test selector in child pages tests
* use test selector in wiki menu items tests
* change test selector for breadcrumbs
* extract conditions to show edit button into a method
* extract conditions to show rollback action menu item into a method
* extract conditions to show create button into a method
* fix duplicated code in test
* Remove outdated `show_local_breadcrumb` method which is replaced by the Primer::PageHeader breadcrumb
* Remove `default_breadcrumb` method as it serves no prupose any more
* Remove the old breadcrumb and its hook completely
* remove breadcrumbs path from rename
* fix translations errors in storages
* undo changes on translations
* remove default breadcrumbs in time tracking controller
---------
Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
Co-authored-by: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com>