mono-company / jungle-docs

Mono's BEM ITCSS framework - Documentation website (OLD)
Other
1 stars 0 forks source link

Popover/dropdown naming thoughts #17

Open Wolfr opened 4 years ago

Wolfr commented 4 years ago

In some projects, we are using the popper.js project to provide a fake dropdown, to provide UI for dropdown lists. The JS file is called dropdown.js, but the element that is “popped” is called .c-menu in most projects. The dropdown can also be a dropup. And I guess a drop-right or drop-left (these terms don’t exist but just making my point). Sometimes with an arrow or sometimes without.

So you could call it a popover with a direction then (for arrow placement).

At some level I also feel it is useful to make the distinction between “dropdowns” (where you can make a selection) and a popover menu (which could basically contain a whole inline form if you wanted to)

Mostly because then, for dropdown lists, we can predict the markup that is in there, and we can provide keyboard accessibility. This is sorely missing from our current standard “dropdown” offering (in our Jungle framework).

We’ll sit together with Roel Wednesday next week to look into improving some of this. But in the meantime I am wondering if we should rename something or just keep it the way it is.

I am currently leaning to having a dropdown.js and a popover.js separately.

FezVrasta commented 4 years ago

This is the main reason why I came out with the "popper" word, to try to cover all the possible use cases 🙃 You are free to borrow it if you like it.

(popper.js author)

Wolfr commented 4 years ago

Hey @FezVrasta , thanks for chiming in. Going to think about the suggestion. Someone also made a library based on your work and called it Tippy. That doesn't really help my naming convention conundrum does it ;)? ( https://atomiks.github.io/tippyjs/ )

Unrelated, do you have a search running for popper.js mentions? How did you find this?

FezVrasta commented 4 years ago

Unrelated, do you have a search running for popper.js mentions? How did you find this?

I got plenty of free time 😂

No, actually I just search for the library name of GitHub once in a while to see if people need help with it.