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

Admin countries sort by name #4005

Open
sorja opened this issue Oct 7, 2024 · 4 comments
Open

Admin countries sort by name #4005

sorja opened this issue Oct 7, 2024 · 4 comments
Labels
bug Something isn't working question/investigation Further information is requested

Comments

@sorja
Copy link
Contributor

sorja commented Oct 7, 2024

image

Should be sorted by list name (see data export), not country iso

@sorja sorja added the bug Something isn't working label Oct 7, 2024
@minotogna
Copy link
Member

image

Should be sorted by list name (see data export), not country iso

I know. but the sorting is done server side by the query. it should reflect the future csv export as well. any suggestions/ideas ?

@minotogna minotogna added the question/investigation Further information is requested label Oct 7, 2024
@sorja
Copy link
Contributor Author

sorja commented Oct 7, 2024

image
Should be sorted by list name (see data export), not country iso

I know. but the sorting is done server side by the query. it should reflect the future csv export as well. any suggestions/ideas ?

if in query, i think only possibility is to translate like we did for repositoryItems
otherwise it needs to be done in controller by user language, i think

if done in db level translations, an accordion can be shown in admin page displaying country names allowing admin to edit the translations directly

not sure if there is any other way, if we fetch paginated results

thoughts @yaguzmang @minotogna

@yaguzmang
Copy link
Contributor

if in query, i think only possibility is to translate like we did for repositoryItems
otherwise it needs to be done in controller by user language, i think

if done in db level translations, an accordion can be shown in admin page displaying country names allowing admin to edit the translations directly

not sure if there is any other way, if we fetch paginated results

Just looked at how repositoryItems is handled. If we will add filtering/data-export, then handling it here the same way as for repositoryItems would be the best IMO.

The quickest and simplest now would be to filter at the controller with level with JS as Miró says, and that's feasible since there are only 256 records, but it would be inconsistent with how we handle things in other endpoints. It has the advantage though that we wouldn't have the country translations in two different places.

@minotogna
Copy link
Member

if in query, i think only possibility is to translate like we did for repositoryItems

otherwise it needs to be done in controller by user language, i think

if done in db level translations, an accordion can be shown in admin page displaying country names allowing admin to edit the translations directly

not sure if there is any other way, if we fetch paginated results

Just looked at how repositoryItems is handled. If we will add filtering/data-export, then handling it here the same way as for repositoryItems would be the best IMO.

The quickest and simplest now would be to filter at the controller with level with JS as Miró says, and that's feasible since there are only 256 records, but it would be inconsistent with how we handle things in other endpoints. It has the advantage though that we wouldn't have the country translations in two different places.

@sorja @yaguzmang we cannot filter at controller level . The query must sort results because it is paginated , and sorting must be global .
We should put translations into db .
Or any other suggestions?
But it's a long task , and we can work on this later on .

@minotogna minotogna removed their assignment Oct 9, 2024
@minotogna minotogna changed the title Admin countries sorting issue Admin countries sort by name Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question/investigation Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants