Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function SignInEmailForm() {
handleSubmit(onSubmit)().catch((error) => console.error(error));
}}
>
<FormField name={EMAIL} type="email" label="Email" required autoFocus />
<FormField name={EMAIL} type="email" label="NUS email (e.g: e1234567@u.nus.edu)" required autoFocus />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I am sure new user would appreciate this a lot.


<Form.Button
type="submit"
Expand Down
64 changes: 26 additions & 38 deletions frontend/src/components/sign-in-section/sign-in-section.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,47 +15,35 @@
position: relative;
}

.tooltipContainer {
position: relative;
display: inline-block;
.headerInner {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}

.tooltipIcon {
cursor: pointer;
font-weight: bold;
background: #444;
color: #fff;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
margin-left: 8px;
}
.title {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 4px;

.tooltipText {
visibility: hidden;
opacity: 0;
background: #333;
color: #fff;
padding: 7px 16px;
border-radius: 6px;
text-align: left;
position: absolute;
left: 120%;
top: 50%;
transform: translateY(-50%);
white-space: nowrap;
font-size: 0.95rem;
transition: opacity 0.2s;
box-shadow: 0 4px 10px rgba(0,0,0,0.13);
z-index: 10;
@media (min-width: 769px) {
font-size: 1.75rem;
}
}

.helperText {
margin-top: 6px;
font-size: 0.75rem;
color: #666;
text-align: center;
max-width: 260px;
line-height: 1.2;
}

&:hover .tooltipText,
.tooltipIcon:hover + .tooltipText {
visibility: visible;
opacity: 1;
@media (min-width: 769px) {
.helperText {
font-size: 0.8rem;
max-width: none;
}
}
9 changes: 5 additions & 4 deletions frontend/src/components/sign-in-section/sign-in-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ function SignInSection() {
return (
<>
<Modal.Header as={Header} textAlign="center" className={styles.headerRow}>
<span>{title}</span>
<div className={styles.tooltipContainer}>
<span className={styles.tooltipIcon}>i</span>
<span className={styles.tooltipText}>Log in with your NUS email first <br />Link Google account under profile</span>
<div className={styles.headerInner}>
<span className={styles.title}>{title}</span>
<span className={styles.helperText}>
Log in with your NUS email first.<br/>To sign in with Google, link your Gmail under profile.
</span>
</div>
</Modal.Header>
<Modal.Content className={styles.signInSection}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
updateCurrentUserAction,
} from "../../redux/slices/current-user-slice";
import PlaceholderWrapper from "../placeholder-wrapper";
import UserFacebookAuthField from "../user-facebook-auth-field";
// import UserFacebookAuthField from "../user-facebook-auth-field";
import UserGoogleAuthField from "../user-google-auth-field";
import UserPasswordAuthField from "../user-password-auth-field";
import styles from "./user-auth-section.module.scss";
Expand Down Expand Up @@ -109,7 +109,7 @@ function UserAuthSection() {
</Grid.Column>
</Grid.Row>

<Grid.Row>
{/* <Grid.Row>
<Grid.Column
mobile="5"
tablet="5"
Expand Down Expand Up @@ -138,7 +138,7 @@ function UserAuthSection() {
</span>
</UserFacebookAuthField>
</Grid.Column>
</Grid.Row>
</Grid.Row> */}
</Grid>
</PlaceholderWrapper>
</>
Expand Down