-
Notifications
You must be signed in to change notification settings - Fork 93
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
signup page #262
base: develop
Are you sure you want to change the base?
signup page #262
Conversation
Hello there!👋 Welcome to the project!💖 Thank you and congrats🎉 for opening your first pull request.✨ AnitaB.org is an inclusive community, committed to creating a safe and positive environment.🌸Please adhere to our Code of Conduct and Contribution Guidelines.🙌.We will get back to you as soon as we can.😄 Feel free to join us on AnitaB.org Open Source Zulip Community.💖 We have different streams for each active repository for discussions.✨ Hope you have a great time there!😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aakankshaagr , thank you for submitting the PR. I have left some feedback for you below as well as an alternative to upload the side image. Also, please don't forget to remove all the commented lines that are no longer needed. Let me know if you have any questions 😉.
src/register/Register.jsx
Outdated
<label id="password">Password :</label> | ||
<input | ||
aria-labelledby="password" | ||
className="feilds" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix typo
src/register/Register.jsx
Outdated
className="feilds" | ||
type={isPasswordShown ? "text" : "password"} | ||
name="password" | ||
placeholder="atleast 8 characters" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
placeholder="atleast 8 characters" | |
placeholder="at least 8 characters" |
src/register/Register.jsx
Outdated
<label id="confirmPassword">Confirm Password :</label> | ||
<input | ||
aria-labelledby="confirmPassword" | ||
className="feilds" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
src/register/Register.jsx
Outdated
className="feilds" | ||
type={isPasswordShown ? "text" : "password"} | ||
name="confirmPassword" | ||
placeholder="atleast 8 characters" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although the design shows this as placehloder, IMO it makes more sense if we show re-type password
here instead since this field is not to insert a totally new password.
src/register/Register.jsx
Outdated
<div className="container"> | ||
<div class="row align-items-start"> | ||
<div class="col"> | ||
<img src="src/assets/images/side_image.jpg" alt="background" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using image path and have the image saved inside images folder, you can use the githubusercontent link of an image as it was used on the About.jsx line 12.
Thanks @mtreacy002 !! I have made changes as you suggested. About image I don't know how to get side_image in way suggested by you. Thankfully, somehow it worked and image is displayed. I have made changes in classes naming as there was lot of css getting included with those names. Waiting for your feedback :) !! |
@aakankshaagr , is there any reason you don't make it stretch like the footer? I believe the image in Figma also shows that the container (image+form) is stretchable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aakankshaagr , the build compiled with warnings. Can you try to fix this, please? Thanks
@mtreacy002 On stretching image got doubled and that wasn't looking good. So, as I mentioned earlier ,I felt like only making form stretchable. |
@mtreacy002 route.js got autoformatted and by mistake, I pushed route.js too. While trying to fix that I somehow merged develop.I don't know how to undo this. I tried to rebase and git reset --merge but it is not working. Please suggest some other way to remove this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aakankshaagr , I checked your code changes and it doesn't seem to have major issues. Auto-formatting of routes.jsx seems ok and the merged of develop branch to your pr branch seems to have no impact to the code you're submitting. Although, I do have some feedback for you to work on:
- the build is failing. Below is the screenshot
- the tests are also failing. see this gist for the error warnings.
Can you please fix these errors? Thanks
PS: I have a second thought on the form stretch. The stretching of the register form field seems odd since the fields on the form won't need that bigger input field. I think the form stretch on the bigger screen size should be maximized to up to 75% of the screen width instead to make it reasonable. Perhaps your screenshot above was made with smaller zoom range (~50 - 67%) which is probably not what most of our users would have (~75-125%). So, you can put it back to the way it was IMO 😉.
@mtreacy002 I have removed error warnings. It is also suggesting we should add alt text for the password icon image. What shall I keep as alt text? |
@mtreacy002 hey can you please approve the workfow run in this PR? |
Tests are failing bcz placeholder texts are not matching in tests and register files. So I am changing placeholder texts. @mtreacy002 According to your earlier suggestion password placeholder values isn't suitable for adding in tests. So I am changing them to be the same as label names. Is that fine or I should do vice versa? |
@mtreacy002 All test cases are passed :) |
@mtreacy002 can you please approve the workflow? |
All test cases are passing along with no warnings. @mtreacy002 Can you plz approve the workflow. |
@mtreacy002 please approve the workflow. I have changed the layout when zoom<50% as suggested by you. All test cases have been passed locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aakankshaagr , thank you for the pr and my apology for replying late.
Please check the below feedback.
Plus, can you please keep the Sidebar and the VideoSection from the existing code in your commits. It seems like you've deleted them by accident on this pr.
Thank you beforehand 😉
* Video Section Added * Minor changes in video section
It's fine @mtreacy002 😊. Sure, I will add them again. I am sorry I thought that the VideoSection part was not related to my pr and I added them by mistake. So I removed them. Thanks to other contributors for correcting my mistake.I have added username field and updated tests cases too. Also repositioned error before signup button. Can you please check the changes once again? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work 🙂 just a refactor suggestion: there are a lot of repeated assertions throughout the tests where the only thing that changes are the values you are passing. you could remove a lot of duplicated code by mapping these repeated values with the jest it.each
method. see the docs
const [showTermsModal,setShowTermsModal] = useState(false); | ||
const { isAuth } = useContext(AuthContext); | ||
const [isValidUsername, setIsValidUsername] = useState(true); | ||
const [isValidName, setIsValidName] = useState(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if these are validators, does it make more sense for initial state to be set to false
instead? 🤔 maybe they should only be true
after successful validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkraeher Thank you for reviewing. Values are set so when the user enters the wrong value then display an error. Apart from validating, error message is also handled by this.
src/register/Register.jsx
Outdated
<section className="register"> | ||
<h1>Welcome To Bridge In Tech</h1> | ||
<h4> | ||
Lets start your account setup so you can have access to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets is a typo. should be Let's
expect(screen.getByLabelText("Photo Url :", {selector: "input"})).toBeEmpty(); | ||
expect(screen.getByLabelText("Resume Url :", {selector: "input"})).toBeEmpty(); | ||
expect( | ||
screen.getByLabelText("Username :", { selector: "input" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a lot of weird formatting and line breaks in this file that really decreases the readability of the tests.
import { rest } from "msw"; | ||
import { setupServer } from "msw/node"; | ||
import { | ||
render, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something odd happened with the formatting in this file as well. this negatively affects readability like ☝️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's because prettier is not working properly for me. I guess the code will be readable after running the prettier. I tried hard to correct this even done manually but after saving everything goes back to the same.So it's quite difficult to format tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. do you have prettier extension or any other linter enabled? it is annoying to do it manually but if you do that and have the prettier disabled it shouldn't autoformat when you save
target: { value: "My Name" }, | ||
}); | ||
act(() => { | ||
fireEvent.change(screen.getByPlaceholderText("Username"), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need to use act()
in this test if none of these form input events are asynchronous except for the submit registration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkraeher I guess we need to use act()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this warning seems to have to do with state updates happening asynchronously. this is not really how act
should be used if you check out the docs.
This article also has a really useful explanation of the error and some suggestions on alternative solutions for how to deal with it effectively and eliminate the warning
Description
Developed SignUp Page
Fixes #248
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Checklist:
Code/Quality Assurance Only