Closed (fixed)
Project:
Entity Embed
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Dec 2018 at 10:17 UTC
Updated:
10 May 2019 at 12:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gngn commentedComment #3
oknateI can mark #2 RTBC. The text added shows when hovering over the image.
But I have a few issues with the text displayed. I'm not sure why we need to change it from the alt text. Couldn't we use the same text?
Also, a few side notes:
1) I don't think we should hard-code height and width attributes on the image. The image used is natively 180x180.
2) Additionally, I think we should add a class so that themers can adjust the size if they like. For example, on retina screens, I think 90x90 looks good.
3) Some times entities fail to load for other reasons than the entity having been deleted. I propose changing the text to something more generic such as "Content not found". It could potentially be confusing for editors who think content is being deleted, when in fact, there's some other type of error that is causing it to fail loading.
I'm adding an alternate patch that removes the width and height attributes, adds a class and changes the verbiage.
Comment #4
gngn commentedI thought that height and width are required attributes. But you're right, they are not.
CSS class is useful and I think your text is OK.
Comment #5
wim leersWe need to.
widthandheightattributes on images are essential for fast rendering performance in browsers; otherwise they need to reflow everything they've rendered once the images arrive.In the future, we probably want to replace this with a customizable template. Right now, to swap out the "no thumbnail" image, you'd have to create a new
@Filterplugin.And if we turn this into a template, adding classes for themers becomes very easy to do.
So let's instead of doing #3 create a new issue to use a template rather than hardcoded HTML for deleted content.
\Drupal\filter\Plugin\Filter\FilterCaptionalready contains an example for this.Meanwhile, I'm going ahead and committing #2.
Comment #6
wim leersComment #7
wim leersComment #9
wim leersTagging for follow-up issue to introduce a template per #5.