Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support a structure for countries with multiple gov't levels #212 #351

Merged
merged 6 commits into from Mar 12, 2024

Conversation

Abbe98
Copy link
Member

@Abbe98 Abbe98 commented Mar 8, 2024

This allows contributors to split a country into an unlimited(not really tested beyond two) set of levels. The United Kingdom is provided as an example but others should maybe be split as well(Russia?).

Known end-user issues:

  • The lower level pages render in the wrong location because / in their rendering path is replaced with _.
  • The "Federal subjects" title is rendered on a different level than the details icon
  • The map "list" renders all levels not only the top one
  • The country list includes both countries and any lower levels
  • Even if you are on a third level the title will say "Federal subjects" (if this ever becomes an issue lets find a more generic title)
  • The statistics page shows all levels (maybe a feature?)
  • The statistics page's country counter is affected by non-top levels
  • The lower levels lack a button to navigate to the top level

Implementation issues:

  • the federal subjects are not defined in countries.rq which would make a lot more of sense
  • The "Scotland|scotland,Wales|wales" syntax for defining subjects aren't very nice
  • ge (len (split $m.safeName "/")) 2 is a rather horrifying hack to write a contains function

This allows contributors to split a country into an unlimited(not really tested beyond two) set of levels. The United Kingdom is provided as an example but others should maybe be split as well(Russia?).
@Abbe98 Abbe98 self-assigned this Mar 8, 2024
Abbe98 and others added 2 commits March 8, 2024 17:48
Note `ge (len (split $m.safeName "/")) 2` is a horrible hack to write a `contains` function
@Ainali
Copy link
Member

Ainali commented Mar 9, 2024

I added a commit with styling for the "Federal subjects". Now, it won't be an H2, but I think that can be okay anyway.

@Abbe98
Copy link
Member Author

Abbe98 commented Mar 12, 2024

You will now need Snowman 0.6.0 to build this branch: https://github.com/glaciers-in-archives/snowman/releases/tag/0.6.0

@Abbe98
Copy link
Member Author

Abbe98 commented Mar 12, 2024

I'm quite happy with the implementation now and think that the remaining issues can wait. Updated documentation aside.

@Ainali
Copy link
Member

Ainali commented Mar 12, 2024

I'm quite happy with the implementation now and think that the remaining issues can wait. Updated documentation aside.

Yes, I too think this is good enough to start with. We could convert the outstanding checkboxes to individual issues to not forget them.

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

Successfully merging this pull request may close these issues.

None yet

2 participants