Create sorting API and use it for plugin list (and beyond)
@EduardMe is already working on this.
Since Jul 5, 2023.
- Dominant language
- JavaScript
- Stars
- 204
- Forks
- 82
- Avg merge
- 22h 27m
- Merged PRs (30d)
- 3
Description
Plugin list is sorted by name but emojis throw it off.
Maybe you can use something like this in the sort algorithm:
let result = string.replacingOccurrences( of:"[^A-Za-z0-9]", with: "", options: .regularExpression)
Feels like we encounter this in the sidebar and lots of other places also. I know @codedungeon has run into this. Might be good for you to expose an API that sorts a list of object by a certain key. So you and all the plugins can be 100% consistent.
e.g.
sortObjectListByAlpha(objectList, keyToSortBy)
@EduardMe said:
"Ok, I tried to remove the emojis, but it doesn't work consistently. Still issues are getting in
That's much more work than I thought. Here the next feedback will be: "Why is '!' not sorting the plugin up?"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.