for mentions, show full content text if it's small enough
snarfed opened this issue · 30 comments
currently, mentions are rendered as:
X mentioned this post on [domain].
...which is fine, but if the mention post is a note and/or its content text is short enough - say, < 140 chars :P - it'd be nice to show the content text inline.
motivated by snarfed/bridgy#456, which now searches twitter and google+ for other people's posts that link to your site and sending them as mentions.
👍
when the mention content is too long, we should maybe also consider showing a snippet. options include p-summary
if available, first N words or sentences, or the N words or sentences around the mention link. any actual context would be better than just "this was mentioned on X"!
(feel free to split this out into a separate issue if you want, of course.)
I was thinking about this. If an explicit p-summary is available, it should be used. I considered suggesting meta description as a fallback for p-summary, but that is hit or miss. I agree if the entry is less than 140 it could show the whole thing.
sure! my PR doesn't do the snippet thing, only full content/summary, but still happy to close if we want.
friendly ping on whether we should close this? up to you all.
I'm thinking about this again. even for long mentions like articles, showing summaries or titles or snippets seems strictly better than just "X mentioned this on Y."
we don't recommend POSSEing articles with "I wrote a new article: [link]," we recommend including a summary or snippet or at least the title, right? i kinda feel like we should do the same with mentions.
(fwiw, this would also mean that they'd never be facepiled.)
thoughts? I'm happy to do this if you all agree.
reopening, this may have regressed...? i see the code still in master, but it's not happening for me with the latest release, 3.9.2.
example: https://snarfed.org/2019-01-17_snoopy#commentform . the one mention is way below 300 chars. its source URL https://brid-gy.appspot.com/post/twitter/schnarfed/1086002408428326922
oh huh i can't actually reopen. @dshanske or @pfefferle mind reopening?
@snarfed your code is only used if the facepile feature is disabled for 'mentions' otherwise comment_text_excerpt
wouldn't be called at all... To support it, your check has to be part of the Comment-Walker: https://github.com/pfefferle/wordpress-semantic-linkbacks/blob/master/includes/class-linkbacks-walker-comment.php#L11
@pfefferle hmm! thanks i actually have facepiles disabled for all types, but i still get them for everything except replies, so maybe...it's my theme's fault? ugh. i can investigate.
Either that, or it is how the Comment-Walker is working. I sadly have not really investigated how it works, but it replaced my initial facepile handling...
I am thinking of going to do some Semantic Linkbacks and Webmention bug hunting in the coming weeks.
friendly nudge! could be a good project for summit.
I might try this as part of the inclusion of mf2 in webmention, before building complex types
awesome! thanks you @pfefferle! can't wait to try this out when it's released. do you have a publicly visible example of it yet?
it's working great @pfefferle! thanks again.
hi again! sorry to keep harping on this one, but i'm seeing it fail sometimes. eg this comment from this bridgy twitter webmention has text content length just 140 chars, but it was rendered as Kevin Marks mentioned this Article on twitter.com instead of the actual content.
its HTML content length (ie including markup) is 471 chars. is the plugin maybe counting HTML length instead of text length?
i'm on the latest released plugin versions, webmention 3.8.11 and semantic-linkbacks 3.9.3. let me know if i can help debug!
friendly nudge! ^
hmm! i just got a native indie mention that rendered the full text, as expected: https://snarfed.org/about#comment-2767327
so maybe this is fixed? or maybe just inconsistent?
Can you post some examples? One that works and one that don‘t? What counter do you use? The default one or have you customized it?
The plugin is counting full length (with HTML)!
If this is unexpected, then we have to add a „strip tags“ here
Can you post some examples? One that works and one that don‘t?
sure, the two mentioned earlier here count:
- 2019-08-16, webmention 3.8.11/semantic-linkbacks 3.9.3, source https://brid-gy.appspot.com/post/twitter/schnarfed/1162272459967479808, target https://snarfed.org/2018-06-07_turning-off-facebook-for-bridgy , failed
- 2019-05-05, webmention 4.0.3/semantic-linkbacks 3.10.1, source https://boffosocko.com/2020/05/05/55770722/ , target https://snarfed.org/about , succeeded
i haven't had the time to re-test yet. since the one yesterday succeeded, i'm ok to close this again if you want.
What counter do you use? The default one or have you customized it?
sorry, i don't follow. if that's is a wordpress internal or dev thing, i haven't customized it.
i resent the failed one above, with the new plugin versions given above, and the webmention succeeded, but it's still shown as Kevin Marks mentioned this Article on twitter.com. not sure if it would fix itself if the source hasn't changed though.
response body:
{
"link": "https://snarfed.org/2018-06-07_turning-off-facebook-for-bridgy#comment-2740232",
"source": "https://brid-gy.appspot.com/post/twitter/schnarfed/1162272459967479808",
"target": "https://snarfed.org/2018-06-07_turning-off-facebook-for-bridgy",
"code": "success",
"message": "Webmention was successful"
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.