bloom-works / guides-template

Placeholder repo for work on Bloom Guides
https://bloom-guides-template.netlify.app/
MIT License
2 stars 0 forks source link

Component: Table of Contents #9

Closed jeffmaher closed 1 year ago

jeffmaher commented 1 year ago

Stories

Notes

Done When

jrubenoff commented 1 year ago

Assumptions I'm making

Design constraints

The outline for a single guide section can be quite long:

CleanShot 2023-06-14 at 09 15 12@2x

Ideally we'd avoid a situation where the Table of Contents exceeds the height of the page content, since that doesn't look great. (This page on 18F is one example.)

We also want to prevent this component from taking up a lot of space on small screens.

Markup

This feels like a great opportunity to use a <details> / <summary> pattern. It lets us keep the screen real estate for this component small by default.

Design

Here is an initial visual design:

Default state

CleanShot 2023-06-14 at 09 25 21@2x

Expanded state

CleanShot 2023-06-14 at 09 25 01@2x

The plus icon rotates as the component expands.

Development Status

Open questions

@admoorgit I really like having numbered sections in the employee handbook. (See the above screenshots.) But for the discovery playbook, it doesn't look great:

CleanShot 2023-06-14 at 09 29 48@2x

Maybe it's be a good idea to remove the section numbers for the discovery playbook? Let me know what you think.

admoorgit commented 1 year ago

@jrubenoff yes!

jrubenoff commented 1 year ago

@admoorgit Here's a version addressing all of the above. It has bold text, so it complies with AA Large:

CleanShot 2023-06-15 at 09 33 03@2x

Even with the extra padding, it still takes up less space than the previous design given the smaller font size. LMK what you think!

admoorgit commented 1 year ago

Howdy @jrubenoff ! Spoke with Jeff on Friday and here's where we landed:

Let me know if you have questions!

jrubenoff commented 1 year ago

Single-column layout:

CleanShot 2023-06-21 at 20 27 46@2x

Multi-column layout (collapses to one column on smaller screens:)

CleanShot 2023-06-21 at 20 26 22@2x

@admoorgit All your other feedback should be addressed in the above screenshots. Let me know which you prefer!

jeffmaher commented 1 year ago

@admoorgit to hop into today.

admoorgit commented 1 year ago

@jrubenoff I dig I dig! I prefer 2-column that collapses into single at smaller widths.

2 tweaks, and no need for me to review again unless you have a question:

This is looking really good! You rock!

jeffmaher commented 1 year ago

Waiting for review from @admoorgit and a merge conflict for @SMakaiTakori or @LynnHerrick9 .

admoorgit commented 1 year ago

Approved over here: https://github.com/bloom-works/guides-template/pull/34#pullrequestreview-1511585440

SMakaiTakori commented 1 year ago

I resolved the conflicts in this PR and it is now merged!