Feature implementing images without text, but with a link.
Add image with link but no text option #72
image-link--no-text into main
Looks like a good start, a few comments
@ -27,3 +27,3 @@
return [
'href' => 'nullable|string',
'alt' => 'nullable|required_with:href|string',
'alt' => 'nullable|string', // required_with:href|
👍- I think it's fine to delete the old thing entirely instead of commenting it out - we can always find it in the git history if needed.
@ -52,3 +47,1 @@
'tagName' => 'div',
'className' => 'image-preview-parent',
];
if (! $image->pivot->href) {
so we have 3 cases: 'link and text', 'no link and text', and 'link and no text'. I think it would be more readable to have those at the same 'level': so instead of "if .. else { if .. else .. }" write it as "if .. elseif .. else .."
@ -55,0 +54,4 @@
'className' => 'image-preview-parent',
];
} else {
// External link to be opened in new browser tab
This is not necessarily true here, right? This might be a good opportunity to move the logic to determine whether the link is external or not to a re-usable function.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?