Closed ArkaneOnline closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 21.76%. Comparing base (
c2afbc6
) to head (84ff75f
). Report is 6 commits behind head on master.:exclamation: Current head 84ff75f differs from pull request most recent head c69baa5. Consider uploading reports for the commit c69baa5 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Also, if you need a list of subdivisions, we can provide you with that. If you would need a specific format as well let us know!
oh boy, I'll need to remember how this entire subsystem works in the first place :joy: There is definitely a database aspect to this, e.g. see https://github.com/stadust/pointercrate/blob/master/migrations/20210419002933_nationalityupdate.up.sql. A similar migration would be needed that alters the static table with support for everything added in this PR. Then, inside the SVG file the hierarchy of elements (nesting + CSS class names) needs to match what's expected in https://github.com/stadust/pointercrate/blob/master/pointercrate-demonlist-pages/static/js/modules/statsviewer.js#L153 (again, I dont exactly remember what that is, and it seems I didnt write down comments either. I might have time to look at this in a few weeks if you need help, though). Lastly, and this is arguably the biggest problem, is that the file size is now 2.4MB. Even with compression, that's too large for it to load at a reasonable time. There's a few things we can do about this luckily:
id
attributes. I remember back when edited this file, I used inkscape and it forced them on me, but each individual path/title/g element having its own id is unneeded.Also, where did y'all grab those flags from? What's the license on those?
when making the map i looked at the format of hierarchy of elements in countries with existing subdivisions, including all the css classes; tested the map a bunch, works good all flags are taken straight from wikipedia (just like flags of subdivisions in us and canada) ill try to see what i can do with shrinking the world map file later
i cleaned up all the flags, tell me how to attach the migration with new subdivisions to the repo tho
Mhh, some of these are over 1MB large
1010029 ./mx/nay.svg
1358046 ./mx/oax.svg
2018077 ./mx/cam.svg
2061860 ./mx/chp.svg
2196399 ./ru/kda.svg
3408590 ./mx/mex.svg
4137113 ./mx/tab.svg
and quite a few more are between 100KB and 1M:
The >1M ones we definitely need to do something about, but even the >100KB ones seem excessively large to me :thinking:
This seems to break the highlighting of the currently selected country/subdivision. E.g. on pointercrate.com, selecting US state montana look like this
(note the dark blue to indicate its selected), while with this PR is looks as follows:
(e.g. no highlighting). This is broken for both countries and subdivisions (both ones that existed before this PR as well as the new ones) :(
ill look into the world map more again idk why this would break at all, considering i literally have formatted everything the exact same way as existing countries
also regarding the flags and flag sources thats true, ill do that tomorrow
nvm i fixed it somehow, inkscape messed up the formatting in the section with the main style apparently, if i format it correctly it works? ill fix everything tomorrow as said before
should be good now...
There's probably some more stuff that needs to be done in order to get the fully working, but I have no clue what steps to take after this point.
From exsii: Note: China has most of it's flags set as placeholder question marks due to these subdivisions legally not being allowed to have their own flags. Might be changed to flags showing the region borders (like the flag of Sakhalin Oblast, Russia https://en.wikipedia.org/wiki/File:Flag_of_Sakhalin_Oblast.svg)
Also the following subdivisions didn't have .svg files for flags/emblems/coats of arms so they had png images added into .svg files:
Portugal: 14, 15 Romania: bz, cs, ct, if, mh, ot, sb, sm, sv, tm Philippines: 01, 02, 03, 05, 06, 07, 08, 09, 11, 12, 13, 15, 41