hamstar / legislat0r

An open source system for crowdsourcing creation and analysis of legislature
9 stars 1 forks source link

Users can suggest changes to a bill at the sentence level #19

Open hamstar opened 12 years ago

hamstar commented 12 years ago
  1. The user sees a sentence they want to change
  2. The user clicks on the sentence
  3. A "changes area" slides out below the sentence
  4. The changes area shows existing changes (if any)
  5. The changes area shows comments on changes or the original draft of the bill
  6. The user clicks an add suggestion link
  7. A form appears at the top of the "changes area"
  8. The user enters their suggestion and clicks save
  9. The form disappears
  10. The user can see their suggestion appear at the bottom of the changes area with 1 vote

    Styling constraints

  11. The changes area should aesthetically segregate user created content from the bill text
  12. The comments and changes must be styled differently to the sentence
  13. The comments and changes should be aesthetically different

    Like StackOverflow

But maybe a little different. Same kind of thing though, a main upvotable thing with (upvotable?) comments below it.

SO screen

hamstar commented 12 years ago

Heres some code that should be able to split up paragraphs into sentences:

"One sentence. And another sentence.  The temp is 42.5 today".gsub(/\.?\s?([\w+ ]+\.?)/, "<span>\\1</span> ")

This produces: <span>One sentence.</span> <span>And another sentence.</span> <span> The temp is 42.</span> <span>5 today</span>

I dunno how to fix splitting at the decimal point of that number though...

jonlaing commented 12 years ago

I think perhaps we don't need to/shouldn't split the paragraphs in this way. There was an interesting idea brought up in Issue #33 where users would be able to highlight an arbitrary portion of text and comment/change it. So instead of a bill having many sentences, we could make a comment or change just have a beginning and end point within the text. Of course, it will be more complicated than that, but I think that will give the users far more flexibility than a sentence by sentence break down.

fierce-bad-squirrel commented 12 years ago

I agree with jonlaing. The suggestion in #33 would be a great addition.