dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.69k stars 253 forks source link

Lookup: Support 'archive' sort ordering for archiving functionality #2561

Open nickolay-kondratyev opened 2 years ago

nickolay-kondratyev commented 2 years ago

Please select if your request is either something new or an enhancement

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

Is your feature request related to a problem? Please describe

Currently there isn't an archiving capability.

Describe the solution you'd like

To be able to reach archived notes but for archived notes to not clutter the top results of the lookup.

A simple solution to this problem can be adding sort order prior to sort order of the score (https://github.com/dendronhq/dendron/blob/master/packages/common-all/src/fuse.ts#L317-L324) against some archive signaling mechanism.

A suggested signaling mechanism is to have archive be part of the note name (to allow utilization of other refactoring tooling such as being able to archive a hierarchy by using Refactor Hierarchy command).

It would be nice to not limit archive note naming to only the beginning meaning to allow support for:

foo.bar.baz -> foo.archive.bar.baz (this way a sub hierarchy can be archived, but main hierarchy could have other un-archived children).

However, even supporting foo.bar.baz -> archive.foo.bar.baz would be super helpful for organizational lookup.


With this addition to sorting if someone wants to find the archived notes they could still reach them an even filter out the non archived notes by just typing archive into the lookup query.

Describe alternatives you've considered

Additional context

aleksey-rowan commented 2 years ago

Hey, @nickolay-kondratyev, there was an issue before that referred to a similar concept--subtree hoisting (where you filter the tree and restrict the lookup to a certain hierarchy):

What you suggesting is the opposite of hoisting (de-hoisting? :)) where certain hierarchies are excluded from the lookup, but I think the general concept is the same--focusing on specific parts of your vault.

aleksey-rowan commented 2 years ago

This issue is featured in this week's round of CROP voting.