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

Add support for a per-view custom alt tag #370

Merged
merged 6 commits into from
May 14, 2020
Merged

Add support for a per-view custom alt tag #370

merged 6 commits into from
May 14, 2020

Conversation

zackdotcomputer
Copy link
Contributor

Description of changes:
Adds support for a view to have an alt property that will be set as the alt tag on the rendered image. This will override the caption if present and will not render anywhere else.

This also adds a section to the README documenting the caption, alt, and source properties on ViewType.

Related issues (if any):
#369 - This is responding to confusion if using the HTML-as-caption feature without overriding the alt formatter.

Checks:

  • Please confirm yarn run lint ran successfully
  • Please confirm that only /src and /examples/src are committed
  • [if new feature] Please confirm that documentation was added to the README.md

@davwheat
Copy link
Collaborator

Looks fab! Thanks for the PR (again)!

@zackdotcomputer
Copy link
Contributor Author

zackdotcomputer commented Apr 27, 2020

No problem at all, thanks to you to helping maintain this! I spent all day (eh tbh like 20 minutes) looking at react lightboxes and it's clear this one is the best free one out there, so I'd be remiss to just use it without helping out.

@zackdotcomputer
Copy link
Contributor Author

(Fwiw I can't merge so I'll just leave this for someone with commit rights to close)

@davwheat davwheat self-assigned this Apr 27, 2020
README.md Outdated Show resolved Hide resolved
src/formatters.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@davwheat davwheat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see the console warn you're talking about. Could you point me to it?

@zackdotcomputer
Copy link
Contributor Author

Sorry @davwheat - I think my git repos were in a weird state. Force pushed this branch and it's showing up now here.

@zackdotcomputer
Copy link
Contributor Author

Oops - forgot to hit "re-request review" - lemme know if there's anything else you'd like changed here @davwheat .

@davwheat davwheat merged commit 9b34b3e into jossmac:master May 14, 2020
@zackdotcomputer zackdotcomputer deleted the fix/alt-tag branch May 14, 2020 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants