Skip to content

Support alphabetical sorting in minimap #389

Open
@mootari

Description

@mootari

Is your feature request related to a problem? Please describe.

The minimap lists cells in the order in which they appear in the notebook. If only the name of a cell is known, a user must scan through the entire list of cells in order to locate the cell.

Describe the solution you'd like

Add an option within the minimap to sort cell names alphabetically. This also allows named cells to be listed before unnamed cells.

Describe alternatives you've considered

The following user script can be run once the minimap is open, but it will mess up the left-hand dependency lines:

Array.from(document.querySelector('.minimap-cell-label').parentElement.parentElement.children)
    .map(n => [n, n.querySelector('span')?.textContent || `\uffff${n.querySelector('.code').title}`])
    .sort(([,a],[,b]) => a.localeCompare(b))
    .map(([n]) => n.parentElement.appendChild(n))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions