OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Upgrade turbo to 8.0.10
Christophe Bliardbfa74b5cfb08
diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex ec7a14f7983..cabd31d2cb4 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -39,8 +39,8 @@"@fullcalendar/timegrid": "^6.1.11","@github/webauthn-json": "^2.1.1","@hotwired/stimulus": "^3.2.2",- "@hotwired/turbo": "^8.0.4",- "@hotwired/turbo-rails": "^8.0.4",+ "@hotwired/turbo": "^8.0.10",+ "@hotwired/turbo-rails": "^8.0.10","@kolkov/ngx-gallery": "^2.0.1","@ng-select/ng-option-highlight": "13.2.0","@ng-select/ng-select": "^13.2.0",@@ -3567,19 +3567,19 @@"integrity": "sha512-eGeIqNOQpXoPAIP7tC1+1Yc1yl1xnwYqg+3mzqxyrbE5pg5YFBZcA6YoTiByJB6DKAEsiWtl6tjTJS4IYtbB7A=="},"node_modules/@hotwired/turbo": {- "version": "8.0.5",- "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.5.tgz",- "integrity": "sha512-TdZDA7fxVQ2ZycygvpnzjGPmFq4sO/E2QVg+2em/sJ3YTSsIWVEis8HmWlumz+c9DjWcUkcCuB+muF08TInpAQ==",+ "version": "8.0.10",+ "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.10.tgz",+ "integrity": "sha512-xen1YhNQirAHlA8vr/444XsTNITC1Il2l/Vx4w8hAWPpI5nQO78mVHNsmFuayETodzPwh25ob2TgfCEV/Loiog==","engines": {"node": ">= 14"}},"node_modules/@hotwired/turbo-rails": {- "version": "8.0.5",- "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.5.tgz",- "integrity": "sha512-1A9G9u28IRAl0C57z8Ka3AhNPyJdwfOrbjr+ABZk2ZEUw2QO7cJ0pgs77asUj2E/tzn1PgrxrSVu24W+1Q5uBA==",+ "version": "8.0.10",+ "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.10.tgz",+ "integrity": "sha512-BkERfjTbNwMb9/YQi0RL9+f9zkD+dZH2klEONtGwXrIE3O9BE1937Nn9++koZpDryD4XN3zE5U5ibyWoYJAWBg==","dependencies": {- "@hotwired/turbo": "^8.0.5",+ "@hotwired/turbo": "^8.0.6","@rails/actioncable": "^7.0"}},@@ -24537,16 +24537,16 @@"integrity": "sha512-eGeIqNOQpXoPAIP7tC1+1Yc1yl1xnwYqg+3mzqxyrbE5pg5YFBZcA6YoTiByJB6DKAEsiWtl6tjTJS4IYtbB7A=="},"@hotwired/turbo": {- "version": "8.0.5",- "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.5.tgz",- "integrity": "sha512-TdZDA7fxVQ2ZycygvpnzjGPmFq4sO/E2QVg+2em/sJ3YTSsIWVEis8HmWlumz+c9DjWcUkcCuB+muF08TInpAQ=="+ "version": "8.0.10",+ "resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.10.tgz",+ "integrity": "sha512-xen1YhNQirAHlA8vr/444XsTNITC1Il2l/Vx4w8hAWPpI5nQO78mVHNsmFuayETodzPwh25ob2TgfCEV/Loiog=="},"@hotwired/turbo-rails": {- "version": "8.0.5",- "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.5.tgz",- "integrity": "sha512-1A9G9u28IRAl0C57z8Ka3AhNPyJdwfOrbjr+ABZk2ZEUw2QO7cJ0pgs77asUj2E/tzn1PgrxrSVu24W+1Q5uBA==",+ "version": "8.0.10",+ "resolved": "https://registry.npmjs.org/@hotwired/turbo-rails/-/turbo-rails-8.0.10.tgz",+ "integrity": "sha512-BkERfjTbNwMb9/YQi0RL9+f9zkD+dZH2klEONtGwXrIE3O9BE1937Nn9++koZpDryD4XN3zE5U5ibyWoYJAWBg==","requires": {- "@hotwired/turbo": "^8.0.5",+ "@hotwired/turbo": "^8.0.6","@rails/actioncable": "^7.0"}},diff --git a/frontend/package.json b/frontend/package.jsonindex d1e04307e74..6f8167241ae 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -91,8 +91,8 @@"@fullcalendar/timegrid": "^6.1.11","@github/webauthn-json": "^2.1.1","@hotwired/stimulus": "^3.2.2",- "@hotwired/turbo": "^8.0.4",- "@hotwired/turbo-rails": "^8.0.4",+ "@hotwired/turbo": "^8.0.10",+ "@hotwired/turbo-rails": "^8.0.10","@kolkov/ngx-gallery": "^2.0.1","@ng-select/ng-option-highlight": "13.2.0","@ng-select/ng-select": "^13.2.0",diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.tsindex 10262134efe..61b253b88b7 100644--- a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts@@ -36,6 +36,10 @@ interface TurboBeforeFrameRenderEventDetail {render:(currentElement:HTMLElement, newElement:HTMLElement) => void;}+interface HTMLTurboFrameElement extends HTMLElement {+ src:string;+}+export default class PreviewController extends Controller {static targets = ['form',@@ -64,11 +68,15 @@ export default class PreviewController extends Controller {});this.debouncedPreview = debounce((event:Event) => { void this.preview(event); }, 100);- // TODO: Ideally morphing in this single controller should not be necessary.- // Turbo supports morphing, by adding the <turbo-frame refresh="morph"> attribute.- // However, it has a bug, and it doesn't morphs when reloading the frame via javascript.- // See https://github.com/hotwired/turbo/issues/1161 . Once the issue is solved, we can remove- // this code and just use <turbo-frame refresh="morph"> instead.++ // Turbo supports morphing, by adding the <turbo-frame refresh="morph">+ // attribute. However, it does not work that well with primer input: when+ // adding "data-turbo-permanent" to keep value and focus on the active+ // element, it also keeps the `aria-describedby` attribute which references+ // caption and validation element ids. As these elements are morphed and get+ // new ids, the ids referenced by `aria-describedby` are stale. This makes+ // caption and validation message unaccessible for screen readers and other+ // assistive technologies. This is why morph cannot be used here.this.frameMorphRenderer = (event:CustomEvent<TurboBeforeFrameRenderEventDetail>) => {event.detail.render = (currentElement:HTMLElement, newElement:HTMLElement) => {Idiomorph.morph(currentElement, newElement, { ignoreActiveValue: true });@@ -88,7 +96,7 @@ export default class PreviewController extends Controller {}});- const turboFrame = this.formTarget.closest('turbo-frame') as HTMLFrameElement;+ const turboFrame = this.formTarget.closest('turbo-frame') as HTMLTurboFrameElement;turboFrame.addEventListener('turbo:before-frame-render', this.frameMorphRenderer);}@@ -102,7 +110,7 @@ export default class PreviewController extends Controller {}target.removeEventListener('blur', this.debouncedPreview);});- const turboFrame = this.formTarget.closest('turbo-frame') as HTMLFrameElement;+ const turboFrame = this.formTarget.closest('turbo-frame') as HTMLTurboFrameElement;if (turboFrame) {turboFrame.removeEventListener('turbo:before-frame-render', this.frameMorphRenderer);}@@ -138,7 +146,7 @@ export default class PreviewController extends Controller {const wpAction = wpPath.endsWith('/work_packages/new/progress') ? 'new' : 'edit';const editUrl = `${wpPath}/${wpAction}?${new URLSearchParams(wpParams).toString()}`;- const turboFrame = this.formTarget.closest('turbo-frame') as HTMLFrameElement;+ const turboFrame = this.formTarget.closest('turbo-frame') as HTMLTurboFrameElement;if (turboFrame) {turboFrame.src = editUrl;