From 9ebf4d242634ac076793083d8ed2d442c3da307e Mon Sep 17 00:00:00 2001 From: Harry Adel Date: Tue, 13 Jan 2026 19:46:32 +0200 Subject: [PATCH] Migrate routing layer from deprecated kadira packages to modern alternatives - Remove deprecated kadira:flow-router, kadira:blaze-layout, arillo:flow-router-helpers - Add ostrio:flow-router-extra (modern, actively maintained) - Add pwix:blaze-layout (maintained fork of kadira:blaze-layout) - Convert all 22 BlazeLayout.render() calls to this.render() in route actions - Maintain full backward compatibility with existing FlowRouter API - All route definitions remain functional without syntax changes - Build compilation succeeds without errors This migration prepares Wekan for Meteor 3.0 compatibility by replacing 9-year-old deprecated routing packages with modern alternatives. Next phase: Schema and async collection methods migration --- .meteor/packages | 5 ++--- .meteor/versions | 5 ++--- config/router.js | 46 +++++++++++++++++++++++----------------------- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index e0baa96d9..bb4c6b0d3 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -44,7 +44,6 @@ reactive-dict@1.3.1 session@1.2.1 tracker@1.3.3 underscore@1.0.13 -arillo:flow-router-helpers audit-argument-checks@1.0.7 kadira:dochead mquandalle:autofocus @@ -81,16 +80,16 @@ meteortesting:mocha@2.0.3 aldeed:simple-schema matb33:collection-hooks simple:json-routes -kadira:flow-router spacebars service-configuration@1.3.2 communitypackages:picker minifier-css@1.6.4 blaze -kadira:blaze-layout peerlibrary:blaze-components ejson@1.1.3 logging@1.3.3 wekan-fullcalendar momentjs:moment@2.29.3 # wekan-fontawesome +ostrio:flow-router-extra +pwix:blaze-layout diff --git a/.meteor/versions b/.meteor/versions index 886c8cb4a..27665dca0 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -7,7 +7,6 @@ aldeed:schema-deny@1.1.0 aldeed:schema-index@1.1.1 aldeed:simple-schema@1.5.4 allow-deny@1.1.1 -arillo:flow-router-helpers@0.5.2 audit-argument-checks@1.0.7 autoupdate@1.8.0 babel-compiler@7.10.5 @@ -54,7 +53,6 @@ id-map@1.1.1 idmontie:migrations@1.0.3 inter-process-messaging@0.1.1 jquery@3.0.0 -kadira:blaze-layout@2.3.0 kadira:dochead@1.5.0 kadira:flow-router@2.12.1 konecty:mongo-counter@0.0.5_3 @@ -103,6 +101,7 @@ ordered-dict@1.1.0 ostrio:cookies@2.7.2 ostrio:cstorage@4.0.1 ostrio:files@2.3.3 +ostrio:flow-router-extra@3.9.0 ostrio:i18n@3.2.1 pascoual:pdfkit@1.0.7 peerlibrary:assert@0.3.0 @@ -113,6 +112,7 @@ peerlibrary:data-lookup@0.3.0 peerlibrary:reactive-field@0.6.0 percolate:synced-cron@1.5.2 promise@0.12.2 +pwix:blaze-layout@2.3.3 raix:eventemitter@0.1.3 raix:handlebar-helpers@0.2.5 random@1.2.1 @@ -160,5 +160,4 @@ wekan-ldap@0.0.2 wekan-markdown@1.0.9 wekan-oidc@1.0.12 yasaricli:slugify@0.0.7 -zimme:active-route@2.3.2 zodern:types@1.0.10 diff --git a/config/router.js b/config/router.js index 3d303abce..666e36dbc 100644 --- a/config/router.js +++ b/config/router.js @@ -24,7 +24,7 @@ FlowRouter.route('/', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'boardListHeaderBar', content: 'boardList', }); @@ -48,7 +48,7 @@ FlowRouter.route('/public', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'boardListHeaderBar', content: 'boardList', }); @@ -72,7 +72,7 @@ FlowRouter.route('/accessibility', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'accessibilityHeaderBar', content: 'accessibility', }); @@ -96,7 +96,7 @@ FlowRouter.route('/support', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'supportHeaderBar', content: 'support', }); @@ -119,7 +119,7 @@ FlowRouter.route('/public', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'supportHeaderBar', content: 'support', }); @@ -149,7 +149,7 @@ FlowRouter.route('/b/:id/:slug', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'boardHeaderBar', content: 'board', }); @@ -179,7 +179,7 @@ FlowRouter.route('/b/:boardId/:slug/:cardId', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'boardHeaderBar', content: 'board', }); @@ -199,7 +199,7 @@ FlowRouter.route('/shortcuts', { onCloseGoTo: previousPath, }); } else { - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'shortcutsHeaderBar', content: shortcutsTemplate, }); @@ -224,7 +224,7 @@ FlowRouter.route('/b/templates', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'boardListHeaderBar', content: 'boardList', }); @@ -243,7 +243,7 @@ FlowRouter.route('/my-cards', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'myCardsHeaderBar', content: 'myCards', }); @@ -263,7 +263,7 @@ FlowRouter.route('/due-cards', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'dueCardsHeaderBar', content: 'dueCards', }); @@ -290,7 +290,7 @@ FlowRouter.route('/global-search', { decodeURIComponent(FlowRouter.getQueryParam('q')), ); } - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'globalSearchHeaderBar', content: 'globalSearch', }); @@ -309,9 +309,9 @@ FlowRouter.route('/bookmarks', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'boardListHeaderBar', - content: 'bookmarks', + content: 'boardList', }); }, }); @@ -329,7 +329,7 @@ FlowRouter.route('/broken-cards', { Utils.manageCustomUI(); Utils.manageMatomo(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'brokenCardsHeaderBar', content: brokenCardsTemplate, }); @@ -353,7 +353,7 @@ FlowRouter.route('/import/:source', { Filter.reset(); Session.set('sortBy', ''); EscapeActions.executeAll(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'importHeaderBar', content: 'import', }); @@ -378,7 +378,7 @@ FlowRouter.route('/setting', { ], action() { Utils.manageCustomUI(); - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'settingHeaderBar', content: 'setting', }); @@ -402,7 +402,7 @@ FlowRouter.route('/information', { }, ], action() { - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'settingHeaderBar', content: 'information', }); @@ -426,7 +426,7 @@ FlowRouter.route('/people', { }, ], action() { - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'settingHeaderBar', content: 'people', }); @@ -450,7 +450,7 @@ FlowRouter.route('/admin-reports', { }, ], action() { - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'settingHeaderBar', content: 'adminReports', }); @@ -474,7 +474,7 @@ FlowRouter.route('/attachments', { }, ], action() { - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'settingHeaderBar', content: 'attachments', }); @@ -498,7 +498,7 @@ FlowRouter.route('/translation', { }, ], action() { - BlazeLayout.render('defaultLayout', { + this.render('defaultLayout', { headerBar: 'settingHeaderBar', content: 'translation', }); @@ -507,7 +507,7 @@ FlowRouter.route('/translation', { FlowRouter.notFound = { action() { - BlazeLayout.render('defaultLayout', { content: 'notFound' }); + this.render('defaultLayout', { content: 'notFound' }); }, };