[openstreetmap/openstreetmap-website] Use Bootstrap toggle buttons for layers menu (PR #4674)

Anton Khorev notifications at github.com
Wed Apr 10 16:11:31 UTC 2024


Rewrite of #3674 - layer buttons as [Bootstrap radio toggle buttons](https://getbootstrap.com/docs/5.3/forms/checks-radios/#radio-toggle-buttons)

Enables keyboard navigation for layer buttons which is missing now.

The only custom css is to:
- set button heights
- override borders to have hover effects because Bootstrap toggle buttons don't have any hover effect (they'd need another color to tell hover states apart from selected states, they solved it by removing hover states)

![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/c0775b2d-de2b-49d2-992e-93455ed83028)
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/fb8c8af0-d742-48f3-b5c4-57bbf25fd34f)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4674

-- Commit Summary --

  * Use Bootstrap toggle buttons for layers menu

-- File Changes --

    M app/assets/javascripts/leaflet.layers.js (43)
    M app/assets/stylesheets/common.scss (43)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4674.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4674.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4674
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4674 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240410/dab60b5f/attachment-0001.htm>


More information about the rails-dev mailing list