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

Make a "suggestions" comment type that can be "accepted" by the author #741

Open
2 tasks done
jywarren opened this issue Aug 26, 2016 · 17 comments
Open
2 tasks done
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute
Milestone

Comments

@jywarren
Copy link
Member

jywarren commented Aug 26, 2016

It might reference a specific line in the original note, and once accepted, could then be minimized in the comments section, like:

@ebarry accepted a suggestion from @jywarren 3 days ago

This would be a little like inline comments on commits in Github (example from here)

screenshot 2016-08-26 at 5 15 53 pm


This needs breaking up, but some steps could be:

  • a wiki.replace(before, after) method which searches for before and replaces it with after, unit tested (done!)
  • a wiki.sections method which returns an array of wiki sections split on <p> and other block-level tags (done! we now use Inline Markdown Editor
  • some way to store suggestions that have been made via the above UI button, until they're "accepted" and the wiki.replace(b, a) method is used to enact the suggested change. This may need some thought (see below)

Much related old work here: #1005

@jywarren
Copy link
Member Author

jywarren commented Aug 31, 2016

We might want to reference a line number, but if the post is edited, it could go out of date. Do we need note revisions?

We could note line number, and when there's an edit, we could do something with diff and attach to same line number?

@mathewlippincott
Copy link

this is a fantastic idea. we see in our google docs collaborations that people feel more comfortable with comments and suggestions than direct edits.

@jywarren jywarren modified the milestone: Activity grids Aug 31, 2016
@jywarren jywarren modified the milestones: Rich Wikis, Activity grids Nov 30, 2016
@jywarren jywarren added the break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration label Nov 30, 2016
@steviepubliclab
Copy link
Contributor

I'd like to bump this one up as well for rich wikis.

@jywarren
Copy link
Member Author

We just had this feature merged which is a bit similar -- #2000

Maybe @ViditChitkara would like to try a version of that which proposes a change to a wiki page body text?

[propose:text]This would be the suggestion and [replaces]This would be the replacement[/propose] maybe???

But this would be harder because if you did a small section like [propose:text]the[replaces]bug[/propose], then it would replace all instances of the word the with bug -- not what we want. @ViditChitkara do you have any ideas on how to narrow this a bit?

@jywarren
Copy link
Member Author

Also adding: a way to see the suggestions, both in list mode (just the comments tab of the wiki page, maybe?) and inline (much harder!!)

@jywarren
Copy link
Member Author

We could actually insert the suggestions into the wiki text itself, rather than a comment... but we'd have to record who made the suggestion too. :-/ a tough nut to crack!

@jywarren
Copy link
Member Author

For now, perhaps we could just show the suggested changes in the comments, and show a notice that says there are N suggested changes by X authors at the top of the page.

@ViditChitkara
Copy link
Member

For now, perhaps we could just show the suggested changes in the comments, and show a notice that says there are N suggested changes by X authors at the top of the page.

[propose:text]This would be the suggestion and [replaces]This would be the replacement[/propose] maybe???

That's quite a nice idea! Let's break this feature into the following :-

  • A syntax which could be used to identify the proposed changes and replacements (e.g [propose:text]This would be the suggestion and [replaces]This would be the replacement[/propose] as suggested by @jywarren). The comment body will have something like:-

Vidit is suggesting some changes on this page, "Suggestion" in place of "replacement". The sections to be replace could be viewed here. To accept this suggestion, click here.

The 'here' button would highlight the sections to be replaced along with the suggestions in the body
just like we have here:-
tod-1

  • Smaller suggestions need to be handled in some way.
  • Finally a link with the comments editor which would say something like 'Suggest changes'. This would render the syntax for suggestions in the comment editor

@jywarren @steviepubliclab @mathewlippincott please update this checklist, since this is still raw and needs some refinement. We could then make issues out of the checklist!!

@jywarren
Copy link
Member Author

This sounds good - maybe one more; some filter which, after detecting a proposed replacement, checks if there is more than 1 instance of the proposed before text in the page body. If there's more than one, then the proposal is ambiguous, and the notice could say this and warn that accepting it may result in multiple replacements?

Also, after accepting a replacement, we could show an alert saying "Read over the page to ensure your changes are correct. Click here to revert the change!

The link to revert could be generated similarly to on the Revisions tab of a wiki page. This will make it easy to go back if you've done something out of control :-P 👍

@ViditChitkara
Copy link
Member

Cool! That seems to complete the feature checklist :-+1. I'll be really happy to contribute to this!!!

@jywarren
Copy link
Member Author

amazing! 👍

@grvsachdeva grvsachdeva added help wanted requires help by anyone willing to contribute enhancement explains that the issue is to improve upon one of our existing features labels Mar 25, 2019
@grvsachdeva
Copy link
Member

@ViditChitkara have you started on this one? Thanks!

@ViditChitkara
Copy link
Member

Woah!! This slipped out of my mind!! I guess I hadn't started coding this but was discussed completely. Will start working on this, after I'm through with deprecating the answer related code.

@jywarren
Copy link
Member Author

jywarren commented Mar 25, 2019 via email

@stale stale bot added the stale label Oct 7, 2020
@publiclab publiclab deleted a comment from stale bot Oct 8, 2020
@stale stale bot removed the stale label Oct 8, 2020
@unnati914
Copy link
Contributor

could i work on this, if its available

@daemon1024
Copy link
Member

Thanks @unnati914 for showing interest. We could surely use your help for this :D

This seems like a significant work, So I would suggest you to analyze and breakdown things. Feel free to reach out on chat or in this thread if any issues :)

@unnati914
Copy link
Contributor

sure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute
Projects
None yet
Development

No branches or pull requests

7 participants