probot / ideas

Share ideas for new GitHub Apps built with Probot
95 stars 48 forks source link

Allow sections of OP text to to be edited collaboratively #62

Open patcon opened 6 years ago

patcon commented 6 years ago

Here are some statements -- :mag: facts, :heart: feelings, and :bulb: ideas -- related to this bot premise:

  1. :mag: Only the original poster (OP) and repo admins can update the OP content.
  2. :mag: Reaction emoji can be used by any issue participant.
  3. :mag: Reaction emoji are not [currently] available as "activity" events in GitHub systems.
  4. :heart: I feel that the OP content area is prime real estate.
  5. :heart: I feel that the OP content area is put to great use when a continuous updated Summary section is provided, particularly for lengthy discussions.
  6. :heart: I feel that a single user creating a summary helps many others to use their time more effectively.
  7. :heart: I feel that OP content area should be more of a collaborative space.
  8. :heart: I feel that a more collaborative space would allow burden of fostering helpful issues to be more shared amongst participants.
  9. :heart: I feel that any participant in an issue should be able to update the summary
  10. :heart: I feel that there should be a human performing a sanity "check" before allowing a summary to be updated by someone.
  11. :heart: I feel that the OP or repo admin may need to have a say in whether a Summary is accepted.
  12. :heart: I feel that creating collaborative editing of OP content will allow many emergent tactics to evolve, and allow community care work to be more granular -- more types of roles in maintenance space! :tada:
  13. :bulb: A user should be able to use a specific comment syntax to suggest an addition/update of a Summary section at the bottom of OP content.
  14. :bulb: The OP or repo admin (ie. anyone with ability to edit others' comments) should be able to :+1: the comment to accept the suggestion.
  15. :bulb: A syntax for search/replacing Summary section text should also be possible to allow shorthand, and skipping necessity to reproduce potentially complex formatting.

Curious about any feedback or suggestions on this idea! Thanks for your attention :heart:


Collaborative Summary

There is now a demo in the comments below!!! :tada: :taco: :tada:

patcon commented 6 years ago

Hey, leaving an example of how this could hypothetically work. Check it out! (Also, feel free to :+1: for FULL DEMO EFFECT :slightly_smiling_face: )


Summary Update

There is now a demo in the comments below!!! :tada: :taco: :tada:

patcon commented 6 years ago

:heart: I feel inspired by the Loomio collaboration tool [?] in relation to its settings for shared editing of thread "context" :mag: Loomio is built by people with experience in real-world facilitation practices, and the Occupy movement.

JasonEtco commented 6 years ago

This is a really neat idea - I don't know how I'd use it in a real world project, but I'm sure there are others who do.

From a technical standpoint, fun fact: GitHub Flavored Markdown doesn't strip HTML comments, so you can use those as "fences" to cordon off areas of an existing comment. Example:

# Summary

<!-- UPDATE ME -->
Hi
Hello
Whats up
<!-- END UPDATE ME -->

Then using RegEx, you can capture that area:

const start = '<!-- UPDATE ME -->'
const end = '<!-- END UPDATE ME -->'

const reg = new RegExp(`${start}\n([\s\S]+)${end}`)

Or you could use Handlebars, which Probot already has as a dependency.

I do this in ci-reporter to update existing PR comments, feel free to dig around there if you're looking for a code example.


After typing all that ☝️ I realize that you already have a working demo of sorts I think? In any case, hope that was handy 😄

patcon commented 6 years ago

Thanks for the vote of confidence. Made me realize perhaps this could be more explicit:

  1. :heart: I feel that long/complicated threads are often not expected to be so at time of OP.
  2. :bulb: The ability to add a Summary section to the bottom should be possible even when OP didn't anticipate the need at the issue-level.

ASIDE: @JasonEtco you don't have Twitter, so I don't know how to internet-yell at you, but -- seeing that you're in Toronto -- I just wanted to cordially invite you to a civic hacknight, should you ever feel inclined -- every Tues at 6:30pm :) We get maybe 60-80 designers, non-profit, techies, public servants, and generally just engaged ppl. Location this month is Secret Location (a honest-to-goodness real company name) who do VR/AR media: https://www.meetup.com/Civic-Tech-Toronto/events/nljtlpyxgbnb/

Do you have a best mode of comms outside GitHub? I'm @patconnolly, but our Slack also has a #public-lobby channel bridged to Gitter that I just set up, if you'd prefer to use that! (Shhhh sneak peak, not "official" yet.)

(Disclaimer: I am one of the rag-tag group of co-organizers at Civic Tech Toronto, the crew who runs them :slightly_smiling_face: )

JasonEtco commented 6 years ago

Haha @patcon I do have Twitter, was going to invite you to NodeschoolTO some time!

The ability to add a Summary section to the bottom should be possible even when OP didn't anticipate the need at the issue-level.

Totally - I think a simple check to see if that update-able block exists, and then adding it if it doesn't, would do the trick.

There'd also need to be some kind of abuse-prevention system. You mention reactions as being a way of moderating that - one day when Reaction webhook events exist that'll be viable. In the meantime, some other bad ideas:

patcon commented 6 years ago

Interesting on the alternative tactics... I'll think on that :)

What about where it's one step behind... like for each comment created, it checks for the reaction emoji? Assuming someone else says something eventually, then the +1 will be "noticed" and acted on

A little inelegant, but I'd really prefer the reaction approach

Alternatively, maybe the bot could modify the "Summary Update" comment itself -- adding a "refresh button" linked to a refresh url of sorts. When any user follows the link, just arriving there initiates an action that checks for the reaction from the right person... A little convoluted, and perhaps I'm misunderstanding probot architecture, and this would be really tough :)

Curious your thoughts though!