Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

for mentions, show full content text if it's small enough #41

Closed
snarfed opened this issue Sep 29, 2015 · 30 comments
Closed

for mentions, show full content text if it's small enough #41

snarfed opened this issue Sep 29, 2015 · 30 comments

Comments

@snarfed
Copy link

snarfed commented Sep 29, 2015

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.

@snarfed
Copy link
Author

snarfed commented Sep 29, 2015

@pfefferle
Copy link
Owner

👍

@pfefferle pfefferle self-assigned this Oct 1, 2015
@snarfed
Copy link
Author

snarfed commented Oct 12, 2015

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.)

@dshanske
Copy link
Collaborator

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.

@dshanske
Copy link
Collaborator

Isn't this addressed by @snarfed 's recent PR and therefore should be closed?

@snarfed
Copy link
Author

snarfed commented Jun 29, 2016

sure! my PR doesn't do the snippet thing, only full content/summary, but still happy to close if we want.

@snarfed
Copy link
Author

snarfed commented Jan 30, 2017

friendly ping on whether we should close this? up to you all.

@snarfed
Copy link
Author

snarfed commented Nov 7, 2017

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.

@snarfed
Copy link
Author

snarfed commented Jan 21, 2019

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

@snarfed
Copy link
Author

snarfed commented Jan 21, 2019

oh huh i can't actually reopen. @dshanske or @pfefferle mind reopening?

@pfefferle pfefferle reopened this Jan 21, 2019
@dshanske
Copy link
Collaborator

dshanske commented Mar 8, 2019

Bumped by @snarfed

@pfefferle
Copy link
Owner

pfefferle commented Mar 10, 2019

@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

@snarfed
Copy link
Author

snarfed commented Mar 10, 2019

@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.

image

@pfefferle
Copy link
Owner

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...

@dshanske
Copy link
Collaborator

I am thinking of going to do some Semantic Linkbacks and Webmention bug hunting in the coming weeks.

@snarfed
Copy link
Author

snarfed commented Jun 26, 2019

friendly nudge! could be a good project for summit.

@dshanske
Copy link
Collaborator

I might try this as part of the inclusion of mf2 in webmention, before building complex types

@snarfed
Copy link
Author

snarfed commented Jul 8, 2019

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?

@pfefferle
Copy link
Owner

pfefferle commented Jul 8, 2019 via email

@snarfed
Copy link
Author

snarfed commented Jul 11, 2019

it's working great @pfefferle! thanks again.

@snarfed
Copy link
Author

snarfed commented Aug 29, 2019

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!

@snarfed
Copy link
Author

snarfed commented Jan 31, 2020

friendly nudge! ^

@pfefferle pfefferle reopened this Apr 27, 2020
@snarfed
Copy link
Author

snarfed commented May 5, 2020

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?

@pfefferle
Copy link
Owner

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?

@pfefferle
Copy link
Owner

The plugin is counting full length (with HTML)!

@pfefferle
Copy link
Owner

If this is unexpected, then we have to add a „strip tags“ here

$text_len = mb_strlen( html_entity_decode( $text, ENT_QUOTES ) );

@pfefferle
Copy link
Owner

@snarfed can you verify if it is working with the latest change.

@snarfed
Copy link
Author

snarfed commented May 6, 2020

Can you post some examples? One that works and one that don‘t?

sure, the two mentioned earlier here count:

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.

@snarfed
Copy link
Author

snarfed commented May 8, 2020

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"
}

@stale
Copy link

stale bot commented Apr 1, 2022

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.

@stale stale bot added the wontfix label Apr 1, 2022
@stale stale bot closed this as completed Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants