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

Planning issue for Wiki Discussion GSoC project #1438

Open
aspriya opened this Issue May 29, 2017 · 22 comments

Comments

Projects
None yet
3 participants
@aspriya
Copy link
Collaborator

aspriya commented May 29, 2017

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

  • (#1443) Write two functional tests to check if a wiki page is commentable and if the comment did not save, is there a error flash message appearing. These test names could be something like should create wiki comments and should show error if wiki comment not saved
  • (#1444) make a unit test called should create comments for wiki pages

Phase 1.5 - Questions mini-project

  • (#1453) Make a Question button which opens (in a new window) a form to post a question, using the extraButtons array.
    • plus a function which runs on the element (see documentation for inline-markdown-editor) to add an href to the button leading to /questions/new?tags=____ with some related tags.

Phase 2: Basic commenting interface

Phase 3.1 - Inline commenting

  • Add a migration (like this example) to add a reference column in comments table. This is a string column which contains all the subsection string, and will update if a subsection was edited.
  • Add a setup function for comment button called setupCommentFunction()
  • Building a inline form for commenting using this template
  • Make the comment form submittable (ensure the JavaScript here works)
  • Add a comment button aside of the pencil button using extraButton property for inline-markdown-editor. it should be added to this method

Phase 3.2 - Suggestions

  • List suggestions when view suggestions button is clicked.
  • create two functions to approve and discard suggestions by a valid user.
  • Write tests to check the functionality of approval fucntion and discarding function.

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

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented May 31, 2017

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

This comment has been minimized.

Copy link
Contributor

jywarren commented May 31, 2017

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

This comment has been minimized.

Copy link
Contributor

jywarren commented May 31, 2017

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

This comment has been minimized.

Copy link
Collaborator Author

aspriya commented May 31, 2017

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

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 1, 2017

Good note from #1443 -- (#1444 (comment)) 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

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 1, 2017

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

  • make a Question button which opens (in a new window) a form to post a question, using the extraButtons array
    • plus a function which runs on the element (see documentation for inline-markdown-editor) to add an href to the button leading to /questions/new?tags=____ with some related tags.
    • We can insert the tags using <%= @wiki.tagnames %>, I think -- but let's try this one step at a time!
@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 2, 2017

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

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 2, 2017

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

This comment has been minimized.

Copy link
Collaborator Author

aspriya commented Jun 2, 2017

Oh no! 🤕

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 2, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 2, 2017

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

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 2, 2017

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

This comment has been minimized.

Copy link
Collaborator Author

aspriya commented Jun 3, 2017

Sure, will do @jywarren , thanx a bunch!

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 12, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 12, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 12, 2017

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

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 12, 2017

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

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 19, 2017

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

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

@jywarren

This comment has been minimized.

Copy link
Contributor

jywarren commented Jun 19, 2017

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!

@aspriya aspriya referenced this issue Jul 16, 2017

Merged

Make a seperate tab for comments in wikis #1438 #1539

3 of 3 tasks complete

jywarren added a commit that referenced this issue Jul 23, 2017

Test for checking email notifications on wiki page comments works #1438
… (#1542)

* add codes to verify the comment is attached to the wiki record

* undo Gemfile.lock

* tests to check email notifications on a wiki page comments work

* add test to check delivery of notification emails

* check notification mails work on a wiki page comments

ananyo2012 added a commit that referenced this issue Jul 26, 2017

Make a seperate tab for comments in wikis #1438 (#1539)
* undo Gemfile.lock

* add codes to verify the comment is attached to the wiki record

* create a comment icon within the tab of a wiki page

* add a comment tab and a form to enter comments in a wiki page

* add a test to rendering of comments template with comment=true paramter

* add a number of comments before comment icon

* add test to check rendering of comment template upon comment=true parameter

* add correct tests for checking redering of comments template upon comments=true parameter

* add a different action in comments_controller.rb to render wiki/comments
@ananyo2012

This comment has been minimized.

Copy link
Member

ananyo2012 commented Aug 1, 2017

@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 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

This comment has been minimized.

Copy link
Collaborator Author

aspriya commented Aug 2, 2017

@ananyo2012

This comment has been minimized.

Copy link
Member

ananyo2012 commented Aug 2, 2017

Also have a look at #1554 any try fixing it in the mean time.

icarito added a commit that referenced this issue Aug 25, 2017

@jywarren jywarren added the planning label May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment