Avoid hardcoding branding in user onboarding (#9206)
* Avoid hardcoding branding in user onboarding * Make spotlight test more reliable
This commit is contained in:
parent
ef0ba77f14
commit
e8eefeb937
6 changed files with 52 additions and 37 deletions
|
@ -32,10 +32,14 @@ export function UserOnboardingFeedback() {
|
|||
<div className="mx_UserOnboardingFeedback">
|
||||
<div className="mx_UserOnboardingFeedback_content">
|
||||
<Heading size="h4" className="mx_UserOnboardingFeedback_title">
|
||||
{ _t("How are you finding Element so far?") }
|
||||
{ _t("How are you finding %(brand)s so far?", {
|
||||
brand: SdkConfig.get("brand"),
|
||||
}) }
|
||||
</Heading>
|
||||
<div className="mx_UserOnboardingFeedback_text">
|
||||
{ _t("We’d appreciate any feedback on how you’re finding Element.") }
|
||||
{ _t("We’d appreciate any feedback on how you’re finding %(brand)s.", {
|
||||
brand: SdkConfig.get("brand"),
|
||||
}) }
|
||||
</div>
|
||||
</div>
|
||||
<AccessibleButton
|
||||
|
|
|
@ -62,7 +62,7 @@ export function UserOnboardingList({ completedTasks, waitingTasks }: Props) {
|
|||
</div>
|
||||
<ol className="mx_UserOnboardingList_list">
|
||||
{ tasks.map(([task, completed]) => (
|
||||
<UserOnboardingTask key={task.title} completed={completed} task={task} />
|
||||
<UserOnboardingTask key={task.id} completed={completed} task={task} />
|
||||
)) }
|
||||
</ol>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,9 @@ interface Props {
|
|||
}
|
||||
|
||||
export function UserOnboardingTask({ task, completed = false }: Props) {
|
||||
const title = typeof task.title === "function" ? task.title() : task.title;
|
||||
const description = typeof task.description === "function" ? task.description() : task.description;
|
||||
|
||||
return (
|
||||
<li className={classNames("mx_UserOnboardingTask", {
|
||||
"mx_UserOnboardingTask_completed": completed,
|
||||
|
@ -42,10 +45,10 @@ export function UserOnboardingTask({ task, completed = false }: Props) {
|
|||
id={`mx_UserOnboardingTask_${task.id}`}
|
||||
className="mx_UserOnboardingTask_content">
|
||||
<Heading size="h4" className="mx_UserOnboardingTask_title">
|
||||
{ task.title }
|
||||
{ title }
|
||||
</Heading>
|
||||
<div className="mx_UserOnboardingTask_description">
|
||||
{ task.description }
|
||||
{ description }
|
||||
</div>
|
||||
</div>
|
||||
{ task.action && (!task.action.hideOnComplete || !completed) && (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue