Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in and Signup pages added #142

Merged
merged 7 commits into from
May 30, 2022
Merged

Log in and Signup pages added #142

merged 7 commits into from
May 30, 2022

Conversation

Siddhesh777
Copy link
Contributor

Issue that this pull request solves

Closes: #117

Proposed changes

Added Login and Signup pages.

Types of changes

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (Documentation content changed)
  • Other (please describe):

Checklist

Put an x in the boxes that apply

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Screenshots

1

2

Please attach the screenshots of the changes made in case of change in user interface

@Siddhesh777
Copy link
Contributor Author

hey @praveenscience
I have made Login and Signup Pages
Now we can successfully turn to Firebase authentication.
If you think there is a need to change UI, you can create issue for that.

I have added Login and Signup Pages.
I also used react-routers to load them.

@praveenscience praveenscience added GSSoC22 GirlScript Summer of Code 2022 Level2 Okay, this is a bit ... good work? labels Apr 6, 2022
Copy link
Member

@praveenscience praveenscience left a comment

Choose a reason for hiding this comment

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

Excellent, but can we please please have the code formatted with Prettier & ES Lint? 😁 We're using this config: My Visual Studio Code Settings

@Siddhesh777
Copy link
Contributor Author

yeah sure @praveenscience

src/App.js Outdated

export default function App() {
return (
<>
Copy link
Member

Choose a reason for hiding this comment

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

No need of this. :)

@@ -15,6 +16,9 @@ const Header = ({ ChangePage, CurrentPage, Resume }) => {
/>
))}
</ul>
<Link to="/login" className="btn btn-primary btn-sm col-1">
Login
Copy link
Member

Choose a reason for hiding this comment

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

Prettier 2 space indentation, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I didn't git this one @praveenscience

@@ -0,0 +1,41 @@
import React from "react";
import "./index.css";
Copy link
Member

Choose a reason for hiding this comment

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

Convert to SCSS, and add it there.

@Siddhesh777
Copy link
Contributor Author

@praveenscience
I think I have made all the requested changes.
If there's more, let me know.

@praveenscience
Copy link
Member

There are still couple of changes, I'll take care of them... Will do a check and merge this, alright?

@Siddhesh777
Copy link
Contributor Author

Yeah fine @praveenscience
I will raise issue for implementing firebase auth ,fine ?

@praveenscience
Copy link
Member

@Siddhesh777 yea, go for it.

@Siddhesh777
Copy link
Contributor Author

hey @praveenscience
It will be great help if you add level3 label
As I have created two react pages with good css and also linked them in projects with react routers.
Still its totally your wish😅

@praveenscience praveenscience added Level3 Yep, it's too tough! and removed Level2 Okay, this is a bit ... good work? labels Apr 8, 2022
@Siddhesh777
Copy link
Contributor Author

Siddhesh777 commented Apr 9, 2022

hey @praveenscience and @code-reaper08
Can you please merge this PR?
If there are any changes supposed to be made please let me know.
I want to work on issues #145 #144 and #143 those need this PR to be merged.
If any changes are required, let me know,I will be more than happy to resolve them 😁

@praveenscience
Copy link
Member

Yea, I am giving priorities to this before merging any....

@AbhipsaGuru1012
Copy link
Collaborator

hey @praveenscience and @code-reaper08 Can you please merge this PR? If there are any changes supposed to be made please let me know. I want to work on issues #145 #144 and #143 those need this PR to be merged. If any changes are required, let me know,I will be more than happy to resolve them 😁

@Siddhesh777 can you please add validations to the forms if possible?

@Siddhesh777
Copy link
Contributor Author

Siddhesh777 commented Apr 10, 2022

hey @AbhipsaGuru1012
I have created a new issue for the validation.
Else It would have been very tedious work for me.

@AbhipsaGuru1012
Copy link
Collaborator

hey @AbhipsaGuru1012 I have created a new issue for the validation. Else It would have been very tedious work for me.

Okay, you can take that up in the authentication issue that you have created.

rezume
You can add this type of custom validation

@Siddhesh777
Copy link
Contributor Author

hey @AbhipsaGuru1012
I don't know how to validate the form.
We can create a issue for it .

@code-reaper08
Copy link
Collaborator

hey @AbhipsaGuru1012 I don't know how to validate the form. We can create a issue for it .

You can work on form validation in this PR itself to make it a complete thing, since form validation is a pretty small piece of work.

What you say @praveenscience @AbhipsaGuru1012 ?

@Siddhesh777
Copy link
Contributor Author

hey @AbhipsaGuru1012 @code-reaper08
I have added validation too.
Please review.

2

@AbhipsaGuru1012
Copy link
Collaborator

hey @AbhipsaGuru1012 @code-reaper08 I have added validation too. Please review.

2

@Siddhesh777 please add the validations in the Sign-Up page as well. Everything else looks fine!

@Siddhesh777
Copy link
Contributor Author

Siddhesh777 commented Apr 11, 2022

hey @praveenscience @AbhipsaGuru1012 @code-reaper08
Added validation in signup page too.

1

Comment on lines 6 to 33
const [email,setEmail] = React.useState("");
const [password,setPassword] = React.useState("");
const [confirmPassword,setConfirmPassword] = React.useState("");
const [emailError, setEmailError] = React.useState("");
const [passwordError, setPasswordError] = React.useState("");
const [confirmPasswordError, setConfirmPasswordError] = React.useState("");

function handleSubmit() {
if (email === "") {
setEmailError("Required");
} else {
setEmailError("");
}
if (password === "") {
setPasswordError("No password provided");
}
else {
setPasswordError("");
}
if(confirmPassword === "")
{
setConfirmPasswordError("No confirm password provided");
}
else
{
setConfirmPasswordError("");
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can we have one form? And where's the prettier formatting?

Comment on lines 40 to 75
className="inputEmail"
type="email"
placeholder="Email"
autocomplete="off"
onChange={(e)=> setEmail(e.target.value)}
required
/>
<div className="alert">{emailError}</div>
</div>
<div>
<input
className="input"
className="inputPassword"
type="password"
placeholder="Password"
autocomplete="off"
onChange={(e)=>setPassword(e.target.value)}
required
/>
<div className="alert">{passwordError}</div>
</div>
<div>
<input
className="input"
className="inputPassword"
type="password"
placeholder="Confirm Password"
autocomplete="off"
onChange ={(e)=> setConfirmPassword(e.target.value)}
required
/>
<div className="alert">{confirmPasswordError}</div>
</div>
<div className="Submit-form">
<div>
<input className="inputSubmit" type="submit" value="Signup" />
<input className="inputSubmit" type="submit" value="Signup" onClick={handleSubmit}/>
</div>
<div>
Copy link
Member

Choose a reason for hiding this comment

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

Don't use classless divs and also can we automate this instead of repeating?

Comment on lines 32 to 54
.alert {
color: red;
text-align: left;
margin: 0px;
margin-left: 12rem;
padding: 0px;
}

.inputEmail {
margin-bottom: 0px;
border-radius: 10px;
outline-width: 0;
width: 350px;
padding: 0.4rem;
}
.inputPassword {
margin-bottom: 0px;
border-radius: 10px;
outline-width: 0;
width: 350px;
padding: 0.4rem;
margin-top: 20px;
}
Copy link
Member

Choose a reason for hiding this comment

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

We're using CSS. Make sure the entire code is less than 6 lines.

@Siddhesh777
Copy link
Contributor Author

@praveenscience
Did the changes.
Please review.

@@ -38,7 +38,7 @@ const App = () => {
const SetSection = (Section, Content) => {
setAppState({
...appState,
Resume: { ...appState.Resume, [Section]: Content }
Resume: { ...appState.Resume, [Section]: Content },
Copy link
Member

Choose a reason for hiding this comment

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

Configure prettier to not have trailing commas.

Comment on lines 53 to 57
Set: !appState.Resume.About.ProfilePicture.Set,
},
},
},
});
Copy link
Member

Choose a reason for hiding this comment

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

Configure prettier to not have trailing commas.

Comment on lines 71 to 74
ProfileImage: reader.result,
},
},
},
Copy link
Member

Choose a reason for hiding this comment

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

Configure prettier to not have trailing commas.


const Header = ({ ChangePage, CurrentPage, Resume }) => {
return (
<nav className="navbar navbar-expand navbar-dark justify-content-between rezume-header">
<span className="navbar-brand mb-0 h1 col-1">Rezume</span>
<ul className="navbar-nav">
{Object.keys(Resume).map(NavItem => (
{Object.keys(Resume).map((NavItem) => (
Copy link
Member

Choose a reason for hiding this comment

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

Configure prettier to not have extra parentheses.

Comment on lines +13 to +15
<Route exact path="/" element={<App />}></Route>
<Route path="/login" element={<Login />}></Route>
<Route path="/signup" element={<Signup />}></Route>
Copy link
Member

Choose a reason for hiding this comment

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

Can we use component instead of element and self close the <Route />?

Comment on lines +33 to +47
.inputEmail {
margin-bottom: 0px;
border-radius: 10px;
outline-width: 0;
width: 350px;
padding: 0.4rem;
}
.inputPassword {
margin-bottom: 0px;
border-radius: 10px;
outline-width: 0;
width: 350px;
padding: 0.4rem;
margin-top: 20px;
}
Copy link
Member

Choose a reason for hiding this comment

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

Better CSS?

Comment on lines +9 to +14
margin-left: 1rem;
border-radius: 10px;
width: 100px;
outline-width: 0;
margin-right: 20px;
margin-top: 20px;
Copy link
Member

Choose a reason for hiding this comment

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

Better and concise CSS?

Comment on lines +1 to +9
.loginform {
background-color: #003100;
justify-content: center;
padding: 2rem;
text-align: center;
align-items: center;
height: 400px;
margin: 10rem;
}
Copy link
Member

Choose a reason for hiding this comment

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

Put the SCSS in the right directory.

@@ -0,0 +1,73 @@
import React from "react";
import "./index.scss";
Copy link
Member

Choose a reason for hiding this comment

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

Put the SCSS in the right directory and do not import it this way.

@@ -0,0 +1,58 @@
import React from "react";
import "./index.scss";
Copy link
Member

Choose a reason for hiding this comment

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

Put the SCSS in the right directory and do not import it this way.

@Siddhesh777
Copy link
Contributor Author

hey @praveenscience
Can you please merge the PR?
I want to contribute on some more functionalities.

@Siddhesh777
Copy link
Contributor Author

hey @praveenscience ?

@praveenscience praveenscience merged commit 560967f into CatsInTech:master May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSSoC22 GirlScript Summer of Code 2022 Level3 Yep, it's too tough!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Title: Add Login and Signup Button
4 participants