Read Webmentions work log 20200113 by Jeremy Felt (jeremyfelt.com)
Why not, right?
I shipped a great bug yesterday. A big thanks to Chris Aldrich for catching that and sending me a DM today to let me know.
With all my cleverness around separating comment types for display below posts, I forgot to check for cases where there was some kind of Webmention, but no regul...
Remember that one of the hidden superpowers of the IndieWeb and particularly the wiki is that it is a great repository of documentation of prior artwork and web patterns for how others have designed and fixed various problems for themselves. Something like the wiki comments page may be helpful if you haven’t come across it.

I do like your idea of potentially not showing certain mention types in comment sections. I could see that as a feature that people would appreciate.

Published by

Chris Aldrich

I'm a biomedical and electrical engineer with interests in information theory, complexity, evolution, genetics, signal processing, IndieWeb, theoretical mathematics, and big history. I'm also a talent manager-producer-publisher in the entertainment industry with expertise in representation, distribution, finance, production, content delivery, and new media.

One thought on “”

  1. I hadn’t taken a close look at the IndieWeb comments documentation when I marked up the latest version of comments for this site last week. Today I’m going to follow some of the advice Chris had and stare closer at some prior art.

    My first objective is to remove all of the unnecessary classes added to comments by WordPress through comment_class(). To aid in helpful front-end styling, things like odd, even, bypostauthor, and a handful of others are automatically added. I’m doing anything fancy, so I removed pretty much everything and went with a default of class="u-comment h-cite".

    Much of the markup around this has things like u-like and u-url and h-cite and I knew there had to be some reasoning, but hadn’t bothered to actually dig in to what it all means. Today I found the documentation for microformat prefixes and everything makes a lot more sense. Go figure.

    This list is mostly a reproduction of the one on that page.

    h- for root class names like h-entry or h-citeu- for URL class names like u-url. This makes the least immediate sense to me because I’m putting things like u-like and u-mention at the <article> level rather the URLs it wraps, though that might be the intention—this container has URLs.dt- for datetime properties, which I use on the <time> element.p- for plain text.e- for element tree properties, or basically: contains HTML.

    I’m happy I spent some time actually staring at this. I’ve been “familiar” in the sense that I’ve used the markup for years, but I haven’t paid close enough attention to things like p- and e- prefixes.

    My initial version of comments had the comment text wrapped in a .comment-content container. I first switched that with .p-content today before reading the prefix spec. Because I made the decision to add paragraph markup to webmention content and allow things like URLs, I decided .e-content would be the most accurate fit and switched things again.

    I then noticed a comment by Tantek on the IndieWeb comments page saying that .h-entry is probably better for comments written on the actual site while .h-cite is best for comments that have a canonical location elsewhere. I went ahead and added a detection for “standard” comments and injected .h-entry for those.

    WordPress’s comment type detection is um, yeah.

    The comment_type column can be empty, “pingback”, or “trackback” by default. I think this column alone is probably the most annoying thing about even starting with comment types. I left a comment on the associated ticket along those lines.

    For now I assume comments that have no comment_type and have a meta key of protocol with the value webmention as added by the webmention plugin are in fact webmentions. Those use .h-cite and other comments with an empty comment_type use .h-entry.

    Things are looking a bit cleaner in the source now, or at least making a bit more sense. I’m going to ship that and head over to watch some basketball and stew on why college athletics don’t have URLs to individual events. 🙄

    I’ll plan on creating a post type this weekend that I can use for dedicated replies and likes. Sounds like a party. 🎉

Mentions

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond to a post on this site using your own website, create your post making sure to include the (target) URL/permalink for my post in your response. Then enter the URL/permalink of your response in the (source) box and click the 'Ping me' button. Your response will appear (possibly after moderation) on my page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)