jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
13.78k stars 3.09k forks source link

Shortcuts sort does not use locale-specific sort order #16073

Closed krassowski closed 3 weeks ago

krassowski commented 1 month ago
          We should also be sorting using a sort algorithm suitable to the language in question.

Originally posted by @JasonWeill in https://github.com/jupyterlab/jupyterlab/issues/16039#issuecomment-2020901578

In particular:

https://github.com/jupyterlab/jupyterlab/blob/5af2cc9346a49bc1354448a547413937ab754b56/packages/shortcuts-extension/src/components/ShortcutUI.tsx#L426-L450

does not use String.prototype.localeCompare() for string values.

krassowski commented 1 month ago

As bonus point, a test for sorting could be added in:

https://github.com/jupyterlab/jupyterlab/blob/5af2cc9346a49bc1354448a547413937ab754b56/packages/shortcuts-extension/test/components/ShortcutUI.spec.ts#L47

but it would not be required for a first-time contributor.

UntitledError-09 commented 4 weeks ago

@krassowski, I'd like to pick up this as my first issue. Can you assign this issue to me?

krassowski commented 3 weeks ago

Fixed by https://github.com/jupyterlab/jupyterlab/pull/16077