FEATURE: Added sort by username for directory items (PR #10482)

Added a PR for this https://meta.discourse.org/t/alphabetic-sort-of-usernames/140561

GitHub

@eviltrout previous branch is deleted due to some issues and now new branch is created. You told me to write backend specs for this pr but I didn’t find any specs related to it or around to it in the core

can u please help me, like what spec’s will be needed for this pr?

  • I see some checks are failing but I haven’t touched the frontend code I promise :wink:

@eviltrout I see some checks are failing but I haven’t touched the frontend code I promise :wink:

Yes all PRs should be tested if possible and this one needs one. I would look at this particular file:

https://github.com/discourse/discourse/blob/master/spec/requests/directory_items_controller_spec.rb

It shows how to insert data, perform a request and check the result. Your test should insert data in the order you now support, and check the results with and without your new parameter.

@jahan-ggn Thank you for contributing. Can you please update the commit message to be more descriptive about what is being fixed?

@tgxworld i have sorted usernames on user’s page as per mentioned in this pr https://meta.discourse.org/t/alphabetic-sort-of-usernames/140561

@jahan-ggn I understand. Do have a read through https://chris.beams.io/posts/git-commit/ which provides a good overview on why a good commit message is important.

The title of this pull request changed from “PR Done” to "FEATURE: Added sort by username for directory items

@eviltrout i have written the specs please look to it

@jahan-ggn looks good now, thank you!

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/alphabetic-sort-of-usernames/140561/11