Open markcaron opened 5 months ago
Worth discussing: should we have a standard version and one with lighter gray chevrons (to lessen the visual noise on long form content)?
PF's design:
#151515
Use on the Portal:
#8a8d8d
—> which should be #707070
(--rh-color-gray-50
)Figma Design Spec for <rh-breadcrumbs>
is available.
Wondering if this one will have guidance for mobile. For example, truncating works when there aren't too many levels like resource pages on WWW, but when there are more levels it would be useful to keep them and maybe have them wrap? (see screenshot)
Or even if we should keep them on mobile or not. Customer portal drops theirs.
@coreyvickery: do you have guidance for breadcrumbs on mobile?
Generally, I think having the text wrap is standard for most orgs.
@coreyvickery: do you have guidance for breadcrumbs on mobile?
Generally, I think having the text wrap is standard for most orgs.
@adamjohnson I would expect the >
icon and text to wrap. These templates truncate text which I do not think is helpful. I would prefer it looked like:
Large viewports:
Topics > Understanding cloud computing > What are cloud services?
Small viewports:
Topics > Understanding cloud computing >
What are cloud services?
Even smaller viewports:
Topics > Understanding cloud
computing > What are cloud
services?
I would avoid having the >
icon at the beginning of a line if we can.
Let me know if you need further guidance like spacing!
@adamjohnson Or we could try another approach similar to IBM Carbon where they are breaking each step at a given container size.
What do you think would be best?
Or we could try another approach similar to IBM Carbon where they are breaking each step at a given container size.
Wrapping is fine.
I would avoid having the > icon at the beginning of a line if we can.
Can do.
Note: the design spec truncates the final breadcrumb item if it's over 27 characters.
Home > About > Longer Breadcrumb Item Righ...
Would you want "Home"/"About" to truncate if they are longer as well?
@adamjohnson No, I think the previous steps should be visible.
I am fine with the last step being truncated because the headline is literally right below.
Instead of the above, I would think it would look like this:
Topics > Application modernization > What is Java application moderniz ...
Maybe two lines max and then truncation no matter what.
Maybe two lines max and then truncation no matter what.
for longer paths, i wouldn't want to only limit them to two lines
also, if it hasn't been added yet... would be nice to have guidance around how far back to have the path go, for example all the way to "home," and placement / alignment of breadcrumbs on the page -- they're all over the place now
We could approach it like Google Drive's breadcrumbs. They use text-overflow: ellipsis
on the links to visually truncate rather than actually truncate:
And when it nests too deep, it uses a single ellipses to represent more than one level. Clicking the ellipses takes you to whichever "directory" / "link" is the deeper child.
I wanted to put these WIP Breadcrumb deploy preview links here so that people can see what this looks like now:
The only truncation happening at the moment is on the current page when it's below 992px. The breadcrumbs <ol>
will wrap beyond two lines. Users can modify margin, padding, background colors etc. as needed since this component uses lightdom.
Here's breadcrumb component examples from other WC libraries that don't truncate and just wrap text:
Looking at Mark's examples (above), that pattern is interesting from a design and engineering point of view; however, I'm not sure how useful that is to the user since, at smaller viewports, you only get 1-2 letters of a word/words.
Atlassian has an interesting take on breadcrumbs, which is somewhat similar to Patternfly. I personally like Atlassian's implementation better, but YMMV.
With this in mind, here's the solutions that have been proposed:
My vote would be to go with option one or two, but am open to other ideas.
@adamjohnson @wesleymiles Thanks for your input, we can show more lines on mobile.
Funny about that Atlassian link, I was typing this last night.
What is the longest path you have seen? Would we ever expect to see something like six links or something? Should we set a link number limit before truncation? Something like this:
Home > Link 1 > ... > Link 5 > Link 6
Or even truncate the Home link:
... > Link 4 > Link 5 > Link 6
What is the longest path you have seen?
also like atlassian's solution. could we set auto-collapse based based on the # of lines? or maybe that's what you mean with your proposal #3 @adamjohnson.
@adamjohnson @wesleymiles I'm going to start a separate Figma file to explore creating more design options. I'm really hoping this can be included in the Charmander
release.
I'm prototyping the Atlassian solution now. Would love to see what you come up with, Corey.
@adamjohnson Here are some more explorations and specs.
@adamjohnson Very small updates.
Default
variantblue-50
gray-95
gray-95
Subtle
variantblue-50
gray-50
gray-60
Default
variantblue-30
white
white
Subtle
variantblue-30
gray-40
gray-30
@adamjohnson Hover colors in case you need them.
blue-70
blue-20
Looking at the Figma mockup, I'm thinking we should get out an MVP following the "Responsive approach 1".
If we can get "Responsive approach 2" working in the future with a container controller / query, that would be ideal, and we could upgrade to that in a future version.
@adamjohnson How's it going with this?
@adamjohnson How's it going with this?
Check out the DP at https://github.com/RedHat-UX/red-hat-design-system/pull/1535/ 👍
@coreyvickery (and @adamjohnson if you have time), here's a mock up of the breadcrumb docs. Let me know if you see anything that should be included, removed, or edited!
We need a Breadcrumb component for use across applications and websites.
The good news is that it seems we have a very closely aligned pattern across PatternFly and our web properties already. We will need to have a design spec created for documentation and made available in Figma.
Steps
Resources
Breadcrumb best practice
From WAI's breadcrumb pattern: