50°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Gargron https://github.com/Gargron   •   Jul 5

    I read somewhere p-name is no longer necessary?

    Aaron Parecki

    A change in the Microformats parsing spec from a few months ago reduced the cases where parsers would auto-generate a name property if there wasn't one in the original markup.

    Previously, when the name was autogenerated, people ended up having to add an explicit name property to the HTML in order to avoid weird broken-looking names. Now that this change is approved and implemented in a couple parsers, things are working a lot better. I believe the Ruby parser has not yet implemented this change, but it's in the Python and PHP ones.

    Certainly one option is Mastodon could just remove the p-name class, since the newer parsers would end up seeing those posts with just the summary and content properties.

    Since afaik no Microformats consumers have the concept of CW/spoiler posts yet, this does raise the issue of how to provide a good fallback behavior for consumers that don't understand spoiler posts. My thought with moving the p-name class to the same element as p-summary is that the current consumers will see it as an "article", most likely only showing the name of the article. Here's an example of how my site renders comments that have a name (whether or not there is also summary or content)

    Similarly, here's what my site shows when I'm replying to a post that has a name:

    If the p-name class is used only for the CW/spoiler preview text, then my site wouldn't show the full content in either the reply context or as a comment, which seems like the safest fallback behavior.

    Portland, Oregon, USA • 86°F
    Thu, Jul 5, 2018 4:43pm -07:00
    9 replies
    • Eugen Rochko zeonfederated.com
      Yep I just discovered that. Could just remove those particular tests...
      Fri, Jul 6, 2018 12:07am +00:00 (via brid-gy.appspot.com)
    • Aaron Parecki aaronparecki.com
      The thing that stopped me from sending a PR for this is that the Ruby parser doesn't have the updated rules, so it's not possible to create a good test case in Mastodon for the changes. Just removing the class right now will break a bunch of tests that are expecting the name property.
      Thu, Jul 5, 2018 11:53pm +00:00 (via brid-gy.appspot.com)
    • Aaron Parecki aaronparecki.com
      Posts with no CW would end up with just a `content` property. According to the new parsing rules, those look just like normal content-only posts and sites don't see a `name` property and treat them as normal text/microblog/toot/tweet posts.
      Thu, Jul 5, 2018 11:51pm +00:00 (via brid-gy.appspot.com)
    • Eugen Rochko zeonfederated.com
      But what about posts with no CW?
      Thu, Jul 5, 2018 11:45pm +00:00 (via brid-gy.appspot.com)
    • Aaron Parecki aaronparecki.com
      A change in the Microformats parsing spec from [a few months ago](https://github.com/microformats/microformats2-parsing/issues/6) reduced the cases where parsers would auto-generate a `name` property if there wasn't one in the original markup.

      Previously, when the `name` was autogenerated, people ended up having to add an explicit `name` property to the HTML in order to avoid weird broken-looking names. Now that this change is approved and implemented in a couple parsers, things are working a lot better. I believe the Ruby parser has not yet implemented this change, but it's in the Python and PHP ones.

      Certainly one option is Mastodon could just remove the `p-name` class, since the newer parsers would end up seeing those posts with just the `summary` and `content` properties.

      Since afaik no Microformats consumers have the concept of CW/spoiler posts yet, this does raise the issue of how to provide a good fallback behavior for consumers that don't understand spoiler posts. My thought with moving the `p-name` class to the same element as `p-summary` is that the current consumers will see it as an "article", most likely only showing the name of the article. Here's an example of how my site renders comments that have a name (whether or not there is also summary or content)

      ![](https://media.aaronpk.com/Screen-Shot-2018-07-05-16-37-09-zuMtyZtLAD.jpg)

      Similarly, here's what my site shows when I'm replying to a post that has a name:

      ![](https://media.aaronpk.com/Screen-Shot-2018-07-05-16-39-25-TjGK0soBkB.jpg)

      If the `p-name` class is used only for the CW/spoiler preview text, then my site wouldn't show the full content in either the reply context or as a comment, which seems like the safest fallback behavior.
      Thu, Jul 5, 2018 11:44pm +00:00 (via brid-gy.appspot.com)
    • Eugen Rochko zeonfederated.com
      I read somewhere p-name is no longer necessary?
      Thu, Jul 5, 2018 11:11pm +00:00 (via brid-gy.appspot.com)
    • Aaron Parecki aaronparecki.com
      Another example where a comment that my site received is unable to be displayed well due to the mismatched name/content markup: https://aaronparecki.com/2018/07/05/14/
      Thu, Jul 5, 2018 10:19pm +00:00 (via brid-gy.appspot.com)
    • nightpool github.com/nightpool
      cf https://github.com/tootsuite/mastodon/pull/1063 and https://github.com/tootsuite/mastodon/issues/965
      Mon, Jul 2, 2018 2:41pm +00:00 (via brid-gy.appspot.com)
    • Aaron Parecki aaronparecki.com
      Here's an example of how a Microformats consumer gets an incorrect `name` value for a Mastodon post: https://aaronparecki.com/2018/07/02/7/
      Mon, Jul 2, 2018 2:05pm +00:00 (via brid-gy.appspot.com)
Posted in /replies using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv