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

reconsider how p-name is generated for replies #287

Closed
snarfed opened this issue Sep 15, 2014 · 6 comments
Closed

reconsider how p-name is generated for replies #287

snarfed opened this issue Sep 15, 2014 · 6 comments
Labels

Comments

@snarfed
Copy link
Owner

snarfed commented Sep 15, 2014

right now it's the first n words of e-content, ellipsized. when it's ellipsized, http://webmention.herokuapp.com/ sees that it's different from e-content, thinks it's meaningful, and shows it alongside the e-content, resulting in duplication like on http://www.kevinmarks.com/xoxofest2014a.html . irc discussion here.

options:

  • don't ellipsize; copy full e-content into p-name. not ideal for fb and g+ since they can be arbitrarily long, but could work for twitter.
  • drop p-name for notes and replies entirely. not great because mf2 parsers are then supposed to auto-generate p-name...which would be fine, but based on this example, they populate it with the entire h-entry text, instead of just e-content? that seems wrong...?

background in http://indiewebcamp.com/comments-presentation#How_to_display and http://microformats.org/wiki/h-entry#p-name_of_a_note . cc @voxpelli @kylewm, also @kevinmarks @tantek @barnabywalters for mf2 guidance.

@snarfed
Copy link
Owner Author

snarfed commented Sep 15, 2014

also see voxpelli/webpage-webmentions#10

@snarfed
Copy link
Owner Author

snarfed commented Sep 15, 2014

looks like php-mf2 also auto-generates p-name from entire h-entry text, not just from e-content, so i guess that is correct.

hrmph. now i'm even more unsure of what the right thing is to do. hopefully some of the cc'ed mf2 gurus can weigh in.

@barnabywalters
Copy link

I would recommend using the whole e-content content as the p-name. The length is not a big deal and will be dealt with by clients — people can already put whatever they want in whatever property they want so consumers already have to make intelligent, robust decisions to prevent abuse or weird looking content. Additionally, making the name and content the same makes it trivially easy for consumers to figure out when the name should be displayed separately (rather than trimming ellipses and searching for substrings), and therefore is most likely to result in a good experience for the person on the other side of the screen.

Microformats should always have a name property even if the thing they represent doesn’t have a “title” as such. It’s the only property which is guaranteed to exist and therefore can be used in, e.g. a list of microformats on a page. The implied name from text content rule a) ensures this will always be the case and b) allows minimal markup like <span class="h-card">Ryan</span>.

(P.S. I proposed a little while ago to add additional implied parsing rules to take the textcontent of the first descendant <h1-6> element as the p-name if none is given, which could improve the state of implied name parsing, but not for the note case)

@snarfed
Copy link
Owner Author

snarfed commented Sep 16, 2014

thanks @barnabywalters! sgtm. i'll stop ellipsizing and copy the full e-content into p-name.

@kylewm
Copy link
Contributor

kylewm commented Sep 16, 2014

If it's any easier implementation-wise, I see a lot of sites just use <div class="p-name e-content"> for notes

@snarfed
Copy link
Owner Author

snarfed commented Sep 19, 2014

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

No branches or pull requests

3 participants