This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement feedback section for user onboarding list
- Loading branch information
Showing
5 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
res/css/views/user-onboarding/_UserOnboardingFeedback.pcss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
src/components/views/user-onboarding/UserOnboardingFeedback.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters