From 991e74bfc287d840951b7c707b7ff2a2f26e5001 Mon Sep 17 00:00:00 2001 From: IgnatzHome Date: Thu, 14 Jun 2018 19:38:57 +0200 Subject: [PATCH 1/5] testing mobile detail view fix. --- client/components/cards/cardDetails.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 26549fda1..a2bf2d024 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -21,8 +21,10 @@ BlazeComponent.extendComponent({ onCreated() { this.isLoaded = new ReactiveVar(false); - this.parentComponent().parentComponent().showOverlay.set(true); - this.parentComponent().parentComponent().mouseHasEnterCardDetails = false; + let parentComponent = this.parentComponent().parentComponent(); + if (parentComponent === null) parentComponent = this.parentComponent(); + parentComponent.showOverlay.set(true); + parentComponent.mouseHasEnterCardDetails = false; this.calculateNextPeak(); Meteor.subscribe('unsaved-edits'); @@ -43,8 +45,8 @@ BlazeComponent.extendComponent({ scrollParentContainer() { const cardPanelWidth = 510; - const bodyBoardComponent = this.parentComponent().parentComponent(); - + let bodyBoardComponent = this.parentComponent().parentComponent(); + if (bodyBoardComponent === null) bodyBoardComponent = this.parentComponent(); const $cardView = this.$(this.firstNode()); const $cardContainer = bodyBoardComponent.$('.js-swimlanes'); const cardContainerScroll = $cardContainer.scrollLeft(); @@ -115,7 +117,9 @@ BlazeComponent.extendComponent({ }, onDestroyed() { - this.parentComponent().parentComponent().showOverlay.set(false); + let parentComponent = this.parentComponent().parentComponent(); + if (parentComponent === null) parentComponent = this.parentComponent(); + parentComponent.showOverlay.set(false); }, events() { @@ -154,8 +158,10 @@ BlazeComponent.extendComponent({ 'click .js-due-date': Popup.open('editCardDueDate'), 'click .js-end-date': Popup.open('editCardEndDate'), 'mouseenter .js-card-details' () { - this.parentComponent().parentComponent().showOverlay.set(true); - this.parentComponent().parentComponent().mouseHasEnterCardDetails = true; + let parentComponent = this.parentComponent().parentComponent(); + if (parentComponent === null) parentComponent = this.parentComponent(); + parentComponent.showOverlay.set(true); + parentComponent.mouseHasEnterCardDetails = true; }, 'click #toggleButton'() { Meteor.call('toggleSystemMessages'); From 04925f7347b7bb1f4384a96e1d56cd2cf3c351e9 Mon Sep 17 00:00:00 2001 From: IgnatzHome Date: Thu, 14 Jun 2018 20:11:29 +0200 Subject: [PATCH 2/5] trying to understand hirachy --- client/components/cards/cardDetails.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 1a8a8bef3..a7b18fc36 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -21,6 +21,10 @@ BlazeComponent.extendComponent({ onCreated() { this.isLoaded = new ReactiveVar(false); + console.log(this.parentComponent()); + console.log(this.parentComponent().parentComponent()); + console.log(JSON.stringify(this.parentComponent())); + console.log(JSON.stringify(this.parentComponent().parentComponent())); let parentComponent = this.parentComponent().parentComponent(); if (parentComponent === null) parentComponent = this.parentComponent(); parentComponent.showOverlay.set(true); From 61ee6cf09fd4829136c598bcfce25b5e522d0097 Mon Sep 17 00:00:00 2001 From: IgnatzHome Date: Thu, 14 Jun 2018 20:26:44 +0200 Subject: [PATCH 3/5] This seems to make more sense. --- client/components/cards/cardDetails.js | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index a7b18fc36..72ed678b2 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -21,14 +21,12 @@ BlazeComponent.extendComponent({ onCreated() { this.isLoaded = new ReactiveVar(false); - console.log(this.parentComponent()); - console.log(this.parentComponent().parentComponent()); - console.log(JSON.stringify(this.parentComponent())); - console.log(JSON.stringify(this.parentComponent().parentComponent())); - let parentComponent = this.parentComponent().parentComponent(); - if (parentComponent === null) parentComponent = this.parentComponent(); - parentComponent.showOverlay.set(true); - parentComponent.mouseHasEnterCardDetails = false; + const boardBody = this.parentComponent().parentComponent(); + //in Miniview parent is Board, not BoardBody. + if (boardBody !== null){ + boardBody.showOverlay.set(true); + boardBody.mouseHasEnterCardDetails = false; + } this.calculateNextPeak(); Meteor.subscribe('unsaved-edits'); @@ -49,8 +47,9 @@ BlazeComponent.extendComponent({ scrollParentContainer() { const cardPanelWidth = 510; - let bodyBoardComponent = this.parentComponent().parentComponent(); - if (bodyBoardComponent === null) bodyBoardComponent = this.parentComponent(); + const bodyBoardComponent = this.parentComponent().parentComponent(); + //On Mobile View Parent is Board, Not Board Body. I cant see how this funciton should work then. + if (bodyBoardComponent === null) return; const $cardView = this.$(this.firstNode()); const $cardContainer = bodyBoardComponent.$('.js-swimlanes'); const cardContainerScroll = $cardContainer.scrollLeft(); @@ -121,8 +120,9 @@ BlazeComponent.extendComponent({ }, onDestroyed() { - let parentComponent = this.parentComponent().parentComponent(); - if (parentComponent === null) parentComponent = this.parentComponent(); + const parentComponent = this.parentComponent().parentComponent(); + //on mobile view parent is Board, not board body. + if (parentComponent === null) return; parentComponent.showOverlay.set(false); }, @@ -176,8 +176,9 @@ BlazeComponent.extendComponent({ 'click .js-due-date': Popup.open('editCardDueDate'), 'click .js-end-date': Popup.open('editCardEndDate'), 'mouseenter .js-card-details' () { - let parentComponent = this.parentComponent().parentComponent(); - if (parentComponent === null) parentComponent = this.parentComponent(); + const parentComponent = this.parentComponent().parentComponent(); + //on mobile view parent is Board, not BoardBody. + if (parentComponent === null) return; parentComponent.showOverlay.set(true); parentComponent.mouseHasEnterCardDetails = true; }, From 8c0d61c4a5587f3fb4f310c971ce7a0863cc6f60 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 14 Jun 2018 22:29:54 +0300 Subject: [PATCH 4/5] v1.06 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af018d46e..5dc76b559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.06 2018-06-14 Wekan release + +This release fixes the following bugs: + +* [Fix CardDetail of Mobile View](https://github.com/wekan/wekan/pull/1701). + +Thanks to GitHub users feuerball11 and xet7 for their contributions. + # v1.05 2018-06-14 Wekan release This release adds the following new features: From 1214af04a9bdaad4390d6f3eb157f5dd430ab48a Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Thu, 14 Jun 2018 22:30:36 +0300 Subject: [PATCH 5/5] v1.06 --- package.json | 2 +- sandstorm-pkgdef.capnp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4da56a02d..15d03fc03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "1.05.0", + "version": "1.06.0", "description": "The open-source Trello-like kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 3c12205ea..5ed6676d3 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 90, + appVersion = 91, # Increment this for every release. - appMarketingVersion = (defaultText = "1.05.0~2018-06-14"), + appMarketingVersion = (defaultText = "1.06.0~2018-06-14"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0,