Problem/Motivation

At the moment the breadcrumbs for individual module pages in project browser are sort of confusing. Taking a look at the following screenshot
drupal content header in claro with its breadcrumb and the top of the individual module page in project browser with the project browser breadcrumb additionally
you see the breadcrumb pattern for the content header in Claro with arrows pointing from left to right. It is three levels deep and all steps as well as home are links. The current overall page is called Browser Drupal.org projects.
In contrast the breadcrumb for project browser is a single level deep. The final item Pathauto is not a link in contrast to the other breadcrumb which is considered the correct behaviour (https://www.nngroup.com/articles/breadcrumbs/ - point 2). But its arrows point in the opposite direction from right to left and in that direction the last item has another arrow appended. the user might think or ask is there another level to reach afterwards. And the link is called browse instead of browse drupal.org projects. functionally the project browser breadcrumb is a "back button". Second if you compare the two breadcrumbs in the screenshot you will notice that the styling is not in line with the Drupal Design System.

Steps to reproduce

- Go to admin/modules/browse/pathauto

Proposed resolution

There are three options:
a) adjust the styling of the project browser breadcrumb to the Drupal Design system
- remove the arrow on the left of browse
- change the direction of the arrow in the middle from right to left to left to right
- change the styling of the browse link to 0.79em bold and color #222330
- change the styling of the module name to 0.79em bold and color #82828c
- the spacing between a link and the arrow is 0.75rem
anatomy and variants of breadcrumb in the drupal design system
b) remove the project browser breadcrumb
c) remove the project browser breadcrumb and replace it with a dedicated back to browsing button

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ☐ Automated tests needed/written?
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rkoller created an issue. See original summary.

diegors’s picture

Assigned: Unassigned » diegors

I'll work on that.

tim.plunkett’s picture

Category: Task » Bug report

dmariano made their first commit to this issue’s fork.

dmariano’s picture

Assigned: diegors » Unassigned
Status: Active » Needs review

Changes was made by me and @diegors.

fjgarlin’s picture

Status: Needs review » Needs work

Can you create an MR for it so the changes can be reviewed and tested. The tests will also run once you do it and they should come up green. Thanks.

diegors’s picture

Status: Needs work » Needs review

Remove the patch file from the commit and created the MR.

mpaulo’s picture

Assigned: Unassigned » mpaulo
Status: Needs review » Needs work

MR has a package-lock.json file, and has modified the yarn.lock.
Fixing this.

mpaulo’s picture

Assigned: mpaulo » Unassigned
Status: Needs work » Needs review
StatusFileSize
new58.42 KB

This issue is a great addition!

I've changed the arrow to the same SVG used on the Claro theme breadcrumb.
The text was also missing the bold font weight.

I wonder, however, if there was a way to use Drupal's top breadcrumb, instead, and if it would make sense from the UX perspective (of course).

Also, the top last breadcrumb ends in 'Browse projects' and the first PB's breadcrumb is 'Browse'

fjgarlin’s picture

Status: Needs review » Needs work

Bare in mind that we are covering both Claro and Seven as admin themes. There is a specific CSS file for each in the repo if needed. Maybe you could save the image so it can be easily re-used and then reference the file rather than loading the full SVG inline?

Also, tests aren't happy (green) yet. You need to make sure that they pass to get the issue moving forward. See the output from the link above in the failed test:

[warn] src/ModulePage.svelte
[warn] Code style issues found in the above file(s). Forgot to run Prettier?
error Command failed with exit code 1.
error Command failed with exit code 1.

So it seems that you need to run prettier, and then re-compile the files.

mpaulo’s picture

Issue summary: View changes
StatusFileSize
new39.75 KB

Using Seven, it could look like this: (not implemented)

Edit: I see the project has already a way to deal with different styles across these themes. The missing changes can be added there.
Edit 2: It looks like themability is an issue in discussion

rkoller’s picture

currently the merge request uses variant a) from the proposed resolution section in the issue summary. there is one problem in regards of consistency. even though the drupal design system uses the current page as the last element, not being a link, in the breadcrumb, but in current version of Drupal that isn't the case anywhere. the last element is the parent page in the breadcrumb. the bread crumb for project browser is for example Home > Administration > Extend. the issue gets emphasized and illustrated even more with the two bread crumbs right next to each other in drupal 7 (see the screenshot in #12 - thanks for the screenshot!).
It was definitely helpful to see one of the solutions and how it turns out in the interface but i would recommend to have a discussion which route to take - which was my initial intention by providing three options in the proposed resolutions section. Personally i lean towards option c). might be easy to implement, clear and not breaking any current patterns.

utkarsh_33’s picture

Assigned: Unassigned » utkarsh_33
utkarsh_33’s picture

Assigned: utkarsh_33 » Unassigned
Status: Needs work » Needs review
mpaulo’s picture

Bare in mind that we are covering both Claro and Seven as admin themes. There is a specific CSS file for each in the repo if needed.

Seeing two files, named claro.css and seven.css, led me into thinking these were being dynamically loaded, based on the installed admin theme.
Is this not the case?

mpaulo’s picture

StatusFileSize
new74.85 KB

Here is it looks on Claro after the last commits.

Currently, I don't see any implementation for conditional theming, based on the current active theme.

mpaulo’s picture

Status: Needs review » Needs work

Conditional theme styling seems to be something that needs to be addressed.

rkoller’s picture

fjgarlin’s picture

@mpaulo - I think the current implementation works well for both themes. The reason why I mentioned the theme files before was due to the previous iteration, but the current state of the MR has been simplified and works for both themes.

Having said that, the conditional theme styling could be a follow up issue, so feel free to create it.

rkoller’s picture

thanks for working on it @mpaulo. i've applied MR261 successfully. the only odd part is eventhough claro-arrow-left.svg is available in project_browser/images but in the browser i get a 404 no matter if i try it in safari, firefox or edge. not sure what is causing that behavior. :/

fjgarlin’s picture

I added a comment for a small refactoring which should also solve the issue that @rkoller reports.

rkoller’s picture

hmmm unfortunately the small refactoring hasn't solved the issue. the 404 persists for the svg.

fjgarlin’s picture

It was just a comment, not a code change. I'll let @mpaulo do the actual refactoring. Sorry it wasn't very clear.

The issue is in "Needs work", so I wouldn't try to test it again until it's again in "Needs review".

mpaulo’s picture

StatusFileSize
new82.57 KB

but in the browser i get a 404 no matter if i try it in safari, firefox or edge. not sure what is causing that behavior. :/

Maybe this was from using a hard coded module path. Fixed it.

Also, here is how it looks on Seven:

I think if it looks ok, we can move to NR.

fjgarlin’s picture

Status: Needs work » Needs review

Code-wise, it has the thumbs up from me and I'd mark it as RTBC, but I'll let @rkoller do some testing in case there is anything obvious missing (I'm just looking at the code).

Thanks for addressing the feedback @mpaulo

rkoller’s picture

Status: Needs review » Needs work
StatusFileSize
new170.57 KB
new4.54 KB

hm thought about it for a while. i am not convinced if sticking with the breadcrumb styling is the right choice. the link is sort of small and might get unnoticed since people are only used to the original breadcrumb on top of the page. aside the current implementation has several issues on a second closer look. the color is fixed to #222330 so you don't have any color change on hover. in a few cases the left side of the focus outline is missing
focusoutline for the back to browsing action link missing the left outline
it happens in the latest safari on too narrow viewports. in edge it is fine and in firefox i dont get any focus outline at all (firefox is acting out strange on that page in general).
and i think it would be helpful to align the left end of the link (the tip of the arrow) to something. currently back to browsing is aligned with the list label title but the overall arrow+label block isn't really aligned to anything.
focusoutline for the back to browsing action link missing the left outline

i wonder if it wouldn't be the better choice to use the action link styling found in the drupal design systemfor the back button which might also be the better fit semantically? With a medium sized action link the back button would be big enough with a high enough affordance. the spacing between the arrow icon and the action link label is smaller and the icon itself bigger compared to the current breadcrumb styling. and you also would have a background color change aside the text color change on hover which gives the link more of a button-ly feel.

srishtiiee made their first commit to this issue’s fork.

srishtiiee’s picture

Status: Needs work » Needs review
StatusFileSize
new62.07 KB

Opened new MR with an action link.

fjgarlin’s picture

Status: Needs review » Reviewed & tested by the community

Tested via Drupalpod, it looks great! I also checked the code. I only made a tiny suggestion, but it could go as is as well, so marking RTBC.

rkoller’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new2.07 MB

i've also applied the new merge request. looks great! only one small detail in the context of screenreaders. i would add an aria-label attribute to the action label. i've created a short video once with the aria-label and then without to illustrate the difference. with the < you have the screenreader pause for a little while and there isn't any need to pause the announcement at the beginning of the label (see pause.mp4). slows down the navigation for the user until scan-able information is announced.

srishtiiee’s picture

Status: Needs work » Needs review
rkoller’s picture

Status: Needs review » Reviewed & tested by the community

Thanks a lot @srishtiiee! The merge request looks good now! The latest commit addressed and fixed my point from #32. I 'll set it back to RTBC.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +core-mvp

Left small feedback

srishtiiee’s picture

Status: Needs work » Needs review
wim leers’s picture

I think @tim.plunkett's feedback was addressed, but … we're still missing RTL support? Perhaps that's considered out of scope here though?

srishtiiee’s picture

bnjmnm made their first commit to this issue’s fork.

bnjmnm’s picture

Status: Needs review » Needs work

Change requested in MR

srishtiiee’s picture

Status: Needs work » Needs review
lostcarpark’s picture

Just want to say the "Back to browsing" link is a much better solution than the faux breadcrumb.

First of all, having two breadcrumbs on the page is confusing. The lower one could mean users won't spot the top one, and then wonder why they they can't go back further than the project browser. The upper one includes the project browser page, so does everything the breadcrumb should do.

Second, the last item in the breadcrumbs should be the page above the level of the current page, so including the project name in the breadcrumb is inconsistent. And if you take that out, all that's left is the Browse level, so renaming it to the "Back to browsing" label makes sense.

I'm sure you all already know all this, but I was considering opening an issue, but found it already resolved.

bnjmnm’s picture

Status: Needs review » Needs work

Found one thing in the MR that needs changing.

srishtiiee’s picture

Status: Needs work » Needs review

  • 61504ee committed on 1.0.x
    Issue #3300090 by srishtiiee, mpaulo, Utkarsh_33, bnjmnm, dmariano,...
bnjmnm’s picture

Status: Needs review » Fixed

Very nice to see the discussion result in an accessible solution that works with minimal code changes. Merged!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.