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

Feature/drop menu #52

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Feature/drop menu #52

wants to merge 7 commits into from

Conversation

TashaBasalt
Copy link
Contributor

Added a drop down menu for the main header navigation. Waiting on appropriate link urls and the go ahead to add knapsack link.

@vercel
Copy link

vercel bot commented Jun 24, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@@ -28,6 +28,28 @@ module.exports = {
type: 'string',
description: 'Text of the menu item',
},
sub_menu: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done on getting this array of objects JsonSchema correct. Its one of the trickier properties to get right.

@@ -20,6 +20,15 @@
{% for item in menu_items %}
<li class="main-menu__item">
<a href="{{ item.url }}" class="main-menu__link{% if item.active %} main-menu__link--active{% endif %}">{{ item.text }}</a>
{% if item.sub_menu %}
<ul class="main-menu__sub-menu" aria-label="submenu">
{% for sub in item.sub_menu %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not hot on shorthand var names ("sub" in this case). I would suggest the variable name "item", but its being used in the scope above so its not a good choice. I think "sub" is alright here.

"There are only two hard things in Computer Science: cache invalidation and naming things."
-- Phil Karlton

@@ -0,0 +1,5 @@
# Crux, the [Basalt](https://www.basalt.io) Design System
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂ We didn't have a readme? Thank you

@joekarasek
Copy link
Contributor

Please hold off on merging this as well. This will need some polish. Here are two of the main issues that I see right off the bat...

  1. On desktop, the sub-menu text overhangs what ever is below it with no background (can't be stacked with content under it).
  2. There is no way to select the sub-menu items using a mouse.
  3. The desktop breakpoint is unreasonably large.
  4. Sub-menu items assigned to the last list item overhang the edge.

@TashaBasalt TashaBasalt changed the title WIP: Feature/drop menu Feature/drop menu Jul 11, 2019
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.

None yet

2 participants