The Twitter embed API has an option for controlling whether the parent discussion in a tweet is displayed along with the actual tweet. By default the parent message(s) is shown, but using the data-conversation="none" option turns it off. This option is hardcoded in the module but should be something that is controlled by the site builder.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

This provides a new option on the formatter to control whether the previous message is displayed.

The options dialog:

Options dialog

What the tweet display looks like with the option disabled, which is the default:

Output with option disabled (default)

What the tweet display looks like with the option enabled:

Output with option enabled

damienmckenna’s picture

StatusFileSize
new2.48 KB

Patch #1 was actually for 8.x-1.x, this one is for 8.x-2.x

seanb’s picture

I like it! Simple patch with a lot of added value. A small nit about the description of the field. Besides that looking good to me.

+++ b/src/Plugin/Field/FieldFormatter/TwitterEmbedFormatter.php
@@ -20,6 +21,47 @@
+      '#description' => $this->t('If the requested tweet was a reply to another one, this option will display a summary of the previous tweet to. By default only the requested tweet will be displayed'),

I think this contains a typo in the word 'to'. SHouldn't that be 'too'? The end of the sentence could use a period.

damienmckenna’s picture

Status: Needs review » Needs work

The last submitted patch, 5: media_entity_twitter-n2992230-5.patch, failed testing. View results

chr.fritsch’s picture

Tests are failing.

chr.fritsch’s picture

I think this needs a schema configuration for the formatter now.

Very nice. I would like to see this landing.

chr.fritsch’s picture

Status: Needs work » Needs review
StatusFileSize
new3.15 KB

Adding the schema, that caused the failure.

chr.fritsch’s picture

Status: Needs review » Reviewed & tested by the community

Crediting @seanB for his review.

  • chr.fritsch committed b3f0f1c on 8.x-2.x
    Issue #2992230 by DamienMcKenna, chr.fritsch, seanB: Add option field...
chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks, everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.