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

ui: Provide deterministic order to task list #965

Merged
merged 1 commit into from Apr 10, 2024
Merged

Conversation

inahga
Copy link
Contributor

@inahga inahga commented Apr 10, 2024

Sort tasks by name, with respect to the system's locale.

@inahga inahga requested a review from a team as a code owner April 10, 2024 18:48
@inahga
Copy link
Contributor Author

inahga commented Apr 10, 2024

n.b. it's suggested to use Intl.Collator for large arrays of strings https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare, but it's not specified what "large" entails. I don't currently expect the task list to approach anything that constitutes "large", i.e. no more than 1000 tasks, so I will YAGNI this.

@branlwyd
Copy link
Member

n.b. it's suggested to use Intl.Collator for large arrays of strings https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare, but it's not specified what "large" entails. I don't currently expect the task list to approach anything that constitutes "large", i.e. no more than 1000 tasks, so I will YAGNI this.

This seems appropriate to me: to handle large numbers of tasks, we'll likely need to add pagination support, so assuming that the number of tasks is small for now makes sense -- I suppose pagination support would require server-side sorting.

@inahga inahga merged commit b3bef74 into main Apr 10, 2024
8 checks passed
@inahga inahga deleted the inahga/tasklist branch April 10, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants