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
Wiki Inline-Commenting #1438 #1593
Wiki Inline-Commenting #1438 #1593
Conversation
dd4a2b2
to
7450e1b
Compare
What's the error here? Can you copy it in? @ananyo2012 I wonder if danger
is responding to test failures but not errors? Or if an error happens early
enough maybe danger doesn't even run? If the latter is the case there's not
much we can do, but good to know.
…On Aug 30, 2017 6:26 AM, "Ashan Priyadarshana" ***@***.***> wrote:
Make sure these boxes are checked before your pull request is ready to be
reviewed and merged. Thanks!
- all tests pass -- rake test:all
- code is in uniquely-named feature branch, and has been rebased on
top of latest master (especially if you've been asked to make additional
changes)
- pull request is descriptively named with #number reference back to
original issue
Please be sure you've reviewed our contribution guidelines at
https://publiclab.org/wiki/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday
and Friday, and publishing changes on Fridays. Please alert developers on
***@***.*** when your request is ready or if you need
assistance.
Thanks!
------------------------------
You can view, comment on, or merge this pull request online at:
#1593
Commit Summary
- undo Gemfile.lock
- add a reference column of string type to comments table
- add a inline comment button and function for that
- Build an inline form for commenting
- make the inline comment form toggle when comment button is clicked
- make the inline comment form submittable
- show previous inine-comments when inline comment button is clicked
- lively show currently entered inline-comment
- decorate inline comments to show commented user and time
- update related reference column records when a subsection is edited
- add tests to check inline-comment functionality
File Changes
- *M* app/assets/javascripts/application.js
<https://github.com/publiclab/plots2/pull/1593/files#diff-0> (2)
- *A* app/assets/javascripts/buildSectionCommentForm.js
<https://github.com/publiclab/plots2/pull/1593/files#diff-1> (70)
- *A* app/assets/javascripts/showInlineComment.js
<https://github.com/publiclab/plots2/pull/1593/files#diff-2> (36)
- *M* app/assets/javascripts/wikis.js
<https://github.com/publiclab/plots2/pull/1593/files#diff-3> (35)
- *M* app/controllers/comment_controller.rb
<https://github.com/publiclab/plots2/pull/1593/files#diff-4> (42)
- *M* app/controllers/wiki_controller.rb
<https://github.com/publiclab/plots2/pull/1593/files#diff-5> (1)
- *M* app/models/comment.rb
<https://github.com/publiclab/plots2/pull/1593/files#diff-6> (2)
- *M* app/models/node.rb
<https://github.com/publiclab/plots2/pull/1593/files#diff-7> (8)
- *A* app/views/comment/create_inline_comment.js.erb
<https://github.com/publiclab/plots2/pull/1593/files#diff-8> (3)
- *M* app/views/wiki/show.html.erb
<https://github.com/publiclab/plots2/pull/1593/files#diff-9> (2)
- *A* db/migrate/20170808083618_add_reference_to_comments.rb
<https://github.com/publiclab/plots2/pull/1593/files#diff-10> (5)
- *M* db/schema.rb.example
<https://github.com/publiclab/plots2/pull/1593/files#diff-11> (3)
- *M* test/functional/comment_controller_test.rb
<https://github.com/publiclab/plots2/pull/1593/files#diff-12> (12)
Patch Links:
- https://github.com/publiclab/plots2/pull/1593.patch
- https://github.com/publiclab/plots2/pull/1593.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1593>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ03uOeHBcdfX4UHgGUl1StGO-ClLks5sdTjDgaJpZM4PHLZt>
.
|
7450e1b
to
cbfff1d
Compare
Generated by 🚫 Danger |
Ooh, cool - but see the warning about new schema file! |
I wanted to note that I think /all/ rich wiki updating is a bit slow. We'll look into this, but I believe we should:
then let's test one more time -- i'd like to work a bit more on how the comments are displayed too; perhaps we can show Then that full display could be toggled to show. |
app/assets/javascripts/wikis.js
Outdated
@@ -15,7 +14,8 @@ function setupWiki(node_id, title, raw, logged_in) { | |||
preProcessor: preProcessMarkdown, | |||
postProcessor: postProcessContent, | |||
extraButtons: { | |||
"fa-question": questionForm | |||
"fa-question": questionForm, | |||
"fa-comment": setupCommentFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this:
<% if params[:inlineCommenting] %>"fa-comment": setupCommentFunction<% end %>
? That way we can test this more on production without committing to it just yet. And we can publish the general Rich Wikis inline features without also having to publish inline commenting which may take a little longer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @aspriya - i think if you can add this flag we can merge and see how this is working. Thanks!
@@ -49,6 +49,7 @@ ActiveRecord::Schema.define(:version => 20170824172336) do | |||
t.string "mail", :limit => 64 | |||
t.string "homepage" | |||
t.integer "aid", :default => 0, :null => false | |||
t.string "reference" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I believe you have to update the timestamp at the top of the file to match the latest migration version -- that may be what's stopping you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thanx. Corrected this
A note that not the whole site seems slow on unstable.publiclab.org - I
see no reason for slowness in the logs.
I will continue to investigate.
…On 31/08/17 12:27, Jeffrey Warren wrote:
I wanted to note that I think /all/ rich wiki updating is a bit slow.
We'll look into this, but I believe we should:
* monitor unstable for performance ***@***.***
<https://github.com/icarito>)
* add a "spinner" icon as with the Post button on |/post| (this also
happens in regular comments, i think) so people know it's doing
*something*
* fix the schema file as advised by Dangerbot above
then let's test one more time -- i'd like to work a bit more on how
the comments are displayed too; perhaps we can show |3 comments| by
the comment icons, instead of the full display shown in your screenshot:
image
<https://user-images.githubusercontent.com/13878973/29861863-653006e2-8d88-11e7-985d-44ca7419c3e1.png>
Then that full display could be toggled to show.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1593 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMS01sfGquFWDRcSx4JeTedoI9MqQsks5sduz7gaJpZM4PHLZt>.
|
cbfff1d
to
443108d
Compare
I made the "hidden" flag in javascript so this will only work when this is at the end of the URL: Now all that's left is:
Very close! |
Hi, @aspriya - what do you think about these changes? Hope you're well! |
do you want to download the code and try it out? I worried there were
things we overlooked in this and it needed a bit more work.
…On Fri, Jan 26, 2018 at 1:08 PM, Ujjwal Sharma ***@***.***> wrote:
@jywarren <https://github.com/jywarren> @aspriya
<https://github.com/aspriya> hasn't replied to this thread for a very
long time. Is this mergeable, or should we close this for now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1593 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ8PZcwLRaiiMHme05kV0i65bsSHeks5tOhSHgaJpZM4PHLZt>
.
|
@jywarren I could definitely give this a try! |
As the person is inactive for more than a month, I am closing the PR. In case you want to push changes please feel free to open a new PR OR reopen this PR and add additional changes to it. |
Make sure these boxes are checked before your pull request is ready to be reviewed and merged. Thanks!
rake test:all
Picking up from where #1571 left off.