-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Breadcrumbs: Add home page handling and show last item attribute
#72839
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
base: trunk
Are you sure you want to change the base?
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +83 B (0%) Total Size: 2.38 MB
ℹ️ View Unchanged
|
|
Seems valid enough. "Display breadcrumbs on the site front page and blog posts index" help text reads sligthly roundabout. If we're referring to the template types on which it will show, we should probably refer to those directly. Something like (but please correct me if I get this wrong):
|
@jasmussen after thinking about it more, I'm not sure we should mention templates because there can be cases a user assigns a specific page for his home page and Maybe the best path forward is the reduction of the message like the label does I think it's fine to refine text in follow ups too, but for me it's more important for this PR to explore or validate the initial design and/or placement of these settings. Is it fine to start with them under advanced like this PR or we should explore something different? |
|
I like the simple "Show on home page", with no help text. 👍 👍 |
a5a624d to
7c7a486
Compare
|
Flaky tests detected in e6722c4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18967529831
|
Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
| <InspectorControls group="advanced"> | ||
| <CheckboxControl | ||
| __nextHasNoMarginBottom | ||
| label={ __( 'Show on home page' ) } |
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.
I think this setting might be a bit confusing. Say I'm inserting breadcrumbs in a template or page that has nothing to do with the home page - that setting would be irrelevant to me. Might make sense to clarify (through help text perhaps) that this setting only applies to when the block is displayed on the blog home or the front page.
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.
Actually we had this at first and removed it.
No strong opinions here and it's something easy to update. Just mentioning for comparison, Justin's plugin doesn't have a help text related to templates etc..

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.
The help texts you're showing seem a bit redundant. "Show last breadcrumb" and "Last breadcrumb item is shown" are equal to me.
That being said, for someone who inserts the breadcrumbs in a search or archive template, the "show on homepage" setting is particularly irrelevant. What does the homepage have to do with that context? So I think a minor clarification could be helpful.
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.
The help texts you're showing seem a bit redundant.
I don't disagree. It's just a reference to Justin's plugin that we aim to match a lot of functionality, but it doesn't mean we can't improve some things like this.
For the other part of your comment I have this in the description:
This setting is only useful when the user would want to have a single breadcrumbs block in the site header and is similar to Prefer taxonomy terms setting. That's the reason I've added it under advanced. We could leave it there or we could consider a different design for showing/editing these two attributes.
and in this comment.
I'd say after all the discussions around the block, that we should aim for it to be used in a single place in the site and this is why these two settings make sense to exist in the block.
So, how can this PR move forward? Bring back the help text that we removed after discussion with @jasmussen or consider a different placement of these settings?
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.
I'd be curious to hear @jasmussen's response on my thoughts above, but I'm generally not interested to block this work for a long time. If y'all agreed on it already, I'm happy to move along. Feel free to move on with the PR and we can discuss this in a separate issue. WDYT?
What?
Part of: #72498 and #72649
This PR does a couple of things:
is_home() && is_paged()it also shows the page trail. This setting is only useful when the user would want to have a single breadcrumbs block in the site header and is similar toPrefer taxonomy termssetting. That's the reason I've added it underadvanced. We could leave it there or we could consider a different design for showing/editing these two attributes. --cc @jasmussenTesting Instructions
show last itemattributeonein reading settings.Screenshots or screencast