jupyter / jupyter/notebook

Incorrect File Sorting - Front End

Open
#3,669 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

If I have a bunch of files that have file names enumerated with a number, the files should be sorted in numerical order. However, if I have 15 files enumerated from 1 to 15, they won't be sorted in numerical order.

They appear like this (in ascending order):
![image](https://user-images.githubusercontent.com/11952141/41108886-b2f832f8-6a43-11e8-85d0-9a163737e0fc.png)

When in reality, they should appear like this like in a file explorer:
![image](https://user-images.githubusercontent.com/11952141/41109104-2ec844e0-6a44-11e8-9549-e1e0dfd11b12.png)

I noticed that the file sorting capability was first introduced in commits c914d923 and 04a4565.
Is there anything that can be done to address this issue? This fix would be really helpful to view and organize notebooks. Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by inspecting commits c914d923 and 04a4565, which introduced file sorting, and reproduce the issue with files numbered 1 through 15 in the notebook file browser. Trace the front-end sorting behavior and verify that numbered filenames appear in numerical order, matching the expected file-explorer ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.