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

Support adding image descriptions #10

Closed
IBBoard opened this issue Sep 1, 2019 · 1 comment
Closed

Support adding image descriptions #10

IBBoard opened this issue Sep 1, 2019 · 1 comment
Labels
accessibility design UI and design issues enhancement New feature or request

Comments

@IBBoard
Copy link
Owner

IBBoard commented Sep 1, 2019

For accessibility, we should support adding image descriptions.

The API is documented at https://developer.twitter.com/en/docs/media/upload-media/api-reference/post-media-metadata-create

(Reported by @lucaswerkmeister as baedert/corebird#678)

@IBBoard IBBoard added the enhancement New feature or request label Sep 1, 2019
@IBBoard IBBoard added the design UI and design issues label Sep 1, 2019
IBBoard added a commit that referenced this issue Aug 9, 2020
Tweets use t.co URLs and so all links count as their shortened length.
Descriptions don't shorten URLs, but do use the Twitter weighting rules.
We now have a short-circuit that does the counting without tokenising
so that it just counts raw characters.
IBBoard added a commit that referenced this issue Aug 9, 2020
This is currently a modal dialog. It appears to work *except* that when
posting the tweet then the Twitter API doesn't return the descriptions
to you, so your own tweets won't show the descriptions
until you close and reload all tweets (or view through Profile view etc)
@IBBoard
Copy link
Owner Author

IBBoard commented Aug 9, 2020

To do:

  • Save and load image descriptions when saving tweet
  • Save and load image descriptions for favourite images
  • Fix Twitter's oversight where the description doesn't come back in the posted tweet's JSON

IBBoard added a commit that referenced this issue Aug 13, 2020
IBBoard added a commit that referenced this issue Aug 13, 2020
It helps to be able to see what you're describing!

Also improved accessibility of the text length counter
IBBoard added a commit that referenced this issue Aug 14, 2020
Before we could increase but never shrink.

Now we can resize, but sometimes the text input disappears
off the bottom of the window for some reason.
IBBoard added a commit that referenced this issue Aug 15, 2020
Code copies from MediaButton but we don't do the prelight
so we don't need all the baggage that comes with it.
IBBoard added a commit that referenced this issue Aug 15, 2020
Minimum should be actual minimum, not "the smallest we'd like
at the moment".

Increased minimum to 120px because 40px images are tiny and this
is meant for previewing images when describing them.
IBBoard added a commit that referenced this issue Aug 15, 2020
If we load images in the constructor then button hit-zones go under
the image but new images have the buttons fully accessible.
But the buttons are still visible, so it's not a complete z-index mixup.

By hooking in to "show()" we can load images late enough that
GTK behaves differently and stacks the button hit-zones correctly.
IBBoard added a commit that referenced this issue Aug 15, 2020
Now that we have top and bottom buttons, the alignment is better
if images, completion check marks and progress bars are centralised
IBBoard added a commit that referenced this issue Aug 15, 2020
There's no point hacking them in now if the new API does the right thing
@IBBoard IBBoard closed this as completed Aug 15, 2020
IBBoard added a commit that referenced this issue Aug 22, 2020
Tweets use t.co URLs and so all links count as their shortened length.
Descriptions don't shorten URLs, but do use the Twitter weighting rules.
We now have a short-circuit that does the counting without tokenising
so that it just counts raw characters.
IBBoard added a commit that referenced this issue Aug 22, 2020
This is currently a modal dialog. It appears to work *except* that when
posting the tweet then the Twitter API doesn't return the descriptions
to you, so your own tweets won't show the descriptions
until you close and reload all tweets (or view through Profile view etc)
IBBoard added a commit that referenced this issue Aug 22, 2020
IBBoard added a commit that referenced this issue Aug 22, 2020
It helps to be able to see what you're describing!

Also improved accessibility of the text length counter
IBBoard added a commit that referenced this issue Aug 22, 2020
Before we could increase but never shrink.

Now we can resize, but sometimes the text input disappears
off the bottom of the window for some reason.
IBBoard added a commit that referenced this issue Aug 22, 2020
Code copies from MediaButton but we don't do the prelight
so we don't need all the baggage that comes with it.
IBBoard added a commit that referenced this issue Aug 22, 2020
Minimum should be actual minimum, not "the smallest we'd like
at the moment".

Increased minimum to 120px because 40px images are tiny and this
is meant for previewing images when describing them.
IBBoard added a commit that referenced this issue Aug 22, 2020
If we load images in the constructor then button hit-zones go under
the image but new images have the buttons fully accessible.
But the buttons are still visible, so it's not a complete z-index mixup.

By hooking in to "show()" we can load images late enough that
GTK behaves differently and stacks the button hit-zones correctly.
IBBoard added a commit that referenced this issue Aug 22, 2020
Now that we have top and bottom buttons, the alignment is better
if images, completion check marks and progress bars are centralised
IBBoard added a commit that referenced this issue Aug 22, 2020
There's no point hacking them in now if the new API does the right thing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility design UI and design issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant