publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
956 stars 1.83k forks source link

Planning issue for Wiki Discussion GSoC project #1438

Open aspriya opened 7 years ago

aspriya commented 7 years ago

Why

Wiki pages are web pages that anyone can create or edit. PublicLab use them to collect information, documentation and instructions on projects. At present users can create wikis, edit them and associate tags with them. But users can not add comments to this, can not make suggestions, can not tag a user for a special part in the wiki. Wikis can made more interactive by implementing these features. For this I will use the publiclab/inline-markdown-editor.

Phase 1 - Commenting back-end

Phase 1.5 - Questions mini-project

Phase 2: Basic commenting interface

Phase 3.1 - Inline commenting

Phase 3.2 - Suggestions

Will keep updating this thread as and when things get clearer. Please feel free to provide feedbacks and suggestions.

jywarren commented 7 years ago

I'm thinking some rearranging could make sense so that we don't have to merge in a non-functional comment button before the commenting functionality is ready.

So, what's the first step in getting a commenting form to appear? Let's think through where we'd want to make the form (template here) appear.

Even before that, maybe we want to create a functional test of adding a comment to a wiki page. This could be a good project to break out and make a checklist out of. Comment controller is functionally tested here: https://github.com/publiclab/plots2/blob/master/test/functional/comment_controller_test.rb#L20-L30

Is there anything stopping us from making a comment attached to a wiki page instead of a note? Could we test that out in the comment controller functional test, as a first step?

(The above is copied in from here, but could be used to edit/revise the checklist above.)

Also - thanks for posting this checklist, it looks great!!! Very helpful.

jywarren commented 7 years ago

Also see how Make a table to store comments for a perticuler wiki page may already exist in the comment controller, since comments are attached to nodes and we may not have actually ever prevented them from being made on Wiki nodes, instead of just Note nodes?

jywarren commented 7 years ago

Let's break out the suggestions into its own phase -- that's a lot more complex than just comments, right?

Then let's have the first phase be backend Comments functionality, and the second be Commenting interface (that way the interface comes online only after the backend already works!).

How does that sound? Thanks!!!

aspriya commented 7 years ago

Wow thanks for you feedback @jywarren. Yes phases in that way seems more logical and accurate. Will rearachge the above check list and will start writing tests as you mentioned. Thanks again.

jywarren commented 7 years ago

Good note from #1443 -- (https://github.com/publiclab/plots2/pull/1444#discussion_r119707141) excerpted here:

I think adding regular comments to wiki pages, and making a comments tab to display them, is a good stepping stone on the way to inline comments. Then we can display all comments on the tab, with a later step of making an inline display of those comments that have reference to a specific section. (@aspriya, mayeb this is a really good step to add to your checklist!)

This also resolves one of the items in the checklist of using the same column for all comments. See how @ananyo2012 added an aid column to the comments table here: https://github.com/publiclab/plots2/blob/master/db/migrate/20160616035549_add_aid_to_comments.rb

You could do the same to add a reference to where the comment is supposed to be inserted. This migration could be its own step on the checklist. Would it be a string column containing the entire text of the subsection? And as a sub-checklist-item, would we need to change that reference each time the subsection text is edited, so we never loose track of where the comment is supposed to be inserted?

jywarren commented 7 years ago

I'd also like to suggest a 1.5 "mini phase" which could be:

jywarren commented 7 years ago

If you can add the above "mini phase" in, that'd be great, also I'm adding some links to where relevant code can be found for some of the checklist above.

jywarren commented 7 years ago

Oh noooo! I was doing a big edit of the issue, adding links to relevant lines of code, but then lost it all when the page refreshed! Ughhhhh. Ok, will start over.

aspriya commented 7 years ago

Oh no! :face_with_head_bandage:

jywarren commented 7 years ago

learned my lesson yet again. I'm doing it in smaller chunks now and saving each time.

jywarren commented 7 years ago

Starting to think about documenting your plan not only for yourself and me, but for other people you could recruit to contribute, can you continue fleshing out links to relevant code and documentation in your checklist, trying to think about how it looks to a newcomer? For example, where you reference extraButtons, you might link to the corresponding docs in https://github.com/publiclab/inline-markdown-editor/

jywarren commented 7 years ago

OK! I finished rearranging a bit - even broke out a 2.5 section to separate basic commenting from inline commenting. This means you can tackle the project in smaller pieces and each phase leaves you with something working :-)

Make sense? If there are other places you can add links to code, please do, and perhaps help other students in GSoC organize their own projects a bit in this way!

aspriya commented 7 years ago

Sure, will do @jywarren , thanx a bunch!

jywarren commented 7 years ago

Marked 1.5 as done, great work! If #1453 is ready to merge, you're ready for Phase 2 :-)

jywarren commented 7 years ago

Also, i rearranged to put the test issue first in Phase 2, since it's also linked to the following item.

jywarren commented 7 years ago

Phase 2 will be fun since you'll be able to publish it to the live site pretty soon and ask people to try it out!

jywarren commented 7 years ago

Also added a bit on functional testing the email notifications for wiki comments :-)

jywarren commented 7 years ago

How are things going? I added another small request here: https://github.com/publiclab/inline-markdown-editor/issues/5 which will be a good intro to JavaScript testing too.

Then let's start with phase 2!!! Exciting!

jywarren commented 7 years ago

Now that you have good familiarity with these different systems, i think phase 2 will go quite quickly. Just remember to submit separate PRs for each checklist item!

ananyo2012 commented 7 years ago

@aspriya So we have come the Last Phase of GSoC and the most important part of your Project which includes Inline comments and suggestions feature. I have modified your timeline so that it comes in Phase 3.1 and Phase 3.2. Think of how you can leverage the inline-markdown-editor to implement these features. Also there is an issue https://github.com/publiclab/plots2/issues/1554 where I have assigned you. Please have a look at that. Since this is a big work and may need many modifications I advice you to work in WIP PRs and regularly push your code so that we can quickly discuss all of these features as you work on your code.

aspriya commented 7 years ago

Thanks @ananyo, Yes I'm currently studing the code base of inline-mardown-edito for doing this phase. Once started will send a WIP PR.

On Tue, Aug 1, 2017 at 6:05 PM, Ananyo Maiti notifications@github.com wrote:

@aspriya https://github.com/aspriya So we have come the Last Phase of GSoC and the most important part of your Project which includes Inline comments and suggestions feature. I have modified your timeline so that it comes in Phase 3.1 and Phase 3.2. Think of how you can leverage the inline-markdown-editor to implement these features. Also there is an issue #1554 https://github.com/publiclab/plots2/issues/1554 where I have assigned you. Since this is a big work and may need many modifications I advice you to work in WIP PRs and regularly push your code so that we can quickly discuss all of these.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/1438#issuecomment-319357336, or mute the thread https://github.com/notifications/unsubscribe-auth/ANPGvXlfnuZ6ZmHGIpoRQ3nmdcg_jdMzks5sTxuYgaJpZM4NpiSO .

ananyo2012 commented 7 years ago

Also have a look at https://github.com/publiclab/plots2/issues/1554 any try fixing it in the mean time.