sillsdev / languageforge-lexbox

Lexbox, SIL linguistic data hub
MIT License
7 stars 2 forks source link

Fix org sorting #1183

Closed myieye closed 2 weeks ago

myieye commented 3 weeks ago

This PR adds THEN sort by name ASC. So, the sort order isn't random e.g. when sorting by member count and there are multiple orgs with 5 members.

EDIT: As discussed in the PR, this PR now introduces just-order-by as a dependency to simplify our org sorting code.

github-actions[bot] commented 3 weeks ago

UI unit Tests

12 tests   12 :white_check_mark:  0s :stopwatch:  4 suites   0 :zzz:  1 files     0 :x:

Results for commit 11accd2d.

:recycle: This comment has been updated with latest results.

myieye commented 3 weeks ago

what if we used a zero dependency order by lib to do this for us? https://www.npmjs.com/package/just-order-by

I like that idea. Those "just" packages sound like a decent choice. I'd never really looked beyond lodash. I probably should have used something for my debounce stuff and there's some viewer code that really wants a throttle, but I didn't want to write it. I should have just pulled in a small dependency.

I'd be tempted to go with es-toolkit, but I'll use "just", so we don't have to have a discussion about utility libraries 😆. (though I sure would enjoy having stuff like isNil, keyBy, camelCase, pick etc.)

myieye commented 3 weeks ago

image image image

myieye commented 2 weeks ago

Merge activity