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] Dropdown menu functionality #451

Open
gerdanfs opened this issue Jan 13, 2022 · 4 comments
Open

[FEATURE] Dropdown menu functionality #451

gerdanfs opened this issue Jan 13, 2022 · 4 comments
Labels
help wanted Extra attention is needed new feature New feature
Milestone

Comments

@gerdanfs
Copy link

gerdanfs commented Jan 13, 2022

Describe the feature you want 描述你的功能需求

Dropdown menu functionality for multilevel navigation.

link:
https://codingnconcepts.com/hugo/nested-menu-hugo/

@gerdanfs gerdanfs added the new feature New feature label Jan 13, 2022
@gerdanfs gerdanfs changed the title [FEATURE] Some feature [FEATURE] Dropdown menu functionality Jan 13, 2022
@HEIGE-PCloud HEIGE-PCloud added this to the v0.2.14 milestone Jan 13, 2022
@HEIGE-PCloud HEIGE-PCloud self-assigned this Jan 13, 2022
@eallion
Copy link
Contributor

eallion commented Dec 13, 2022

👀

@keybasegit
Copy link

https://github.com/hugo-fixit/FixIt/blob/master/README.md
Hello dear developers. Hugo Theme fixit based on hugo loveit and doit has got demo with drop down menu. You're much better than me to see big picture, correct implementation, criteria which need yo be met. From my viewpoint half way its already done.

I am seeing you're adding new enhancement every week. Thanks very much.
Faust

This was referenced Mar 26, 2024
@HEIGE-PCloud HEIGE-PCloud linked a pull request Mar 26, 2024 that will close this issue
5 tasks
@HEIGE-PCloud HEIGE-PCloud removed their assignment May 11, 2024
@HEIGE-PCloud HEIGE-PCloud added the help wanted Extra attention is needed label May 11, 2024
@HEIGE-PCloud
Copy link
Owner

HEIGE-PCloud commented May 11, 2024

This is surprisingly difficult. A "hover dropdown menu" with good accessibility that works on all devices requires some careful design and implementation. I am not satisfied with neither https://codingnconcepts.com/hugo/nested-menu-hugo/ nor FixIt's implementation.

A trivial hover menu works great on mouse and keyboard devices, but is completely unusable on a touch device (say a tablet). Upon clicking, the browser just follows the link on the parent element before it can display the menu. Both implementations mentioned previously failed on this. CodingnConcepts' implementation kind of gets around this with its little triangle, but that's too small as a touch target.

Another important functionality is that the menus need to be keyboard navigable. Tabs should be able to iterate through them, arrows keys should work as well, escape key should close them. This needs to be handled carefully.

There are other details such as handling horizontal and vertical overflows. Time delay between the mouse leaving and menu closing. Animinations.

I didn't manage to find any off the shelf library that does all of this. I welcome anyone who want to attempt this share their plans here before proceeding a full implementation.

@HEIGE-PCloud
Copy link
Owner

The Popover API might save us https://developer.mozilla.org/en-US/docs/Web/API/Popover_API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed new feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants