Skip to content
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

refactor(theme-classic): little breadcrumbs improvements #6932

Merged
merged 2 commits into from
Mar 17, 2022

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Mar 17, 2022

Motivation

Don’t link current page in breadcrumb navigation
The last item in the breadcrumb trail (current user’s location) is optional — if you want to display it, make sure that it’s not clickable or tappable. Since users are already on the page, it does not make any sense to add a link of the current page to the breadcrumb navigation.

  • clean up CSS styles -- background for breadcrumb item is supposed to apply only to active state (hover or current item), now it looks weird, so I don't see the point in changing that default design.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

@lex111 lex111 added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Mar 17, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Mar 17, 2022

@media (min-width: 997px) {
.breadcrumbsItemLink {
--ifm-breadcrumb-size-multiplier: 0.8;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it dead code right now, or should the breadcrumb items size be bigger on desktop?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 I don't remember, but that looks fine to remove it 👍

@netlify
Copy link

netlify bot commented Mar 17, 2022

✔️ [V2]

🔨 Explore the source changes: 679f91b

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/62336f7ddc415c0008a14e65

😎 Browse the preview: https://deploy-preview-6932--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Mar 17, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 54
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-6932--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Mar 17, 2022

Size Change: -247 B (0%)

Total Size: 792 kB

Filename Size Change
website/build/assets/css/styles.********.css 105 kB -247 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 49.9 kB
website/build/assets/js/main.********.js 599 kB
website/build/index.html 38.7 kB

compressed-size-action

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before:

image

After:

image

I don't have a strong opinion on this, both look fine to me 👍

Wonder if the icon size change was on purpose? Maybe it's a bit too small now?


Also wondering if the :hover effect on the breadcrumb item shouldn't be disabled if the category has no link?

cf:

image

https://deploy-preview-6932--docusaurus-2.netlify.app/docs/migration/automated/


@media (min-width: 997px) {
.breadcrumbsItemLink {
--ifm-breadcrumb-size-multiplier: 0.8;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 I don't remember, but that looks fine to remove it 👍

@lex111
Copy link
Contributor Author

lex111 commented Mar 17, 2022

Wonder if the icon size change was on purpose? Maybe it's a bit too small now?

I would use 0.8 multiplier, so yes, maybe worth to increase by 0.1 for all devices.

Also wondering if the :hover effect on the breadcrumb item shouldn't be disabled if the category has no link?

Don't think so, the active state should be the same whether item is a link or not.

@slorber
Copy link
Collaborator

slorber commented Mar 17, 2022

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants