From 3f74ee565a8a01662c9eff035c4c64976669b07e Mon Sep 17 00:00:00 2001 From: Noelia Date: Wed, 27 Mar 2024 08:37:28 +0100 Subject: [PATCH] fix(JoinCommunity): Join CTA labelling: Change text and remove existing icon - Change text and remove existing icon. - Removed unnecessary property `loginType` on different files. - Renamed signals to be more accurate with existing requirements. Closes #14098 --- storybook/pages/JoinCommunityViewPage.qml | 22 +------------------ .../pages/JoinPermissionsOverlayPanelPage.qml | 2 +- ui/app/AppLayouts/Chat/ChatLayout.qml | 5 ++--- ui/app/AppLayouts/Chat/views/ChatView.qml | 4 ++-- .../panels/JoinCommunityCenterPanel.qml | 5 ++--- .../panels/JoinPermissionsOverlayPanel.qml | 21 +++++------------- .../Communities/views/JoinCommunityView.qml | 5 ++--- 7 files changed, 15 insertions(+), 49 deletions(-) diff --git a/storybook/pages/JoinCommunityViewPage.qml b/storybook/pages/JoinCommunityViewPage.qml index 62a7d2990b..2b893c2295 100644 --- a/storybook/pages/JoinCommunityViewPage.qml +++ b/storybook/pages/JoinCommunityViewPage.qml @@ -41,7 +41,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, property bool isInvitationPending: true property bool isJoinRequestRejected: false property bool requiresRequest: false - property int loginType: Constants.LoginType.Biometrics property var communityHoldingsModel: PermissionsModel.shortPermissionsModel property var viewOnlyHoldingsModel: PermissionsModel.shortPermissionsModel @@ -117,7 +116,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, joinCommunity: d.joinCommunity accessType: d.accessType isInvitationPending: d.isInvitationPending - loginType: d.loginType // Blur background properties: membersCount: d.membersCount @@ -147,10 +145,7 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, openCreateChat = !openCreateChat } onNotificationButtonClicked: logs.logEvent("JoinCommunityView::onNotificationButtonClicked()") - onRevealAddressClicked: { - logs.logEvent("JoinCommunityView::onRevealAddressClicked()") - openJoinCommunityDialog() - } + onRequestToJoinClicked: logs.logEvent("JoinCommunityView::onRequestToJoinClicked()") onInvitationPendingClicked: logs.logEvent("JoinCommunityView::onInvitationPendingClicked()") } } @@ -280,21 +275,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, onViewAndPostHoldingsModelChanged: d.viewAndPostHoldingsModel = viewAndPostHoldingsModel onModerateHoldingsModelChanged: d.moderateHoldingsModel = moderateHoldingsModel } - - ColumnLayout { - Label { - Layout.fillWidth: true - text: "Login type" - } - - ComboBox { - id: loginTypeComboBox - Layout.fillWidth: true - model: ["Password","Biometrics","Keycard"] - onActivated: d.loginType = currentIndex - Component.onCompleted: currentIndex = d.loginType - } - } } } } diff --git a/storybook/pages/JoinPermissionsOverlayPanelPage.qml b/storybook/pages/JoinPermissionsOverlayPanelPage.qml index d909152daf..68e083da75 100644 --- a/storybook/pages/JoinPermissionsOverlayPanelPage.qml +++ b/storybook/pages/JoinPermissionsOverlayPanelPage.qml @@ -86,7 +86,7 @@ SplitView { viewAndPostHoldingsModel: d.viewAndPostHoldingsModel moderateHoldingsModel: d.moderateHoldingsModel - onRevealAddressClicked: logs.logEvent("JoinPermissionsOverlayPanel::onRevealAddressClicked()") + onRequestToJoinClicked: logs.logEvent("JoinPermissionsOverlayPanel::onRequestToJoinClicked()") onInvitationPendingClicked: logs.logEvent("JoinPermissionsOverlayPanel::onInvitationPendingClicked()") } } diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 4f473ac58b..2ba840e207 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -115,10 +115,9 @@ StackLayout { notificationCount: activityCenterStore.unreadNotificationsCount hasUnseenNotifications: activityCenterStore.hasUnseenNotifications openCreateChat: rootStore.openCreateChat - loginType: root.rootStore.loginType onNotificationButtonClicked: Global.openActivityCenterPopup() onAdHocChatButtonClicked: rootStore.openCloseCreateChatView() - onRevealAddressClicked: { + onRequestToJoinClicked: { Global.openPopup(communityMembershipSetupDialogComponent, { communityId: joinCommunityView.communityId, isInvitationPending: joinCommunityView.isInvitationPending, @@ -186,7 +185,7 @@ StackLayout { onOpenAppSearch: { root.openAppSearch() } - onRevealAddressClicked: { + onRequestToJoinClicked: { Global.openPopup(communityMembershipSetupDialogComponent, { communityId: chatView.communityId, isInvitationPending: root.rootStore.isMyCommunityRequestPending(chatView.communityId), diff --git a/ui/app/AppLayouts/Chat/views/ChatView.qml b/ui/app/AppLayouts/Chat/views/ChatView.qml index 4da02a6d4e..d029e50b31 100644 --- a/ui/app/AppLayouts/Chat/views/ChatView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatView.qml @@ -117,7 +117,7 @@ StatusSectionLayout { signal profileButtonClicked() signal openAppSearch() - signal revealAddressClicked + signal requestToJoinClicked signal invitationPendingClicked Connections { @@ -261,7 +261,7 @@ StatusSectionLayout { requirementsMet: (viewOnlyPermissionsSatisfied && viewOnlyPermissionsModel.count > 0) || (viewAndPostPermissionsSatisfied && viewAndPostPermissionsModel.count > 0) requirementsCheckPending: root.chatContentModule.permissionsCheckOngoing - onRevealAddressClicked: root.revealAddressClicked() + onRequestToJoinClicked: root.requestToJoinClicked() onInvitationPendingClicked: root.invitationPendingClicked() } } diff --git a/ui/app/AppLayouts/Communities/panels/JoinCommunityCenterPanel.qml b/ui/app/AppLayouts/Communities/panels/JoinCommunityCenterPanel.qml index 79e30c4477..6f28559ac1 100644 --- a/ui/app/AppLayouts/Communities/panels/JoinCommunityCenterPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/JoinCommunityCenterPanel.qml @@ -19,7 +19,6 @@ ColumnLayout { property bool isInvitationPending: false property bool isJoinRequestRejected: false property bool requiresRequest: false - property alias loginType: overlayPanel.loginType property bool requirementsMet: true property bool requirementsCheckPending: false @@ -35,7 +34,7 @@ ColumnLayout { property string listUsersText property var messagesModel - signal revealAddressClicked + signal requestToJoinClicked signal invitationPendingClicked spacing: 0 @@ -155,7 +154,7 @@ ColumnLayout { assetsModel: root.assetsModel collectiblesModel: root.collectiblesModel - onRevealAddressClicked: root.revealAddressClicked() + onRequestToJoinClicked: root.requestToJoinClicked() onInvitationPendingClicked: root.invitationPendingClicked() } } diff --git a/ui/app/AppLayouts/Communities/panels/JoinPermissionsOverlayPanel.qml b/ui/app/AppLayouts/Communities/panels/JoinPermissionsOverlayPanel.qml index b254e3bd27..c2c21fb827 100644 --- a/ui/app/AppLayouts/Communities/panels/JoinPermissionsOverlayPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/JoinPermissionsOverlayPanel.qml @@ -30,34 +30,23 @@ Control { property var viewAndPostHoldingsModel property var moderateHoldingsModel property bool showOnlyPanels: false - property int loginType: Constants.LoginType.Password property var assetsModel property var collectiblesModel - signal revealAddressClicked + signal requestToJoinClicked signal invitationPendingClicked QtObject { id: d readonly property string communityRequirementsNotMetText: qsTr("Membership requirements not met") - readonly property string communityRevealAddressText: qsTr("Reveal your address to join") - readonly property string communityRevealAddressWithRequestText: qsTr("Reveal your address and request to join") + readonly property string communityRequestToJoinText: qsTr("Request to join Community") readonly property string communityMembershipRequestPendingText: qsTr("Membership Request Pending...") readonly property string channelRequirementsNotMetText: qsTr("Channel requirements not met") - readonly property string channelRevealAddressText: qsTr("Reveal your address to enter") readonly property string channelMembershipRequestPendingText: qsTr("Channel Membership Request Pending...") readonly property string memberchipRequestRejectedText: qsTr("Membership Request Rejected") - function getInvitationPendingText() { - return root.joinCommunity ? d.communityMembershipRequestPendingText : d.channelMembershipRequestPendingText - } - - function getRevealAddressText() { - return root.joinCommunity ? (root.requiresRequest ? d.communityRevealAddressWithRequestText : d.communityRevealAddressText) : d.channelRevealAddressText - } - function filterPermissions(model) { return !!model && (model.tokenCriteriaMet || !model.isPrivate) } @@ -150,11 +139,11 @@ Control { StatusButton { Layout.alignment: Qt.AlignHCenter visible: !root.showOnlyPanels && !root.isJoinRequestRejected && root.requiresRequest - text: root.isInvitationPending ? d.getInvitationPendingText() : d.getRevealAddressText() - icon.name: root.isInvitationPending ? "" : Constants.authenticationIconByType[root.loginType] + text: root.isInvitationPending ? (root.joinCommunity ? d.communityMembershipRequestPendingText : d.channelMembershipRequestPendingText) + : d.communityRequestToJoinText font.pixelSize: 13 enabled: root.requirementsMet || d.communityPermissionsModel.count === 0 - onClicked: root.isInvitationPending ? root.invitationPendingClicked() : root.revealAddressClicked() + onClicked: root.isInvitationPending ? root.invitationPendingClicked() : root.requestToJoinClicked() } StatusBaseText { diff --git a/ui/app/AppLayouts/Communities/views/JoinCommunityView.qml b/ui/app/AppLayouts/Communities/views/JoinCommunityView.qml index 7abb0dfe87..f2b4bc13c3 100644 --- a/ui/app/AppLayouts/Communities/views/JoinCommunityView.qml +++ b/ui/app/AppLayouts/Communities/views/JoinCommunityView.qml @@ -37,7 +37,6 @@ StatusSectionLayout { property bool requirementsCheckPending: false property bool isJoinRequestRejected: false property bool requiresRequest: false - property alias loginType: joinCommunityCenterPanel.loginType property var communityHoldingsModel property var viewOnlyHoldingsModel @@ -56,7 +55,7 @@ StatusSectionLayout { signal infoButtonClicked signal adHocChatButtonClicked - signal revealAddressClicked + signal requestToJoinClicked signal invitationPendingClicked @@ -146,7 +145,7 @@ StatusSectionLayout { listUsersText: root.listUsersText messagesModel: root.messagesModel - onRevealAddressClicked: root.revealAddressClicked() + onRequestToJoinClicked: root.requestToJoinClicked() onInvitationPendingClicked: root.invitationPendingClicked() }