-
Notifications
You must be signed in to change notification settings - Fork 28
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 breadcrumbs to cli/commands. #336
Conversation
@ndiego Thoughts? |
If we do add this we'll need to adjust the vertical position of the ToC; it should align with the title. |
I'm getting no table of contents on the staging env (well, i'm getting the back to top). |
Also, if we implement #312, then I imagine it will just work...? |
That search bar with bottom border is only for handbook pages if I understand it correctly. |
Breadcrumbs appear from the third level and beyond (Home / Level 2 / Level 3). The idea was to avoid duplicative content as in level 2's pages local nav shows the current page in bold. So in the nested page example, it's correct to show it.
|
Ah ok, so I think we only need to add this to single-command.html |
@fcoveram Does that mean it shouldn't be in the block editor handbook? |
Exactly. To assess the change impact, which site sections will have this change? I'm thinking of Developers, Showcase, About WordPress, and News. The idea of showing it from level 3 is to diminish location redundancy. But in the case of Articles, it feels weird landing on its main page without breadcrumb and then seeing it in all internal pages. |
Currently, most of the pages on developer sites display breadcrumbs at 2 levels. And after chatting with @fcoveram, we agree that it makes sense to display the breadcrumbs from Note: In our discussion, it was mentioned that how we describe the levels is slightly off. |
2dea02c
to
aad6ff7
Compare
I have already added the pages missing the Additionally, I have temporarily re-added the 'reference' to the breadcrumbs for now.
Update |
Thanks @renintw for addressing this.
That statement shared by me days ago is slightly incorrect. There are L1 pages not displayed in the local nav menu, so displaying them is safer than not. That's the rationale behind this decision. |
source/wp-content/themes/wporg-developer-2023/templates/archive-command.html
Show resolved
Hide resolved
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.
Nice work, I like how this simplifies the template setup.
A couple of comments inline.
One more adjustment required now that the CLI Command archive has breadcrumbs; we need to remove this custom ToC spacing rule: https://github.com/WordPress/wporg-developer/blob/trunk/source/wp-content/themes/wporg-developer-2023/src/style/style.scss#L407
Removing that should fix the misaligned ToC and H1:
Since the CLI Command archive has breadcrumbs now, The misaligned ToC and H1 can be fixed through removing it.
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.
LGTM
This PR adds the breadcrumbs to
cli/commands
.I realized after logging an issue that the designs don't have the breadcrumb. However, I don't understand why this page would not have it when the block-editor handbook landing page and other landing pages have it.
It's also linked in deeper nested pages as the parent and last production currently has the breadcrumb there.
Screenshot
Nested Page