Implement feedback section for user onboarding list (#9090)
parent
d5db131eef
commit
91a24c411b
|
@ -324,6 +324,7 @@
|
||||||
@import "./views/toasts/_IncomingCallToast.pcss";
|
@import "./views/toasts/_IncomingCallToast.pcss";
|
||||||
@import "./views/toasts/_NonUrgentEchoFailureToast.pcss";
|
@import "./views/toasts/_NonUrgentEchoFailureToast.pcss";
|
||||||
@import "./views/typography/_Heading.pcss";
|
@import "./views/typography/_Heading.pcss";
|
||||||
|
@import "./views/user-onboarding/_UserOnboardingFeedback.pcss";
|
||||||
@import "./views/user-onboarding/_UserOnboardingHeader.pcss";
|
@import "./views/user-onboarding/_UserOnboardingHeader.pcss";
|
||||||
@import "./views/user-onboarding/_UserOnboardingList.pcss";
|
@import "./views/user-onboarding/_UserOnboardingList.pcss";
|
||||||
@import "./views/user-onboarding/_UserOnboardingPage.pcss";
|
@import "./views/user-onboarding/_UserOnboardingPage.pcss";
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.mx_UserOnboardingFeedback {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
padding: $spacing-32;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: $system;
|
||||||
|
gap: $spacing-64;
|
||||||
|
|
||||||
|
.mx_UserOnboardingFeedback_content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-right: auto;
|
||||||
|
gap: 6px;
|
||||||
|
|
||||||
|
.mx_UserOnboardingFeedback_text {
|
||||||
|
color: $secondary-content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_UserOnboardingFeedback_action.mx_AccessibleButton {
|
||||||
|
background: transparent;
|
||||||
|
min-width: 180px;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
import { _t } from "../../../languageHandler";
|
||||||
|
import Modal from "../../../Modal";
|
||||||
|
import SdkConfig from "../../../SdkConfig";
|
||||||
|
import AccessibleButton from "../../views/elements/AccessibleButton";
|
||||||
|
import Heading from "../../views/typography/Heading";
|
||||||
|
import FeedbackDialog from "../dialogs/FeedbackDialog";
|
||||||
|
|
||||||
|
export function UserOnboardingFeedback() {
|
||||||
|
if (!SdkConfig.get().bug_report_endpoint_url) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="mx_UserOnboardingFeedback">
|
||||||
|
<div className="mx_UserOnboardingFeedback_content">
|
||||||
|
<Heading size="h4" className="mx_UserOnboardingFeedback_title">
|
||||||
|
{ _t("How are you finding Element so far?") }
|
||||||
|
</Heading>
|
||||||
|
<div className="mx_UserOnboardingFeedback_text">
|
||||||
|
{ _t("We’d appreciate any feedback on how you’re finding Element.") }
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<AccessibleButton
|
||||||
|
kind="primary_outline"
|
||||||
|
className="mx_UserOnboardingFeedback_action"
|
||||||
|
onClick={() => {
|
||||||
|
Modal.createDialog(FeedbackDialog, {
|
||||||
|
feature: "use-case-selection",
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{ _t("Feedback") }
|
||||||
|
</AccessibleButton>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
|
@ -22,6 +22,7 @@ import { _t } from "../../../languageHandler";
|
||||||
import SdkConfig from "../../../SdkConfig";
|
import SdkConfig from "../../../SdkConfig";
|
||||||
import ProgressBar from "../../views/elements/ProgressBar";
|
import ProgressBar from "../../views/elements/ProgressBar";
|
||||||
import Heading from "../../views/typography/Heading";
|
import Heading from "../../views/typography/Heading";
|
||||||
|
import { UserOnboardingFeedback } from "./UserOnboardingFeedback";
|
||||||
import { UserOnboardingTask } from "./UserOnboardingTask";
|
import { UserOnboardingTask } from "./UserOnboardingTask";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -55,6 +56,9 @@ export function UserOnboardingList({ completedTasks, waitingTasks }: Props) {
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_UserOnboardingList_progress">
|
<div className="mx_UserOnboardingList_progress">
|
||||||
<ProgressBar value={completed} max={total} animated />
|
<ProgressBar value={completed} max={total} animated />
|
||||||
|
{ waiting === 0 && (
|
||||||
|
<UserOnboardingFeedback />
|
||||||
|
) }
|
||||||
</div>
|
</div>
|
||||||
<ol className="mx_UserOnboardingList_list">
|
<ol className="mx_UserOnboardingList_list">
|
||||||
{ tasks.map(([task, completed]) => (
|
{ tasks.map(([task, completed]) => (
|
||||||
|
|
|
@ -1147,6 +1147,9 @@
|
||||||
"Anchor": "Anchor",
|
"Anchor": "Anchor",
|
||||||
"Headphones": "Headphones",
|
"Headphones": "Headphones",
|
||||||
"Folder": "Folder",
|
"Folder": "Folder",
|
||||||
|
"How are you finding Element so far?": "How are you finding Element so far?",
|
||||||
|
"We’d appreciate any feedback on how you’re finding Element.": "We’d appreciate any feedback on how you’re finding Element.",
|
||||||
|
"Feedback": "Feedback",
|
||||||
"Secure messaging for friends and family": "Secure messaging for friends and family",
|
"Secure messaging for friends and family": "Secure messaging for friends and family",
|
||||||
"With free end-to-end encrypted messaging, and unlimited voice and video calls, %(brand)s is a great way to stay in touch.": "With free end-to-end encrypted messaging, and unlimited voice and video calls, %(brand)s is a great way to stay in touch.",
|
"With free end-to-end encrypted messaging, and unlimited voice and video calls, %(brand)s is a great way to stay in touch.": "With free end-to-end encrypted messaging, and unlimited voice and video calls, %(brand)s is a great way to stay in touch.",
|
||||||
"Start your first chat": "Start your first chat",
|
"Start your first chat": "Start your first chat",
|
||||||
|
@ -2584,7 +2587,6 @@
|
||||||
"Feedback sent": "Feedback sent",
|
"Feedback sent": "Feedback sent",
|
||||||
"Comment": "Comment",
|
"Comment": "Comment",
|
||||||
"Your platform and username will be noted to help us use your feedback as much as we can.": "Your platform and username will be noted to help us use your feedback as much as we can.",
|
"Your platform and username will be noted to help us use your feedback as much as we can.": "Your platform and username will be noted to help us use your feedback as much as we can.",
|
||||||
"Feedback": "Feedback",
|
|
||||||
"You may contact me if you want to follow up or to let me test out upcoming ideas": "You may contact me if you want to follow up or to let me test out upcoming ideas",
|
"You may contact me if you want to follow up or to let me test out upcoming ideas": "You may contact me if you want to follow up or to let me test out upcoming ideas",
|
||||||
"PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.": "PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.",
|
"PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.": "PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.",
|
||||||
"Report a bug": "Report a bug",
|
"Report a bug": "Report a bug",
|
||||||
|
|
Loading…
Reference in New Issue