[openstreetmap/openstreetmap-website] Traces#index: Introduce tab navigation, fix tag-filter (#3034)

Tobias notifications at github.com
Sat Jan 2 21:42:22 UTC 2021


- introduce bootstrap tabs to switch the views
- introduce `content_for :heading_class` to remove the padding below the bootstrap tabs
- update the rss-image to use a svg, adopted from https://icons.getbootstrap.com/icons/rss/ (without the outer border)
- move rss- and new-button away from the view-switching actions
- the `@tag` logic was broken. introduce new link to remove the tag-filter; the tabs keep the filter once given
- use `&.` syntax nil-safety so we can remove `@display_name`

I will wait for a first review of this.
Still to do is …

- [ ] Check specs
- [ ] Add translations for the two new strings (hint about how to this is welcome)

The remove-tag-feature is not ideal IMO, but on the other hand it was broken ATM and nobody noticed so it was probably not that important and IMO not worth adding even more complexity.

## Screenshots
**gps – logged-in – someone-else**
<img width="1054" alt="gps--logged-in--someone-else" src="https://user-images.githubusercontent.com/111561/103467062-4cb8d680-4d4b-11eb-8e67-bd607fa40cf3.png">

**gps – logged-in – all**
<img width="1034" alt="gps--logged-in--all" src="https://user-images.githubusercontent.com/111561/103467063-4d516d00-4d4b-11eb-91f5-432cf3155727.png">

**gps – logged-in – my**
<img width="1038" alt="gps--logged-in--my" src="https://user-images.githubusercontent.com/111561/103467064-4dea0380-4d4b-11eb-9610-520bec86bdf9.png">

**gps – logged-out – someone-else**
<img width="1043" alt="gps--logged-out--someone-else" src="https://user-images.githubusercontent.com/111561/103467054-488cb900-4d4b-11eb-8ca7-afd9ef0807b8.png">

**gps – logged-out – all**
<img width="1058" alt="gps--logged-out--all" src="https://user-images.githubusercontent.com/111561/103467055-4a567c80-4d4b-11eb-8144-95d4947cec36.png">

**gps – logged-in – someone-else – tag filter active**
<img width="1044" alt="gps--logged-in--someone-else--tag" src="https://user-images.githubusercontent.com/111561/103467058-4b87a980-4d4b-11eb-8fe6-95940dacfd49.png">

**gps – logged-in – all – tag filter active**
<img width="1045" alt="gps--logged-in--all--tag" src="https://user-images.githubusercontent.com/111561/103467059-4c204000-4d4b-11eb-946d-b97d3a0ab657.png">

**gps – logged-in – my – tag filter active**
<img width="1039" alt="gps--logged-in--my--tag" src="https://user-images.githubusercontent.com/111561/103467060-4cb8d680-4d4b-11eb-9381-71404f215a84.png">

**gps – logged-out – someone-else – tag filter active**
<img width="1065" alt="gps--logged-out--someone-else--tag" src="https://user-images.githubusercontent.com/111561/103467057-4aef1300-4d4b-11eb-8183-cf699a6716c4.png">

**gps – logged-out – all – tag filter active**
<img width="1045" alt="gps--logged-out--all--tag" src="https://user-images.githubusercontent.com/111561/103467056-4a567c80-4d4b-11eb-84ed-038a4b7ba93c.png">

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

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

-- Commit Summary --

  * Traces#index: Introduce tab navigation, fix tag-filter

-- File Changes --

    M app/controllers/traces_controller.rb (1)
    M app/views/layouts/_content.html.erb (2)
    M app/views/traces/index.html.erb (66)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3034.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3034.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/3034
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210102/baa0f4c4/attachment-0001.htm>


More information about the rails-dev mailing list