[openstreetmap/openstreetmap-website] Replace secondary actions nav with tag badge on trace list pages (PR #4743)

Anton Khorev notifications at github.com
Tue Apr 30 13:51:24 UTC 2024


Earlier I copied some of the navigation elements from traces traces to blocks:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/5a033d62-35e5-4396-813b-0e55cfcc366d)

Now I want to copy in the opposite direction. Individual block pages have navigation tabs, while individual trace pages don't:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/b67742d2-2d7b-4a4e-b227-28af3b6d00d9)
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/17e5ca83-cfa7-4502-b26d-7d1b161a8e24)

So I want to take the navigation from trace lists and put it also on individual trace pages:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/139844e6-02d5-45c2-971d-908bfdc94644)

Here's a problem: the phrase "Browse recent GPS trace uploads" won't make sense on a single trace page. Let's suppose I remove this phrase. Then there's going to be just the "Remove Tag Filter" link if the filter is enabled. I tried to find a better place for this link, but it didn't fit next to tabs or rss/upload buttons.

But the tag is already mentioned in the heading. Maybe I can place the remove link there? That's what I did in this PR, with link turned into the x button:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/6a7d27e1-8f32-4021-8f7a-69df44be1960)

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

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

-- Commit Summary --

  * Replace secondary actions nav with tag badge on trace list pages

-- File Changes --

    M app/controllers/traces_controller.rb (1)
    M app/views/traces/index.html.erb (22)
    M config/locales/en.yml (1)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list