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

Refactor Fix #80

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Refactor Fix #80

wants to merge 6 commits into from

Conversation

vngarg
Copy link

@vngarg vngarg commented Mar 6, 2020

I had refactored the code and tried to remove the prolems..
It closes the issue #68

@netlify
Copy link

netlify bot commented Mar 6, 2020

Deploy preview for footsteps-app ready!

Built with commit 715d9d6

https://deploy-preview-80--footsteps-app.netlify.com

@xlogix xlogix requested a review from D3vd March 6, 2020 12:32
@xlogix xlogix self-assigned this Mar 6, 2020
@xlogix xlogix added the gssoc20 For GSSoC Contributions label Mar 6, 2020
@xlogix
Copy link
Member

xlogix commented Mar 6, 2020

There's only one check left now. You can do it! @R3l3ntl3ss What do you think of this PR? There is a massive change in the structure of the project.

@xlogix xlogix removed their assignment Mar 6, 2020
@xlogix xlogix self-requested a review March 6, 2020 12:34
@vngarg
Copy link
Author

vngarg commented Mar 6, 2020

There's only one check left now. You can do it! @R3l3ntl3ss What do you think of this PR? There is a massive change in the structure of the project.

Please have a look at the problem and help me with this 🤠...
I had tried alot 😔

@vngarg
Copy link
Author

vngarg commented Mar 8, 2020

@xlogix @R3l3ntl3ss Here it is showing that this PR has conflicts but I don't have an option to resolve them. The option for resolving the commits is not available. Why is this so and how can I resolve the commits ?

@xlogix
Copy link
Member

xlogix commented Mar 8, 2020

Hey @vngarg, you'll have to resolve it using the cmd line.
Git Cmd

@vngarg
Copy link
Author

vngarg commented Mar 8, 2020

@xlogix Actually, I had changed the location of these files in this PR.
So this location does'nt exist on my branch and so no conflicts are there on my forked repo.
I'm a bit confused with this ?

@xlogix
Copy link
Member

xlogix commented Mar 8, 2020

I understand that. But, right now it will show it as conflicts until you merge the master branch. Slack

@vngarg
Copy link
Author

vngarg commented Mar 8, 2020

I understand that. But, right now it will show it as conflicts until you merge the master branch. Slack

@xlogix I really don't have any idea as to what should I do now ??

@vngarg
Copy link
Author

vngarg commented Mar 8, 2020

I understand that. But, right now it will show it as conflicts until you merge the master branch. Slack

@xlogix sir conflicts are continuously increasing, please merge this PR now ??

Copy link
Member

@D3vd D3vd left a comment

Choose a reason for hiding this comment

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

Hey @vngarg. Did you perform tests for all the files that you made changes to?
I am getting this error while creating a path.
Screenshot from 2020-03-09 07-11-45

Please test all your changes before you create a pull request. Since you are changing a lot of files please perform tests for the whole app and ensure nothing is broken.

Also, I see that you have broken down the components to stateful and stateless folders. Are you sure we need this? When we created the app we structured the components based on the pages on the app. Could you explain why the approach you have taken would be better?

Thanks for your contribution.

@D3vd
Copy link
Member

D3vd commented Mar 9, 2020

@prajwal714 Since you created the issue, could you explain why this approach would be better for us?

@vngarg
Copy link
Author

vngarg commented Mar 9, 2020

Hey @vngarg. Did you perform tests for all the files that you made changes to?
I am getting this error while creating a path.
Screenshot from 2020-03-09 07-11-45

Please test all your changes before you create a pull request. Since you are changing a lot of files please perform tests for the whole app and ensure nothing is broken.

Also, I see that you have broken down the components to stateful and stateless folders. Are you sure we need this? When we created the app we structured the components based on the pages on the app. Could you explain why the approach you have taken would be better?

Thanks for your contribution.

Sorry, some of the tests might have been left untested ....
I'll test all of them once again ...
Again sorry for my mistake ..

@prajwal714
Copy link
Contributor

@prajwal714 Since you created the issue, could you explain why this approach would be better for us?

There are several redundant components in the files, which can be reused if they are broken down into separate components. Also, it gives the project a unified structure since the components will be reused in other future pages as well. Refactoring the code was necessary else it would eventually lead too a spaghetti codebase. @xlogix @R3l3ntl3ss what we can do for now is instead of completely changing the structure proceed part wise, modularizing each page first. It will lead to less conflicts and the transition would be smooth.

@D3vd
Copy link
Member

D3vd commented Mar 10, 2020

I totally agree with that. But do we really need to categorize the components based on the State of the component? Right now the components are arranged based on their function and page, I am not sure if changing up that is necessary.

@xlogix
Copy link
Member

xlogix commented Mar 10, 2020

I agree with @R3l3ntl3ss on keeping components based on their page/function. This helps to navigate the project easily.

@xlogix
Copy link
Member

xlogix commented Mar 10, 2020

@prajwal714 Yeah, we should proceed page-wise. Modularising the components as we encounter them. @vngarg Are you okay with that? You can raise pull requests each time you modularise. I hope we can complete the whole transition in a few days?

@vngarg
Copy link
Author

vngarg commented Mar 10, 2020

@prajwal714 Yeah, we should proceed page-wise. Modularising the components as we encounter them. @vngarg Are you okay with that? You can raise pull requests each time you modularise. I hope we can complete the whole transition in a few days?

@xlogix @R3l3ntl3ss @prajwal714 I don't have any problem with this ....
But Actually I don't have an idea what you all are talking ...
And as this PR has became too complicated so I too am in favour of your decision ...
But please explain me that what I have to do if we proceed according to you

Copy link
Collaborator

@tarun-nagpal-github tarun-nagpal-github left a comment

Choose a reason for hiding this comment

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

Added some review comments on the files.

err_msg = "Please fill the path details"
return false
} else if (footstep.footsteps.length < 1) {
err_msg = "Please add a few footsteps. Footsteps can not be empty."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets put error messages in a separate file and import them as a CONST.

It will help us manage the errors at a single place.

noContent = footsteps => {
let valid = false

for (var i = 0; i < footsteps.length; i++) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Avoid using var. It leads to memory leak issues. use let

for (let i = 0; i < footsteps.length; i++) {

<img
className={styles.menuProfileImg}
className={Menustyles.menuProfileImg}
src={user.profile_pic}
alt=""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a alt property like "Profile Picture"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc20 For GSSoC Contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants