From a6a0c6ec7069c1c47ca1471e563717f7d0d95a51 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 6 Apr 2019 21:39:42 -0500 Subject: [PATCH] Remove DAO testing feedback window --- .../resources/i18n/displayStrings.properties | 9 -- .../dao/governance/result/VoteResultView.java | 22 ----- .../windows/DaoTestingFeedbackWindow.java | 89 ------------------- 3 files changed, 120 deletions(-) delete mode 100644 desktop/src/main/java/bisq/desktop/main/overlays/windows/DaoTestingFeedbackWindow.java diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index 0c98012ec9..8892f5ced9 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -675,15 +675,6 @@ tradeFeedbackWindow.msg.part1=We'd love to hear back from you about your experie tradeFeedbackWindow.msg.part2=If you have any questions, or experienced any problems, please get in touch with other users and contributors via the Bisq forum at: tradeFeedbackWindow.msg.part3=Thanks for using Bisq! - -daoTestingFeedbackWindow.title=Thank you for testing the Bisq DAO -daoTestingFeedbackWindow.msg.part1=Can you spare 3 minutes to do a quick survey? We're offering 20 BSQ for completed surveys.\ - \nYour feedback is crucial to ensuring a smooth launch on mainnet. -daoTestingFeedbackWindow.surveyLinkLabel=Do survey -daoTestingFeedbackWindow.msg.part2=Questions, or other issues? Discuss with Bisq users and contributors on the forum: -daoTestingFeedbackWindow.forumLinkLabel=Visit forum -daoTestingFeedbackWindow.msg.part3=Thanks for using Bisq! - portfolio.pending.role=My role portfolio.pending.tradeInformation=Trade information portfolio.pending.remainingTime=Remaining time diff --git a/desktop/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java b/desktop/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java index e4b7249914..6f223d413c 100644 --- a/desktop/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java +++ b/desktop/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java @@ -25,7 +25,6 @@ import bisq.desktop.components.HyperlinkWithIcon; import bisq.desktop.components.TableGroupHeadline; import bisq.desktop.main.dao.governance.PhasesView; import bisq.desktop.main.overlays.popups.Popup; -import bisq.desktop.main.overlays.windows.DaoTestingFeedbackWindow; import bisq.desktop.main.overlays.windows.ProposalResultsWindow; import bisq.desktop.util.FormBuilder; import bisq.desktop.util.GUIUtil; @@ -33,7 +32,6 @@ import bisq.desktop.util.Layout; import bisq.core.btc.wallet.BsqWalletService; import bisq.core.dao.DaoFacade; -import bisq.core.dao.governance.blindvote.BlindVote; import bisq.core.dao.governance.blindvote.MyBlindVoteListService; import bisq.core.dao.governance.param.Param; import bisq.core.dao.governance.period.CycleService; @@ -61,10 +59,8 @@ import bisq.core.dao.state.model.governance.Role; import bisq.core.dao.state.model.governance.RoleProposal; import bisq.core.dao.state.model.governance.Vote; import bisq.core.locale.Res; -import bisq.core.user.DontShowAgainLookup; import bisq.core.util.BsqFormatter; -import bisq.common.UserThread; import bisq.common.util.Utilities; import org.bitcoinj.core.Coin; @@ -109,7 +105,6 @@ import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import static bisq.desktop.util.FormBuilder.addButton; @@ -391,26 +386,9 @@ public class VoteResultView extends ActivatableView implements D }); Collections.reverse(cycleListItemList); - maybeShowDaoTestingFeedbackWindow(); - GUIUtil.setFitToRowsForTableView(cyclesTableView, 25, 28, 6, 6); } - private void maybeShowDaoTestingFeedbackWindow() { - String testingPopupKey = "daoTestingFeedbackPopup"; - if (DontShowAgainLookup.showAgain(testingPopupKey)) { - UserThread.runAfter(() -> { - if (myProposalListService.getList().stream().map(Proposal::getTxId) - .anyMatch(txId -> periodService.isTxInCorrectCycle(txId, daoStateService.getChainHeight())) || - myBlindVoteListService.getMyBlindVoteList().stream().map(BlindVote::getTxId) - .anyMatch(txId -> periodService.isTxInCorrectCycle(txId, daoStateService.getChainHeight()))) - new DaoTestingFeedbackWindow() - .dontShowAgainId(testingPopupKey) - .show(); - }, 4, TimeUnit.SECONDS); - } - } - /////////////////////////////////////////////////////////////////////////////////////////// // Create views: cyclesTableView diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/DaoTestingFeedbackWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/DaoTestingFeedbackWindow.java deleted file mode 100644 index c42e9a7f56..0000000000 --- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/DaoTestingFeedbackWindow.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * This file is part of Bisq. - * - * Bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * Bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with Bisq. If not, see . - */ - -package bisq.desktop.main.overlays.windows; - -import bisq.desktop.components.AutoTooltipLabel; -import bisq.desktop.components.HyperlinkWithIcon; -import bisq.desktop.main.overlays.Overlay; - -import bisq.core.locale.Res; - -import com.google.inject.Inject; - -import javafx.scene.layout.GridPane; -import javafx.scene.layout.Priority; - -import javafx.geometry.HPos; -import javafx.geometry.Insets; - -import lombok.extern.slf4j.Slf4j; - -import static bisq.desktop.util.FormBuilder.addHyperlinkWithIcon; - -@Slf4j -public class DaoTestingFeedbackWindow extends Overlay { - @Inject - public DaoTestingFeedbackWindow() { - type = Type.Confirmation; - } - - @Override - public void show() { - headLine(Res.get("daoTestingFeedbackWindow.title")); - message(Res.get("daoTestingFeedbackWindow.msg.part1")); - super.show(true); - } - - @Override - protected void addMessage() { - super.addMessage(); - - HyperlinkWithIcon survey = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("daoTestingFeedbackWindow.surveyLinkLabel"), - "https://docs.google.com/forms/d/e/1FAIpQLSdS4YRE9Eox3bvuo4oSJJQCm5Yy54ZclKC_ThUt702PeU4rxw/viewform"); - GridPane.setMargin(survey, new Insets(-6, 0, 10, 0)); - - AutoTooltipLabel messageLabel2 = new AutoTooltipLabel(Res.get("daoTestingFeedbackWindow.msg.part2")); - messageLabel2.setMouseTransparent(true); - messageLabel2.setWrapText(true); - GridPane.setHalignment(messageLabel2, HPos.LEFT); - GridPane.setHgrow(messageLabel2, Priority.ALWAYS); - GridPane.setRowIndex(messageLabel2, ++rowIndex); - GridPane.setColumnIndex(messageLabel2, 0); - GridPane.setColumnSpan(messageLabel2, 2); - gridPane.getChildren().add(messageLabel2); - - HyperlinkWithIcon forum = addHyperlinkWithIcon(gridPane, ++rowIndex, Res.get("daoTestingFeedbackWindow.forumLinkLabel"), - "https://bisq.community", 40); - GridPane.setMargin(forum, new Insets(-6, 0, 10, 0)); - - AutoTooltipLabel messageLabel3 = new AutoTooltipLabel(Res.get("daoTestingFeedbackWindow.msg.part3")); - messageLabel3.setMouseTransparent(true); - messageLabel3.setWrapText(true); - GridPane.setHalignment(messageLabel3, HPos.LEFT); - GridPane.setHgrow(messageLabel3, Priority.ALWAYS); - GridPane.setRowIndex(messageLabel3, ++rowIndex); - GridPane.setColumnIndex(messageLabel3, 0); - GridPane.setColumnSpan(messageLabel3, 2); - gridPane.getChildren().add(messageLabel3); - } - - @Override - protected void onShow() { - display(); - } -}