Post Title block: Consider having the "Make title a link" setting on by default in Query Loop context
What problem does this address?
This was brought up as part of the tenth call for testing for the FSE Outreach Program:
If I’m adding posts with the query loop, I don’t see why the “link to post” option shouldn’t be on by default. I might be missing something, but I’d personally make posts linked by default and remove the Link settings / Link to posts toggle. Who wants to create an index of posts and have no links on these posts?
Currently, if you add a pattern built into the Query Loop block, the option is on by default. However, if you add the Post Title block in isolation to the Query Loop, the option is not enabled. Here's a quick video:
https://user-images.githubusercontent.com/26996883/137775529-916eb028-bc03-47ca-adb7-fa84cbc21862.mov
This feels similar to the navigation block having the responsive option on by default https://github.com/WordPress/gutenberg/issues/34511
What is your proposed solution?
Consider enabling the "Make title a link" by default. cc @ntsekouras for thoughts :) as I have a feeling this is more complicated than it might appear.
Consider enabling the "Make title a link" by default. cc @ntsekouras for thoughts :) as I have a feeling this is more complicated than it might appear.
Actually it is a bit as it seems we need to find a solution soon for dynamic block deprecations. See discussion: https://github.com/WordPress/gutenberg/discussions/35663.
The problem here is that while the client/editor deprecation is easy, in the server side we don't have a way to know what default value to set.. 😨
Not sure it would be such a good idea to make the Post Title a link by default, as this block is also used in templates such as Single and Page where you wouldn't really need the title to link to itself by default.
Thanks for the wider context @ntsekouras. As for the use case you shared @Sandstromer, I was wondering the same thing! That was the only other use case I could come up with that might make this a no-go.
I'm guessing this also ties into whether a block is context aware (post title block being added to query loop vs a template).
For now, I'll keep this issue open but will rename to make it specific to the Query loop in case this can be revisited in the future.