This repository was archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 819
registration: redesign email verification page #8554
Merged
justjanne
merged 16 commits into
develop
from
justjanne/feat/21984-registration-email-verification
May 13, 2022
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7c0e684
registration: redesign email verification page
justjanne efafb0d
fix: add copyright header
justjanne 799f050
fix: remove unneeded vestigial code for serverPicker passthrough
justjanne cdfaefd
fix: handle undefined case for requestEmailToken
justjanne 4fefd56
fix: no need to treat constant string as variable
justjanne 06f8854
fix: cleanly split reducer and context
justjanne 7063b4a
Update src/components/structures/auth/header/AuthHeaderModifier.tsx
justjanne 8a6e966
Update src/components/structures/auth/header/AuthHeaderModifier.tsx
justjanne c649de9
fix: implement re-requesting and changing tooltip (as per design)
justjanne d6479ab
fix: correct button width on safari
justjanne 53af757
fix: update i18n
justjanne 056f87c
fix: improve positioning of spinner and tooltip
justjanne 4e07efb
fix: reset tooltip after resending
justjanne aad60a8
fix: correct tooltip positioning
justjanne 12ecc97
fix: update tooltip in-place
justjanne 6d7eef7
fix: add comments to spinner overrides
justjanne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,53 @@ | ||
/* | ||
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_Register_mainContent { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
min-height: 270px; | ||
|
||
p { | ||
font-size: $font-14px; | ||
color: $authpage-primary-color; | ||
|
||
&.secondary { | ||
color: $authpage-secondary-color; | ||
} | ||
} | ||
|
||
> img:first-child { | ||
margin-bottom: 16px; | ||
width: max-content; | ||
} | ||
|
||
.mx_Login_submit { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
.mx_Register_footerActions { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
padding-top: 16px; | ||
margin-top: 16px; | ||
border-top: 1px solid rgba(141, 151, 165, 0.2); | ||
|
||
> * { | ||
flex-basis: content; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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
26 changes: 26 additions & 0 deletions
26
src/components/structures/auth/header/AuthHeaderContext.tsx
This file contains hidden or 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,26 @@ | ||
/* | ||
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 { createContext, Dispatch, ReducerAction, ReducerState } from "react"; | ||
|
||
import type { AuthHeaderReducer } from "./AuthHeaderProvider"; | ||
|
||
interface AuthHeaderContextType { | ||
state: ReducerState<AuthHeaderReducer>; | ||
dispatch: Dispatch<ReducerAction<AuthHeaderReducer>>; | ||
} | ||
|
||
export const AuthHeaderContext = createContext<AuthHeaderContextType>(undefined); |
41 changes: 41 additions & 0 deletions
41
src/components/structures/auth/header/AuthHeaderDisplay.tsx
This file contains hidden or 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. | ||
*/ | ||
|
||
import React, { Fragment, PropsWithChildren, ReactNode, useContext } from "react"; | ||
|
||
import { AuthHeaderContext } from "./AuthHeaderContext"; | ||
|
||
interface Props { | ||
title: ReactNode; | ||
icon?: ReactNode; | ||
serverPicker: ReactNode; | ||
} | ||
|
||
export function AuthHeaderDisplay({ title, icon, serverPicker, children }: PropsWithChildren<Props>) { | ||
const context = useContext(AuthHeaderContext); | ||
if (!context) { | ||
return null; | ||
} | ||
const current = context.state.length ? context.state[0] : null; | ||
return ( | ||
<Fragment> | ||
{ current?.icon ?? icon } | ||
<h2>{ current?.title ?? title }</h2> | ||
{ children } | ||
{ current?.hideServerPicker !== true && serverPicker } | ||
</Fragment> | ||
); | ||
} |
39 changes: 39 additions & 0 deletions
39
src/components/structures/auth/header/AuthHeaderModifier.tsx
This file contains hidden or 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,39 @@ | ||
/* | ||
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 { ReactNode, useContext, useEffect } from "react"; | ||
|
||
import { AuthHeaderContext } from "./AuthHeaderContext"; | ||
import { AuthHeaderActionType } from "./AuthHeaderProvider"; | ||
|
||
interface Props { | ||
title: ReactNode; | ||
icon?: ReactNode; | ||
hideServerPicker?: boolean; | ||
} | ||
t3chguy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export function AuthHeaderModifier(props: Props) { | ||
const context = useContext(AuthHeaderContext); | ||
const dispatch = context ? context.dispatch : null; | ||
useEffect(() => { | ||
if (!dispatch) { | ||
return; | ||
} | ||
dispatch({ type: AuthHeaderActionType.Add, value: props }); | ||
return () => dispatch({ type: AuthHeaderActionType.Remove, value: props }); | ||
}, [props, dispatch]); | ||
return null; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.