-
Notifications
You must be signed in to change notification settings - Fork 2
Add support for providing alt text #4
base: glitch
Are you sure you want to change the base?
Conversation
@jamietanna thanks for the patch! love that it is short and readable. I would definitely appreciate it if you could test it out before merging. it would bring me great joy to know that at least one other person in the world has been able to get it up and running. 😅 |
It looks like we've been using JSON encoded requests, which is the default method for the micropub-helper library. Form-encoded is generally easier for servers to implement, and as we've advertised on the /preview/ page, so we should try and use that instead of JSON. This requires a slightly different interface to use, so we need to restructure how we send the request.
We can validate that it is both present, and has non-zero length to prevent false positives.
To make published GIFs, via Micropub, more accessible, we should allow alt text to be added to the images. As per conversation on martymcguire#3, this can't be reliably done through the Gfycat API, so we should instead allow the user to provide this information. As we're using a JSON post, we need to construct an object for the photo property as per https://micropub.spec.indieweb.org/#json-syntax Closes martymcguire#3.
4f5fde4
to
622149d
Compare
Sure thing! Check out https://pie-mesquite-environment.glitch.me/ for the updates. It looks like we're advertising we're using form-encoded requests, although we're sending JSON, so I've amended that - let me know if you'd prefer to stick with JSON. The other thing that we should think about is the "Plumbing Details" section, which currently doesn't include the alt text - I think we'd have to do it via client-side JS, which I'm happy doing, just want to see your thoughts |
@jamietanna wowow good find that the micropub client was actually sending JSON all along! 😅 Totally agree that the "Plumbing Details" section should be updated whenever the alt text entry is updated. As should the 'copy-and-paste-this' textarea that shows up for people who aren't signed in! It's fun that so far Kapowski doesn't require any client-side JavaScript, so I'd love your thoughts on these options:
|
Thinking harder on this, I am wondering if it would be more widely-supported to resume sending JSON as before and update the Plumbing Details to reflect that. For example, none of the micropub endpoints that I run have support for doing anything with |
Hmm that's interesting. I've always assumed that form-encoded endpoints are more widespread 🤔 Happy to move it to back to JSON though, and see about inserting another page in the journey |
@jamietanna haha i am not surprised that we have different assumptions! it may be the case that form-encoded-accepting endpoints are more common than json-accepting ones. however, i'm definitely open to discussion on this! |
To make published GIFs, via Micropub, more accessible, we should allow
alt text to be added to the images.
As per conversation on #3, this can't be reliably done through the
Gfycat API, so we should instead allow the user to provide this
information.
As we're using a JSON post, we need to construct an object for the
photo property as per https://micropub.spec.indieweb.org/#json-syntax
Closes #3.
I've not been able to test it as I've not gone through the process to set up with a Gfycat OAuth2 consumer, would you prefer that before we merge?