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

Wordpress functions #14

Closed
wants to merge 1 commit into from
Closed

Wordpress functions #14

wants to merge 1 commit into from

Conversation

dcondrey
Copy link

Enqueue scripts and styles. Add commentable-container class to post containers via post_class filter. Create comment section from each paragraph in post within incremental section_id.

Enqueue scripts and styles.  Add class to post container.  Create
comment section from each paragraph in post.
@aroc
Copy link
Owner

aroc commented Jun 30, 2014

This looks pretty slick. From the look of the code, I'm assuming it identifies the post container and paragraphs and adds the classes for you?

This looks like a fantastic starting place for SideComments integration with WordPress. However, I'm not sure having this logic live right in the codebase is the right spot for it. I think a Github Wiki page with reference to a Gist would be a better place. I'll look at integrating this logic + explanation into the project documentation.

Thanks for submitting this. :)

@richardtape
Copy link

I've gone head and made a full WP plugin for this (really rather awesome bit of) javascript.

https://github.com/richardtape/wp-side-comments

I'm not a huge fan of the way I have to mung everything together in the one JS file, but there you have it. The CSS needs some love, too. But it works as a proof of concept.

@dcondrey
Copy link
Author

dcondrey commented Jul 2, 2014

Hey Eric,
No prob man, thanks for writing such a great script. I also did some work inspired by Medium recently, mimicking their social sharing / highlighting text popup. Never cleaned it up or got around to uploading it to git but if you want it, just hit me up.

@aroc
Copy link
Owner

aroc commented Jul 3, 2014

@dcondrey That sounds pretty cool. If you want to fire up another repository and turn that into a JS component, I'm game. Let me know. :D

@aroc aroc closed this Jul 3, 2014
@strategio
Copy link

Hi all,

I made another WP Side Comments (!) plugin for WordPress...

Actually, I have another approach beacause I'am adding the CSS classes with jQuery before to fire SideComment.js.

The only issue I see with this approach is that we'll be wrong if there is a content update (like adding a paragraph in the middle). But I think we can fix it later on.

Check the github repo there : https://github.com/strategio/wpsidecomments

@richardtape
Copy link

Hi strategio,

Nice implementation. My issue with the way you've implemented it (aside from the issue you've mentioned already) is that it means deferring dom changes to the front-end of the site. That can be incredibly slow on a really long page. That being said, it's always good to have different approaches. Good luck with yours! :)

@strategio
Copy link

Hi Richard,

I don't think that adding an id for each paragraph is a big issue when there's a lot of work for SideComment script. First I thought about filtering the post content, and finally I didn't because some WordPress installations don't use paragraphs.

I had a look at your code and I think we agree with quite everything. I would just suggest you to create your own query for comments to limit database calls, that's what I did.

I hope we can share some work !

@josegonzalez
Copy link

@dcondrey any chance you have the changes you made to replicate the commenting highlighting stuff that medium has? Would be nice to see the changes :)

@dcondrey
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants