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

Fix: Item introduction categories don't link #7360

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

chosak
Copy link
Member

@chosak chosak commented Nov 21, 2022

Item introduction categories originally linked back to a filtered version of their parent filter, when the item introduction configuration option "Show category" is checked.

This was broken by this commit back in 2018 (by yours truly).

We use "Show category" sparingly on item introductions. An example production page with this option checked is this one.

Note that currently the category renders as a plain text "Record" that doesn't link anywhere. With this commit, the category renders as a bold link that links back to the parent filterable list.

Before After
image image

Notes and todos

It doesn't strike me as obvious that users would know they could click on the category, even if this updated version. I note that the CFPB Design System page on item introductions shows that the category should render with some kind of icon:

image

I believe the icons come from this hardcoded list; in this case the page category of "Record" isn't in the list so no icon appears. Would it make sense to show some kind of fallback icon in that case? Ping @jenn-franklin. The heading with a fallback information-round matches what is in the DS, and looks like this:

image

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines

Item introduction categories originally linked back to a filtered
version of their parent filter, when the item introduction configuration
option "Show category" is checked.

This was broken by this commit [0] back in 2018 (by yours truly).

We use "Show category" sparingly on item introductions. An example
production page with this option checked is this one:

https://www.consumerfinance.gov/foia-requests/foia-electronic-reading-room/2017-student-banking-report-correspondence/

Note that currently the category renders as a plain text "Record" that
doesn't link anywhere. With this commit, the category renders as a bold
link that links back to the parent filterable list.

705d8f0
@chosak chosak requested a review from csebianlander November 21, 2022 19:58
@jenn-franklin
Copy link
Member

Thanks for calling this out @chosak. I agree that the link without an icon does not appear as an obvious link. I would vote to always include an icon. I see in our DS documentation that we say icons are optional, so I would vote to delete this sentence from the DS documentation and make it default to include an icon. I'm happy to make this DS documentation change if nobody objects.

Screen Shot 2022-11-21 at 6 03 42 PM

Is "Record" the only category that doesn’t have an icon? Maybe we could set an icon specifically for it? What if we set it as the “document” round icon? So, this one:

Screen Shot 2022-11-21 at 6 05 41 PM

I'm not seeing that the document icon is being used for any other category on that list.

@chosak
Copy link
Member Author

chosak commented Nov 22, 2022

I'm happy to make this DS documentation change if nobody objects.

Thanks @jenn-franklin, that sounds good to me. There are a number of other categories without icons (and a number of icon definitions for categories that don't actually exist anymore). I suspect this might be the cause of internal platform#4114, reported by @anselmbradford, where icons appear inconsistently -- maybe it's not that we're not showing the icon but that we haven't associated an icon with all of our categories. I prefer to merge this fix in as-is but will open a subsequent PR to handle the missing icons!

@chosak chosak merged commit 75ea6b7 into main Nov 22, 2022
@chosak chosak deleted the fix/item-introduction-category-links branch November 22, 2022 14:09
@chosak
Copy link
Member Author

chosak commented Nov 30, 2022

but will open a subsequent PR to handle the missing icons

Opened at #7378.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants