• Nick Stenning's avatar
    Sort notes tab by date · 2a11ea12
    Nick Stenning authored
    This commit prevents page notes from being sorted by "Location" (i.e.
    document location), a meaningless property for page notes, which would
    result in them being sorted unpredictably.
    
    Instead, we define a default sort key and a set of allowable sort keys
    for each sidebar tab. When switching between tabs, the sort key is
    updated to the default, and the set of allowable sort keys updated
    depending on the tab.
    
    This results in page notes being sorted (by default) in ascending order
    of their most recent update. Using "updated" rather than "created" is a
    bit dubious, but changing this requires a bit of care to avoid strange
    behaviour on the stream, so I've left that for another time.
    
    N.B. As implemented, the sort key on each tab will be reset to the
    default every time the tab changes. This is less surprising than
    preserving the sort key across tab switches, and doesn't involve any
    requirement to remember system state across tab switches. We can also
    revisit this in the future if it seems wrong.
    
    Fixes #96.
    2a11ea12
Name
Last commit
Last update
.github Loading commit data...
docs Loading commit data...
h Loading commit data...
images Loading commit data...
scripts Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
npm-shrinkwrap.json Loading commit data...
package.json Loading commit data...