Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Show "node also part of ways" as nested lists on way pages #5317

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AntonKhorev
Copy link
Collaborator

@AntonKhorev AntonKhorev commented Nov 13, 2024

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:
image

After:
image

Copy link
Member

@tomhughes tomhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my main question here is whether we should start these (mostly) expanded or whether they should all be collapsed? Starting them expanded does mean that you're using more vertical space and reducing what top level information can be seen initially?

other: "part of ways %{related_ways}"
also_part_of_ways:
one: "also part of %{count} way"
other: "also part of %{count} ways"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be ... other way(s) here? It's not really grammatically correct at the moment given the count exclude one way that the node is a member of.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Website element display doesn't know about closed ways ...
2 participants