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

Support writing quote tweets with attached images #631

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

IBBoard
Copy link
Contributor

@IBBoard IBBoard commented Oct 6, 2016

The previous quote tweet character counting fix worked for pure text, but failed if you added an image as well.

Twitter (un)helpfully treats both an image and a quote as an attachment. This change drops back to old quoting behaviour (inline URL) if an image is added, including changing the character count while composing the tweet, but keeps the new attachment behaviour for "just quote with text" and "images without a quoted tweet".

@baedert
Copy link
Owner

baedert commented Oct 8, 2016

Umm, it seems like the bug is more that there is a possibility of adding images to quote tweets? This will obviously break as soon as the quoted tweet contains images itself (and is not possible on twitter.com).

@IBBoard
Copy link
Contributor Author

IBBoard commented Oct 8, 2016

It depends what functionality you want. Twitter doesn't allow adding images to quotes, but since swapping back to "old" behaviour is so simple then it seemed like the best of both worlds.

I'll check what Corebird does with quote containing an image. IMO, we shouldn't show the quoted image but should keep the link in that situation (assuming it even recognises the "quoted" tweet as a quote and doesn't just have it presented as a link that just happens to be to a Twitter tweet)

@IBBoard
Copy link
Contributor Author

IBBoard commented Oct 8, 2016

Actually, I think the patch still matches Twitter Web behaviour (tested on my ibbtwtr test account)
screenshot from 2016-10-08 11-14-24
screenshot from 2016-10-08 11-16-53

Under "long tweet" rules, quotes are attachments, so quote plus
images means too many attachments. The easiest way to fix this
is to add the quoted URL inline (old style quote) if we also have
images to upload.
If we don't do this then adding and removing an image leaves the
user with a 23 character shorter message limit!
This is allowed on the web UI, even though the URL will now be in
the additional metadata rather than the message text
@Vistaus
Copy link

Vistaus commented May 1, 2017

Hmm, hasn't this been solved recently? I seem to remember that this got fixed. (just asking because this PR is still open)

@IBBoard
Copy link
Contributor Author

IBBoard commented May 1, 2017

Commit 85cd7e1 "fixes" it by preventing the image buttons being used when quoting (which is what Twitter does).

My patch (which seemed to apply cleanly locally, and just needed one extra line to deal with the "fav image" button) fixes it by making images override quoting. That means that if you quote then it puts the tweet URL in the attachment field, but if you quote and then add an image then it puts the images as the attachment, adds the quoted tweet's URL in the tweet body and calculates the message length appropriately.

Personally, I prefer my method, as there's no practical reason not to do it, the user gets sufficient feedback, and Twitter still does something sensible with it (it shows the images you attached and leaves the tweet in the text - see examples). It also makes referencing tweets easier and more flexible.

Current method for referencing a tweet in a message including images:

  1. Double-click tweet to go to Tweet Details
  2. Right-click "Source"
  3. Click Copy Link Address
  4. Click "Compose"
  5. Write message, add images, paste in URL
  6. Click Back to get back to main timeline

My method:

  1. Right-click Tweet
  2. Click on drop-down
  3. Click "Quote"
  4. Write message, add images, URL is handled automatically

[Edit] Oh, and if you mean #681, that was about displaying quotes, not posting them.

@IBBoard IBBoard changed the title Handle quote tweets with image Support writing quote tweets with attached images May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants