-
Notifications
You must be signed in to change notification settings - Fork 59
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
Reworking of how map names are handled #416
Comments
This seems to be partially resolved in the following commits: w3champions/website-backend@fb82177 So the matchmaking-service has been updated and we get the name & id from the metadata. This has been added to ongoing and finished matches in the backend and the "MatchesGrid" has been updated to use the new map name in the frontend. I was able to find and update other components reading the mapname from matches in the frontend. There are remaining statistics components (If I'm not mistaken) reading the map names "the old way", due to map name not being added to the statistics related models: (VueComponent - Backend Model)
Is the intention to update these models the same way (using map name from metadata)? Any considerations with regards to past data? I would need some direction and discussion to tackle this |
done |
I'm looking to get back into working on the website and noticed the map name gore on a stats page today. What's the status of this issue? Still some backend work needed for the models? |
No news from my side. |
I did the investigation on how to fix this once and for all: Right here is where the name of the map is picked up in In the The Meanwhile, the Therefore we should do something like: However, a few hiccups. Firstly, and very easily, the website-backend data model needs to understand and parse this from the response (this line doesnt currently exist): and secondly, and much more of a problem, this As you can see, this is not english: Therefore, we need the Matchmaking service to populate that field with it's saved "rational" name in the database for that map, by referencing it against the mapfile path, and ideally sending the map ID as part of that object. Here is how the data is saved in the Matchmaking database for a map: |
Actually, I just noticed something that could make life a little easier.
Proposed solution: Then we add the mapId to the database entries, and get the counts by the ID, and not the Map: |
These ids look to be by season, but we'd want them to be global, no? |
This is a good standalone project for anyone interested.
Right now, map file names are fed to the website-backend from the matchmaking-service, the website-backend does this before it sends to the frontend:
https://github.com/w3champions/website-backend/blob/237cd0821094d6b0fc289262324fd7cbbd5ab103/W3ChampionsStatisticService/Matches/MapName.cs#L9
Then on the frontend, we apply translations to these strings:
website/src/locales/en.ts
Line 60 in 3a0df7c
This can lead to some nasty gore on the frontend before we add the translations, and it also means that updating a map (even very minorly) means duplicate names.
The matchmaking-service has access to the metadata of maps, one field is the actual name of the map in text, e.g. "Twisted Meadows", and we can serve this to website-backend, and then pass on after validation checks to the frontend.
This will require a senior dev to make the relevant change to matchmaking service, but the rest can be handled on the open source repos.
The text was updated successfully, but these errors were encountered: