Show "node also part of ways" as nested lists on way pages #5317
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Way pages have lists of nodes. Every way node can be shared with other ways, and if it is, then all of those ways are also listed. Currently it's done as "(part of ways ...)" phrases with ways listed using
to_sentence
. Those are cumbersome to deal with. You can never be sure about grammar in translations. Also it's more difficult to style because each way may or may not have an icon, there's a space reserved for that icon, that icon has to be positioned into that space probably with a bunch of pixel values. That's what #5080 does and that's one thing I don't like about it.In this PR I convert those phrases with inline icons into nested lists. After that icons are going to be located at the beginning of
<li>
s both for nested lists of ways and outer lists of nodes. This will make icons easier to position.Also fixes #1147. Inner lists of ways contain only unique ways to avoid #1147 (comment). The outer list of all nodes has details collapsed for any node that was already written (see node 2071 on screenshots below).
Before:
After: