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 option to make Post Featured Image a link #25714
Conversation
|
Size Change: -157 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
| }, | ||
| "linkTarget": { | ||
| "type": "string", | ||
| "default": "_blank" |
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.
Why are we defaulting to _blank?
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.
Hm.. I guess it was natural to me as I've been expecting and prefer that approach, but after your comment and some research seems to be incorrect. Thanks for pointing this out Ari.
I have pushed the changes to default and changed PostTitle default as well.
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.
Thank you @ntsekouras! LGTM 👍
|
Hey @jasmussen!
Actually no. There are two cases where a placeholder is shown.
I pushed a new. commit to show in both cases the You can test this with Query block as well. |
|
Nice, this is closer. I see this when no featured image: And this when I do: The link UI is rather different than the Image link UI, though: This presents a few questions:
|
|
Should it even have the "Open in new link" option? Since the image will always link to the same thing and is not editable, I don't think we'll ever need to open in a new tab... 🤔 |
|
Great questions!
It links to the entity and not the image. I think it might be considered to link to the image in a follow up PR. It doesn't make much sense to me to allow a custom link as this can be achieved with the
That makes sense yes. Especially in Query block usage.
The label could become more specific like I'll make the above changes. |
|
To be clear, what I'm advocating for is to start with fewer features. It's always easier to add features once it becomes evident that they are necessary, whereas it is often hard to remove features when they turn out to be mostly unnecessary. In that vein, I would recommend:
Nice. Can we shorten it and be more action'y? Such as: |
|
The changes I made are:
|
* Add option to link Post Featured Image * make default to open in same tabs * show chip in both cases for placeholder * address review feedback * fix whitespace
* Add option to link Post Featured Image * make default to open in same tabs * show chip in both cases for placeholder * address review feedback * fix whitespace
* Don't use _blank unless needed * now expects _self * done in #25714 * Revert category changes





Description
This PR adds an option to make Post Featured Image block a link.
It handlestargetandrelattributes as well.How has this been tested?
Locally
Checklist: