usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.56k stars 1.27k forks source link

feat: Natural sort collection names with numbers #3487

Open adamarmistead opened 6 days ago

adamarmistead commented 6 days ago

Description

Adresses: https://github.com/usebruno/bruno/issues/1974

Sorts collections by name in alphabetical order Collections with numbers in the names are sorted in numerical order.

Results in ['Test 10', 'Test 2', 'Test 1'] being sorted to: ['Test 1', 'Test 2', 'Test 10'] instead of: ['Test 1', 'Test 10', 'Test 2']

Accurately sorts numbers with decimals as well.

Screenshot 2024-11-14 at 8 27 34 PM Screenshot 2024-11-14 at 8 27 44 PM Screenshot 2024-11-14 at 8 27 56 PM

Contribution Checklist:

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.