[openstreetmap/openstreetmap-website] Show linked features as collapsable detail panels on feature browse pages (#2837)
Andy Allan
notifications at github.com
Wed Sep 16 13:36:10 UTC 2020
Fixes #2823
The panels are collapsed by default, when there is a long list of features, but open on short lists to save on clicks. 10 items is arbitrary but seemed reasonable.

This is one of those "how hard can it be", "oh wait that took longer than expected" kinds of thing. Thanks to @tordans for the pure-html suggestion, I think it looks reasonable. But I think a proper designer could do better. I'm not 100% happy with the duplication between the `<h4>` section titles and the `<summary>` labels, but putting titles in the summaries breaks the layout and I think this PR is at least a little better than the previous situation. Similarly, I went back and forth on whether small lists should be handled differently, whether small lists should even have the summaries, and trying to balance consistent behaviour vs excess clicking etc.
Feedback welcome, and I'm happy to change things in future too.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/2837
-- Commit Summary --
* Show linked features as collapsable detail panels on feature browse pages
-- File Changes --
M app/views/browse/_node.html.erb (24)
M app/views/browse/_relation.html.erb (14)
M app/views/browse/_way.html.erb (34)
M config/locales/en.yml (11)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/2837.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2837.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/2837
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200916/c3376fb0/attachment.htm>
More information about the rails-dev
mailing list