EnCiv / civil-pursuit

Other
7 stars 8 forks source link

VerticalNavBar component #222

Open justin-b-yee opened 2 weeks ago

justin-b-yee commented 2 weeks ago

Specs

<VerticalNavBar 
    menu = [],
    defaultSelectedItem,
/>

// menu prop takes objects with { name: Name1, func: (name) => { // do something} }

Tasks

Create stories for these cases:

Figma

Image

ddfridley commented 1 week ago

@justin-b-yee I'm going to leave comment here on changes to make above. After its ready to be worked on, we can delete these comments.

When the user clicks an option, highlight the selection.

When the user hovers over an item, highlight the selection, and when they click on it, do the selection.

I think we should include a link to the current nav-bar https://github.com/EnCiv/civil-pursuit/blob/master/app/components/top-nav-bar.jsx

And we should use the same menu structure, including nested, and use (or make reusable) a lot of the mobile version of the menu from top-nav-bar:

Image

Test that the tabs' functions are run on click.

Test that tabbing to a menu item will focus it, and space bar on that item will execute it. -- this if for screen reader for people with disabilities.