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

Add project button in web app #1722

Closed
Roshanjossey opened this issue Dec 10, 2017 · 38 comments
Closed

Add project button in web app #1722

Roshanjossey opened this issue Dec 10, 2017 · 38 comments

Comments

@Roshanjossey
Copy link
Member

🐞 Problem
It's not very easy to add projects to suggestions

🎯 Goal
Make it simple for anyone to add projects to suggestions

💡 Possible solutions
Add a Add project button to web app. On clicking it, open a form to add details about the project. On submitting this form, open a pull request in this project with those changes

📋 Steps to solve the problem

  • Comment below about what you've started working on.
  • Add, commit, push your changes
  • Submit a pull request and add this in comments - Addresses #<put issue number here>
  • Ask for a review in comments section of pull request
  • Celebrate your contribution to this project 🎉
@j-schuster
Copy link

Would like to work on this. Thanks!

@j-schuster
Copy link

Quick question. Seeing that the current project list is hard coded in, want me to make an api that we can post new projects to? We could then just get the project info from there. Or any ideas to add a project:)

@Roshanjossey
Copy link
Member Author

@j-schuster, As I've explained in the issue description, we can use GitHub API to open a pull request when user adds a new project from web app. That way we'll have more control over which project to accept and which to reject (It's not a good idea to take in everything)
Does that make sense?

@j-schuster
Copy link

j-schuster commented Dec 12, 2017 via email

@kjesek
Copy link

kjesek commented Mar 1, 2018

Is this issue still available? I would love to help out!

@NsLib
Copy link

NsLib commented Mar 5, 2018

For now, I think the biggest problem is that the contributors cannot generate the gh-pages.
Can we just use ajax to fetch data from https://github.com/Roshanjossey/first-contributions/blob/master/app/src/components/ProjectList/listOfProjects.js ?
When someone wanna to add a project, they just need to send a pull request. Whenever it's merged into the master branch, it's be displayed on the website.

@karanshrm44
Copy link

open a pull request in this project with those changes....Can You explain me this line more briefly....what kind of feature you want ?

@ghost
Copy link

ghost commented May 12, 2018

Hi @Roshanjossey , Is this fixed or Is help required for this?

@borisyordanov
Copy link

@Roshanjossey What's the status on this?

@Roshanjossey
Copy link
Member Author

@borisyordanov, this is not implemented yet. Feel free to take a stab if you're interested.

@arshadkazmi42
Copy link
Member

arshadkazmi42 commented Aug 9, 2018

@Roshanjossey I am interested in taking this up, if this is still available. But I have not worked on github api before? Can you let me know how or which api to be used for this?

@borisyordanov
Copy link

@arshadkazmi42 Go ahead and take it. Let me know if i can help you though, i've used the Github API quite a bit

@arshadkazmi42
Copy link
Member

@borisyordanov I need to understand how to proceed. So let's say I got input from user. Now for CLI we follow this workflow
Checkout Feature Branch -> Make Changes -> Add -> Commit -> Push -> Create PR
So do I have to follow the same flow? Calling api's for each operation? Or there is some other way?

@borisyordanov
Copy link

borisyordanov commented Aug 9, 2018

@arshadkazmi42 From what i can tell the projects are stored here. You read how to edit files with the Github API here.

I assume you are asking about the Github API, because the project list is a local file and if the app updates it on the fly it will not update its contents in the repo.

I don't know if creating branches for every change is worthwhile. Maybe we can create a branch 'project-additions' and edit the list on it above and merge to master. How do you solve merge conflicts though?

I'm sure it's doable, but IMO it'd make more sense if we set up a database (firebase for example)

@Roshanjossey What do you think?

@arshadkazmi42
Copy link
Member

@borisyordanov Thanks for this info. I will give it a try later today.

@Roshanjossey
Copy link
Member Author

@borisyordanov, You're right.

I was thinking about using pull request API for this. That way we have a control on which projects get added.

How do you solve merge conflicts though?

If it is a pull request, project maintainers can take care of this. We could review it as well.

One thing I'm unsure about is how to take care of authentication.

it'd make more sense if we set up a database

We'll want a backend eventually. It's just, this is not a urgent requirement at the moment. Also, I'm just unable to spend time on this at the moment. We'll definitely build more features in to the web app as more requirements come in.

@borisyordanov
Copy link

One thing I'm unsure about is how to take care of authentication.

We just need a client ID and secret. You can read here how to get them.

Here's an example on how i've used it before:
https://github.com/borisyordanov/github-issues-react/blob/master/src/services/GetIssues.js

@Roshanjossey
Copy link
Member Author

@borisyordanov, Yup. This is what I do for the bot that merges pull requests here.

We have to put those in environmental variables or something. (because it's risky to share it or put it in the code)

@Roshanjossey
Copy link
Member Author

Like, I can read the source of your app and find your client secret and client id. This is dangerous.

@borisyordanov
Copy link

I can read the source of your app and find your client secret and client id. This is dangerous.

100% true. Don't do this on production apps, i simply meant to show whoever ends up doing this how to use the auth tokens to do API calls. The tokens would need to be stored in a more secure manner (like in environment variables like you suggested)

@arshadkazmi42
Copy link
Member

But we don't have a backend right? Then do we need to work on backend first?

@Roshanjossey
Copy link
Member Author

@arshadkazmi42, we don't.

We could do more research on if theres a way to do authentication securely with just front end app. If there's nothing, we can defer this to some time in the future.

@arshadkazmi42
Copy link
Member

@Roshanjossey Ok. I will have a look into it and check whether we have any secure auth in frontend

@Aakash0410
Copy link

I want to get started with these. Can you help me get started with this?

Thank You.

@Roshanjossey
Copy link
Member Author

@Aakash0410, could you please read the comments in this issue thread and ask any questions you have about that.

@deezy136
Copy link

Is this still available?

@arshadkazmi42
Copy link
Member

@deezy136 Yes its available. @Aakash0410 hasn't replied for a long and I am also bit busy.
You can go ahead and work on this.
Read the comments above to check the implementation discussion

@deezy136
Copy link

Ok thank you so much. I will let u know if I run into any problems

@deezy136
Copy link

deezy136 commented Sep 13, 2018 via email

@arshadkazmi42
Copy link
Member

To run this project, you can navigate to app directory using command line and run these commands

npm install
npm start

You can find more details about this here
https://github.com/Roshanjossey/first-contributions/tree/master/app

The project does not depends on IDE, its just needs npm & nodejs in the system.

@deezy136
Copy link

Thank you so much.

@deezy136
Copy link

To run this project, you can navigate to app directory using command line and run these commands

npm install
npm start

You can find more details about this here
https://github.com/Roshanjossey/first-contributions/tree/master/app

The project does not depends on IDE, its just needs npm & nodejs in the system.

where would you like the add project button positioned on the web app.

@deezy136
Copy link

hello there, is there anywhere in particular that you would like the button placed on the web app

@Roshanjossey
Copy link
Member Author

@deezy136, It's not just the button right? We also have to think about the functionality of wiring that up. I'm not sure about how to go about it at the moment. We were putting this issue on hold because of that. Please read through the previous comments in this thread to learn more. It'd be awesome if you could figure out some ways to circumvent problems that we couldn't resolve.

@arshadkazmi42
Copy link
Member

@Roshanjossey why don't we move the projects list from a file to database? Doing that will make it easier for adding a "Add" button

@deezy136
Copy link

I agree with creating a database because it would be easier to pull from a database that can update compared to a local file. In creating the Database are you going to go with the firebase option or some form of sql?

@Roshanjossey
Copy link
Member Author

@arshadkazmi42, Like we discussed earlier, we need to have control over accepting projects that should get added.

Gimme some time to setup a service for this.

@Roshanjossey
Copy link
Member Author

Closing this issue for the moment. We'll create it again for Hacktoberfest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Web app
Awaiting triage
Development

No branches or pull requests

9 participants