[openstreetmap/openstreetmap-website] Allow primary tabs to "toggle" states (#2421)

BrandonXLF notifications at github.com
Fri Nov 1 04:08:26 UTC 2019


This is my second solution (one of two) for the problem of the UI not presenting a clear way to return to the "view" page from edit, history, and export. I finally realized you can just click the logo, but this isn't very clear and I've seen several people online face the same issue. This solution works by having the enabled tab in the primary menu return to the root page. I was expecting this behaviour to be already present since the tabs resemble buttons that can be toggled since, but I can also see the menu as more of a multiple-choice menu, making my first option preferable. The buttons current serve no purpose when they are active, so making them act as a link to the root page (allowing them to be "dissected") makes sense. Here's an example of it working: ![toggletabs](https://user-images.githubusercontent.com/42590338/68001734-b4512e80-fc3b-11e9-9011-c5db22bac841.gif)



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

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

-- Commit Summary --

  * Added "View" tab
  * Added "layouts.view"
  * Allow for JS updating of #view_tab
  * Tabs can toggle between being enabled and disabled
  * Undid changes to structure.sql
  * Removed unneeded locale

-- File Changes --

    M app/assets/javascripts/index/export.js (2)
    M app/assets/javascripts/index/history.js (2)
    M app/helpers/application_helper.rb (4)
    M app/views/layouts/_header.html.erb (6)

-- Patch Links --

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2421
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20191031/ce67e978/attachment.html>


More information about the rails-dev mailing list