-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/solvuu/ocamlorg2/7DTrhCJmPadTqAKaBD3g9izFRsvy |
</button> | ||
<div className={"absolute z-10 left-1/2 transform -translate-x-1/2 mt-3 px-2 w-screen max-w-xs sm:px-0 " ++ | ||
switch activeMenu { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start of new code
let showMobileMenu = _evt => {setMobileDropdownVisible(_ => true)} | ||
|
||
<div className="relative"> | ||
<div className="max-w-7xl mx-auto px-4 sm:px-6 "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End of new code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a correctness standpoint, it might be better to use one record and one state hook. If we agree on that, I would like to apply that refactoring in a follow up checklist item.
</button> | ||
</div> | ||
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start of new code
<div className="-mr-2 -my-2 md:hidden "> | ||
<button | ||
type_="button" | ||
onClick=showMobileMenu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was modified to add onClick
</span> | ||
</a> | ||
</nav> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to refactor the repetition above yet. There are two issues.
- The mobile menu should not list all entries from the regular menu, so I could loop over lists of entries, but that will be removed soon.
- I could create a small sub component for each link, but I would rather do that in one pass while refactoring all parts of this component.
@@ -41,205 +41,409 @@ type activatedEntry = | |||
let make = (~content) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a small portion of these changes are real modifications. All the rest of the lines are a result of the source code formatter. I have indicated where code has changed below.
I can't review the code tonight, but I did test functionality. Don't see any obvious problems. The menu opens and closes fine, and links from menu items work as expected. |
I will merge so that other people can start using the menu now in mobile. We can create a follow-up branch based on PR review notes that emerge. |
Adresses parts of #172 #125
Addresses: