-
Notifications
You must be signed in to change notification settings - Fork 119
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
Option to get alt text from Original File. #1024
Conversation
Testing this, and I think I have it configured correctly: But the alt text from my Original File is not propagating down to Service File or Thumbnail. Can confirm this is from |
I had to clear cache a lot. And I see you have it on "source" which is the view mode of the default display - that's better than I did several times while testing. 😅 |
Also I'm not sure what you're doing to look at thumbnails. The current starter site used DGI Image Discovery which doesn't work with this (it has its own display form). And if you turned on the option for media to have their own URLs, they're probably displaying as Default view mode. So this only works in the starter site with service file images that get displayed on the node. |
Sorry, no luck after pulling in your latest changes, resaving my display mode config form, and clearing the cache a bunch of times. I am now getting the following error when I view an image node with service file:
|
I don't understand how this could happen. |
I did something stupid. That explains a lot! Let me test again later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't able to reproduce @mjordan's issues, noted a couple things. Can assign back to me when you have a chance to sort through them. Feel free to ping me for clarity in Slack :)
For anyone else looking to test you should be able to do the following:
- Create a media view.
- Use the
image
field. - Configure the above field to use the
IslandoraImage
formatter and change the options as @rosiel describes.
Logic re-work and fixing a undefined method.
Further testing instructions:
If you make the alt text not mandatory (this is a Starter Site configuration) then the service file will not be automatically populated with bad alt text. I suggest we do this, once this is merged. If we don't populate the alt text with the title, then we will be encouraged to write real alt text, but i'll leave this to a different PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as advertised.
GitHub Issue: Islandora/documentation#2310
What does this Pull Request do?
When configuring an image formatter (e.g. in Manage Display), you can now choose to get your alt text from the Original File.
This would work well if we made Alt Text not mandatory. When alt text is mandatory, the derivatives come with alt text equal to the filename. (When alt text is not mandatory, the derivatives don't have alt text).
What's new?
Options for alt text:
none (dont render alt text; useful for thumbnails or decorative images)
Local (get the alt text from the media being displayed)
Local with fallback to Original File (use local alt text if present, otherwise get it from the original file)
Original file (use the alt text from an original file).
Does this change add any new dependencies? no
Does this change require any other modifications to be made to the repository
(i.e. Regeneration activity, etc.)? no
Could this change impact execution of existing code? no
How should this be tested?
Documentation Status
Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora/committers