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

Login ui for the website #28

Merged
merged 7 commits into from
Jun 27, 2020
Merged

Conversation

bismitaguha
Copy link
Contributor

@bismitaguha bismitaguha commented Jun 9, 2020

Description

  • Modified login action accordingly
  • Added Login Component
  • Added routing for Login

Fixes #16

Type of Change:

  • Code
  • User Interface

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

Currently requires double click to enter Dashboard Page on successful Login

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings
  • Any dependent changes have been published in downstream modules

@bismitaguha
Copy link
Contributor Author

@abha224 @sidvenu
Errors arising:

  • As registration needs confirmation I have removed any redirect from that component.
  • Login happens successfully on one click, but redirect to dashboard is made on second click.
  • Whenever Login form is submitted a warning is generated: Form submission canceled because the form is not connected

Please clarify these!

@sidvenu
Copy link

sidvenu commented Jun 10, 2020

@bismitaguha the issues are related to each other. When a button is clicked, browsers could interpret it differently to be a submit button (whereas it is a button to run a piece of code, and then use code to navigate away), and thus your onClick and the browser is competing with each other to submit the form.

Try adding type="button" to the button attributes or evt.preventDefault() in the button's onClick function.

@sidvenu
Copy link

sidvenu commented Jun 10, 2020

As we talked about in the weekly session, please do try to give separate PRs for each issue. It's hard to go through 22 files with about 1000 LoC additions. Within a single PR, do break it down into logically separate commits.

And please follow the commit message style guide: https://github.com/anitab-org/mentorship-android/wiki/Commit-Message-Style-Guide. Is it possible for you to change the commit messages to follow the style guide?

Copy link

@sidvenu sidvenu left a comment

Choose a reason for hiding this comment

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

Please do change the commit messages as per the comment above.

@bismitaguha
Copy link
Contributor Author

@sidvenu I was suggested by @Monal5031 to proceed to further issues and rebase later before merging. So I am doing the same. I hope it's fine.

@sidvenu
Copy link

sidvenu commented Jun 10, 2020

@bismitaguha If that is the case, sure, we can use the message style guide while merging. But please do keep the above suggestions in mind for your next PRs 😄.

@bismitaguha
Copy link
Contributor Author

bismitaguha commented Jun 10, 2020

@bismitaguha If that is the case, sure, we can use the message style guide while merging. But please do keep the above suggestions in mind for your next PRs .

I have made separate PRs based on your suggestions in the meeting. I will look into the commit messages. 😊

@sidvenu
Copy link

sidvenu commented Jun 10, 2020

Amazing. Let us know if the above solution to the Form submission canceled because the form is not connected error is working.

@Monal5031
Copy link

@bismitaguha I think there was a miscommunication, I suggested to start working on a separate branch so that would help you save time while the main PR is in review. I didn't meant to add the changes in same PR

@bismitaguha
Copy link
Contributor Author

This is in a separate branch. The previous PR #27. Once the previous one gets merged I will rebase this. I did that same with the previous issue . It was in backend repo. I hope that's fine?? @Monal5031

@Monal5031
Copy link

Ahh okay, by @sidvenu 's comments I thought you made a single PR for different issues. It's okay I guess if the PRs are for different issues just make sure to mark them as WIP with a label or in title.

@sidvenu @abha224 Please let us know if this strategy to save time is okay with you all?

@sidvenu
Copy link

sidvenu commented Jun 10, 2020

@Monal5031 if two issues are heavily dependent on each other that it'll hinder developement of one without the other, then absolutely - we can have a single PR for both the issues.

If that is not the case, I feel separate PRs would be ideal - since it is just good open source practice and it prevents big PRs to a certain extent. What do you think?

@Monal5031
Copy link

Agreed @sidvenu makes total sense

@abha224
Copy link
Contributor

abha224 commented Jun 13, 2020

  • Login happens successfully on one click, but redirect to dashboard is made on second click.
  • Whenever Login form is submitted a warning is generated: Form submission canceled because the form is not connected

@bismitaguha Im not able to reproduce the error? can you provide the steps again?

@@ -28,7 +28,7 @@ class Login extends Component {
})

submitLogin = () => {

console.log("hello")
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this line

Copy link

@sidvenu sidvenu left a comment

Choose a reason for hiding this comment

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

Also, please add new lines to the files you've created in the current PR that doesn't have a new line yet.

package.json Outdated
Comment on lines 46 to 45
"devDependencies": {
"prettier": "2.0.5"
}
Copy link

Choose a reason for hiding this comment

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

Can we move this out of this PR? I've just created an issue - #34 for using prettier. Reason being we may need to format code that is outside the scope of this PR as well.

Comment on lines 22 to 24
// if(localStorage.getItem('token') !== null){
this.props.getInfo()
this.props.getUser()
// }

Copy link

Choose a reason for hiding this comment

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

Comment to be removed?

@bismitaguha bismitaguha requested a review from sidvenu June 22, 2020 13:46
src/components/Register.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
@bismitaguha bismitaguha requested a review from sidvenu June 26, 2020 12:48
@abha224
Copy link
Contributor

abha224 commented Jun 27, 2020

@bismitaguha can you resolve the conflicts?

Add Routing
Add Registration component, actions & reducers
Modify routing
Modify Login action
Modify form validation
@bismitaguha
Copy link
Contributor Author

@abha224 Merge conflicts resolved!
I feel such conflicts will arise in further PRs too.

@abha224 abha224 merged commit 4e0a950 into anitab-org:develop Jun 27, 2020
@abha224 abha224 changed the title [WIP]: Login ui Login ui for the website Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Login UI
4 participants