-
Notifications
You must be signed in to change notification settings - Fork 81
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
A new documentation page and layout fixes for KBreadcrumbs #292
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
236c208
Add a documentation page for KBreadcrumbs
MisRob d4b4225
Consolidate breadcrumbs alignment
MisRob 03f7ad4
Do not attach resize sensor on each breadcrumb item
MisRob 2d5f77e
Do not use Vue options object for the throttled update function
MisRob f8c095f
Do not truncate the last breadcrumb item
MisRob e17f337
Add guidelines on showing a single breadcrumb
MisRob 5ce7995
Merge branch 'main' into kbreadcrumbs
MisRob 7db31b5
Update changelog
MisRob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
|
||
<DocsPageTemplate apiDocs> | ||
|
||
<DocsPageSection title="Overview" anchor="#overview"> | ||
<div> | ||
Breadcrumbs help understand the hierarchy among levels and a user's location in it. We often use breadcrumbs to aid navigation across channels, topic trees, and resources. | ||
|
||
<DocsShow block> | ||
<KBreadcrumbs | ||
:items="[ | ||
{ text: 'Global Digital Library', link: { path: '#' } }, | ||
{ text: 'English', link: { path: '#' } }, | ||
{ text: 'Level 2 ', link: { path: '#' } }, | ||
]" | ||
/> | ||
</DocsShow> | ||
</div> | ||
|
||
<div> | ||
Breadcrumbs take the full width of their container. When there is not enough space available, items that can't be displayed will automatically collapse into the drop-down and visible items might also get truncated: | ||
|
||
<DocsShow | ||
block | ||
:style="{ maxWidth: '500px' }" | ||
> | ||
<KBreadcrumbs | ||
:items="[ | ||
{ text: 'Global Digital Library', link: { path: '#' } }, | ||
{ text: 'English', link: { path: '#' } }, | ||
{ text: 'Level 2 ', link: { path: '#' } }, | ||
{ text: 'Kaka and Munni: A Folktale from Punjab', link: { path: '#' } } | ||
]" | ||
/> | ||
</DocsShow> | ||
</div> | ||
|
||
<div> | ||
When there is only one item, it won't be displayed by default. You can set <code>showSingleItem</code> to <code>true</code> to show it: | ||
|
||
<DocsShow block> | ||
<KBreadcrumbs | ||
:items="[ | ||
{ text: 'Global Digital Library', link: { path: '#' } }, | ||
]" | ||
showSingleItem | ||
/> | ||
</DocsShow> | ||
</div> | ||
</DocsPageSection> | ||
|
||
<DocsPageSection title="Placement" anchor="#placement"> | ||
<ul> | ||
<li>Directly above the content to be navigated through</li> | ||
</ul> | ||
</DocsPageSection> | ||
|
||
<DocsPageSection title="Guidelines" anchor="#guidelines"> | ||
<ul> | ||
<li>It should include the current item</li> | ||
<li>The current item can be repeated in a page header</li> | ||
<li>Allow the single breadcrumb (<code>showSingleItem=true</code>) only when there isn't any other page header or label that shows what the current level is</li> | ||
</ul> | ||
</DocsPageSection> | ||
</DocsPageTemplate> | ||
|
||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This makes sense thanks for the explanation!