User tests: Successful: Unsuccessful:
Pull Request for Issue #31026 .
Remove the width and height field for images, add an image class field instead like in other images in j4.
Make a module of type random image.
With the image class field, it is possible to add a own class and style it, no override is needed.
see #31026 .
Random images can be styled as the user likes,
maybe
Status | New | ⇒ | Pending |
Category | ⇒ | Language & Strings Modules Front End |
I have tested this item
I have tested this item
This isnt quite correct. Not only are you adding an image class but you are also removing the width and height. Why?
Regarding the image folder isnt there a defined variable for the base images directory in com_media?
@brianteeman I removed width and height as we did for other images in j4.
Adding an individual class to the image allows users adding own css definitons also for width and height, using px, em, rem or whatever they want.
Labels |
Added:
?
?
|
Revert form field folder.
I have tested this item
I have tested this item
Last change was only code style, so previous test results are still valid. I've restored them in the issue tracker.
I have tested this item
Works well, tested with bootstrap image classes.
Removal of width and height and usage of image classes is consistent with other places where we define images.
Custom image folder in Joomla root works well.
Status | Pending | ⇒ | Ready to Commit |
RTC
Thank you for testing.
As it is now, everyone can style the images as he/she wants.
But there is a gap for migrating from older versions, where maybe width and height for images is set and would be a b/c thing.
Re-Adding width and height as it was before could be done but:
Would be great to have some thoughts @richard67 @brianteeman?
Why not simply ADD your new field to the existing module?
Hmm, the existing code (without this PR) seems to add width and height to the image in any case.
When having a new class field like the one added by this PR, we can use the class in addition to width and height, like e.g. some bootstrap 5 classes for round corners.
But we also might want to use some own class for specifying dimensions. For this use case I think it could be useful to have some way to switch off the width and the height field.
Unfortunately they are integer fields, so there is no option for "no value".
Maybe we could agree to use zero value for that purpose, and in this case not add the corresponding property (width or height) to the image.
Hmm, the existing code (without this PR) seems to add width and height to the image in any case.
That could be changed to only add if present
Hmm, the existing code (without this PR) seems to add width and height to the image in any case.
That could be changed to only add if present
Yes, that was what I was thinking about. But what means "present" in case of an integer field? Greater than zero?
Another thing is that the existing field hard-codes the unit to "px", no way to use "em", "rem", ...
Maybe we should have separate value and engineering unit fields for each width and height?
Maybe it can be done in 2 steps:
What do you think?
@richard67 yes, will do that. With respecting #22065.
If you want to properly support lazy loaded images (and that's what we are aiming for in Joomla 4), a width and height of the image is needed. IMO this is wrong to remove the sizes of the image.
If you want to properly support lazy loaded images (and that's what we are aiming for in Joomla 4), a width and height of the image is needed. IMO this is wrong to remove the sizes of the image.
Thank you! Will re-add fields asap.
Status | Ready to Commit | ⇒ | Pending |
set back to pending as requested
I have not tested this item.
We have tested it before the new updates and work correctly with nightly 17 feb
Labels |
Added:
?
|
Title |
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-14 23:48:52 |
Closed_By | ⇒ | chmst | |
Labels |
Added:
Language Change
?
?
Removed: ? ? ? |
I have tested this item✅ successfully on 94aa375
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32075.