Commit Graph

83 Commits

Author SHA1 Message Date
SebastianMC 11d6623191 #123 - sorting by file basename by default (instead of fullname with ext)
- new syntax `a-z.` and `true a-z.` introduced to allow explicitly sorting by filename with ext
2024-01-25 10:47:05 +01:00
SebastianMC 3000da4edc Removed the unfinished partial implementation of overrideTitle functionality 2024-01-22 19:54:15 +01:00
SebastianMC 124c851989 #119 - Non-string value of sorting-spec: prevents the custom sorting from working w/o error message
- added a bit of defensive programming to fix the problem. The sorting spec with broken syntax is ignored (error is swallowed)
2023-12-14 17:28:22 +01:00
SebastianMC b5a9684f56 Removed console.log statements which slipped in 2.1.1
Version bump before release
2023-11-24 18:59:15 +01:00
SebastianMC 88327f6314 #115 - Add inline regex support to match capital letters and lowercase letters explicitly 2023-11-24 18:52:26 +01:00
SebastianMC b4d55c8b70 #111 - changed the sorting behavior for items with undefined attributes
- sorting by bookmarks, item w/o bookmark pushed to the bottom in both: asc and desc orders
- sorting by metadata, item w/o metadata pushed to the bottom in both, asc and desc orders
- sorting by creation or modification date, advanced mode: empty folders (or folders having only folder children) are pushed to the bottom, regardless of asc or desc order
2023-11-13 15:48:27 +01:00
SebastianMC 85d973e700 #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement
- ready for release!
- finetuned context-menus for desktop and mobile
- more unit tests
2023-10-23 11:36:50 +02:00
SebastianMC 39d7591ac1 #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement
- restructured the context menu to a single submenu of `Custom sort:` configurable in settings
2023-10-22 18:52:36 +02:00
SebastianMC 8e6c8ded98 #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement
- minor bugfix - incorrect detection if an item is already bookmarked
2023-10-22 02:07:13 +02:00
SebastianMC e632808a2b Minor text adjustment in settings 2023-10-22 01:16:20 +02:00
SebastianMC fe4f28b46b
74 integration with bookmarks core plugin (#84)
* #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement

- added new plugin setting to enable auto-integration with bookmarks
- full integration with standard sorting at folder level and at sorting group level
- refined support for implicit sorting for bookmarks plugin integration
- documentation update (partial, sketchy)
- context menu for 'bookmark this' and 'bookmark+siblings' for sorting
- order of bookmarked siblings reflects the current sorting in File Explorer, whatever it is (!!!)
- handler for 'changed' event of the vault to reflect files/folders locations change in the bookmarks automatically, whenever applicable
- adjusted behavior of by-bookmark-comparator to adhere to the multi-level sorting support implemented in #89 and merged recently to this branch. Basically, each comparator is responsible only for its own comparison and should no fallback into other default comparisons - instead it should return 0, which indicates item which are equal from the perspective of the comparator
- adjusted bookmarks integration to the merged from master multi-level sorting support and its implications
- fix suggested by github code check
- advanced performance optimizations: bookmarks cache finetuning, switching to Obsidian sort code if the implicit bookmark-integration sorting spec is in effect for a folder and there are no bookmarked items in the folder
- update of treatment of whitespace in parent path extraction: spaces allowed as leading/trailing in path elements
- increased coverage of the new functionality with unit tests
- basic manual tests done
- next step: real-life usage tests
2023-10-21 23:16:30 +02:00
SebastianMC 23b50da6cf Bugfix for integration with other plugins.
Version bump for 1.9.2 release
2023-09-29 22:12:49 +02:00
SebastianMC 1811878249 Merge remote-tracking branch 'upstream/HEAD'
# Conflicts:
#	README.md
#	main.ts
#	manifest.json
2023-09-26 19:48:59 +02:00
SebastianMC 8197fca0f7 #89 - Support for multi-level sorting
- minor fix
2023-09-26 19:37:03 +02:00
SebastianMC 1f0baebc41 #89 - Support for multi-level sorting
- full runtime processor extension plus necessary syntax adjustments
- backward compatibility with semi-two-levels
- extended meaning of sorting: lexeme
- extended and more fine-grained error messages for sorting order specifications
2023-09-26 18:56:44 +02:00
SebastianMC c5cd18f498 #89 - Support for multi-level sorting
- full runtime handling (application) of multi-level sorting
- full unit tests coverage of new functions
- metadata-based sorting extended to be applicable at each of sorting level, possibly with different metadata + full unit tests coverage
- having the run-time part ready, the missing part is the extending the sorting-spec-processor.ts
2023-09-19 15:34:39 +02:00
SebastianMC 24af493734 Support for implicit sorting specs - refined priorities of implicit vs explicit rules
- new unit tests cover the changes
2023-09-18 14:04:33 +02:00
SebastianMC 76ee3dfa62 #89 - Support for multi-level sorting
- fix in comparator by metadata to support multi-level sorting
- update of relevant existing unit tests
2023-08-29 00:17:58 +02:00
SebastianMC f72c4d61da #89 - Support for multi-level sorting
- removed unused imports
2023-08-29 00:12:06 +02:00
SebastianMC 8ea694fcf4 #89 - Support for multi-level sorting
- added run-time execution logic for multi-level sorting
- modified the sorter-by-metadata (required change for multi-level sorting)
- adjusted unit tests
- NO NEW UNIT TESTS
- no syntax added to support specification of multi-level (remains to be done)
2023-08-28 23:41:23 +02:00
SebastianMC 879c11b62f Introduction of 'overrideTitle' property for sorting group:
- sorting engine updated
- no dedicated syntax introduced, new feature used only in unit tests
- replaces the simplistic support for secondary sorting level for regexps
- unit tests
2023-08-25 19:10:38 +02:00
SebastianMC 2670cdb613 Fix for head tail regex match logic, when both regexp produce matching groups
- unit tests
2023-08-25 14:43:43 +02:00
SebastianMC 3cc58f69b9 Refactoring of internal processing context plus support for implicit sorting specs
- !!! NO UNIT TESTS ADDED - remember to do it
2023-08-24 11:18:22 +02:00
SebastianMC 45f5918598 Major improvement: added support for determining and applying sort order currently selected in Obsidian UI
- the meaning of CustomSortOrder.standardObsidian changes from a fixed one to what is actually selected in Obsidian UI
- the CustomSortOrder.standardObsidian can be applied at a folder level (as the default for folder) and at a group level (this is a major addition)
- added a mapping of Obsidian UI sorting methods onto internal plugin sorting methods, plus addition of the Obsidian UI logic to push folders to the top unconditionally
- !!! NO NEW UNIT TESTS FOR THIS FEATURE - must add later
- not tested manually, as the commits extraction and pushing is done as part of #88 github issue
2023-08-24 01:11:22 +02:00
SebastianMC 16f5d61818 Merge branch 'master' into 88-technical-aug-23-refactorings 2023-08-24 00:46:11 +02:00
SebastianMC 24355ff0a4 Bugfix in sorterByMetadataField - reverse order working correctly now
- fix in unit tests
2023-08-24 00:35:19 +02:00
SebastianMC b1f36156d1 Bugfix in sorterByMetadataField - reverse order working correctly now
- new unit tests
2023-08-24 00:28:24 +02:00
SebastianMC f48bc4d11f Simplification of this.app ==> app - this is a globally exposed object 2023-08-24 00:16:10 +02:00
SebastianMC 949b58b5ff Bugfix in sorterByMetadataField - reverse order working correctly now
- new unit tests
2023-08-24 00:15:32 +02:00
SebastianMC 24b37eb87c Bugfix in sorterByMetadataField - reverse order working correctly now
- new unit tests
2023-08-24 00:09:04 +02:00
SebastianMC e811d6d7e4 Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 23:47:41 +02:00
SebastianMC 2d34813a3f Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 23:45:30 +02:00
SebastianMC b752662d82 Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 18:55:29 +02:00
SebastianMC 037ada5a88
79 foldername variable support (#81)
* #79 - parent-folder-name variable support

- introductions of simplistic macros / templating support
- initially only one macro supported: {:%parent-folder-name%:}
  - macro expanded only for plain-text matching rules, ignored for regexp-based rules
  - for children of the root folder the macro is ignored
- unit tests for the new macros.ts
- unit tests for the testable part of updated custom-sort.ts
2023-06-30 19:05:29 +02:00
SebastianMC aa31bee80c #72 - Advanced sorting by creation date doesn't work correctly
- bug fixed, the behavior of `< advanced created` sorting method corrected
- new unit tests to cover the scenario
2023-04-03 19:05:13 +02:00
SebastianMC e788c92543 #67 - feature alphabetic wildcard
- sorting symbol \a+ for ASCII word
- sorting symbol \A+ for any modern language word (involved advanced unicode regexp)
2023-03-07 19:01:44 +01:00
SebastianMC bd875fa804 #60 - Simplified integration with obsidian-icon-folder plugin
- extended the parser with support of new lexeme with-icon:, with or w/o parameter
- unit tests
2023-03-01 10:42:35 +01:00
SebastianMC 01af14b174 #60 - Simplified integration with obsidian-icon-folder plugin
- the plugin integration and matching part completed
- unit tests
2023-02-28 23:57:08 +01:00
SebastianMC f444614ddc #58 - Some target-folder: get ignored when sorting specs are read from two or more notes
- fixed the bug
2023-02-15 22:27:57 +01:00
SebastianMC 1cb8b2b05b Mobile-specific tweaks, e.g. new ribbon icon and documentation updates 2023-02-11 17:40:31 +01:00
SebastianMC 56e23bc5ea #53 - Allow for different folder note naming scheme
- updated settings description for clarity
- minor extension of the code to allow both _about_ and _about_.md in the settings
- Version bump before release
2023-02-10 13:39:52 +01:00
SebastianMC 51733476e7 #50 - regexp and by-name matching support for target-folder
- more flexible syntax for target-folder modifiers: allow them in any order and also allow duplicates
2023-02-07 14:11:50 +01:00
SebastianMC afcb505633 #50 - regexp and by-name matching support for target-folder
- code readability (implicit structure turned into explicit interface)
2023-02-06 23:59:14 +01:00
SebastianMC ea018db574 #50 - regexp and by-name matching support for target-folder
- removed unused code
2023-02-06 23:42:56 +01:00
SebastianMC 8512f1b4cb #50 - regexp and by-name matching support for target-folder
- complete implementation
- full unit tests coverage
- NO update to documentation (yet to be done)
2023-02-06 23:38:27 +01:00
SebastianMC 8e397797fc Merged from upstream 2023-02-02 17:32:57 +01:00
SebastianMC 0ba423ce4b #45 - Feature: explicit matching of 'starred' items
- new keyword added to support items starred with Obsidian core plugin 'Starred'
  - the keyword is `starred:`
- detection and more user friendly handling of the general error condition when the File Explorer is not available
  - new ribbon status icon shape to indicate the general error plus detailed error logged to the console
2023-01-03 19:09:37 +01:00
SebastianMC ec0049302b
32 feature: wider support of controlled regexp (#41)
#32 - Implementation completed with rich unit tests coverage.

- manual.md contains a simple example of the new feature
- support for undocumented `\[0-3]` for the requester of the feature ;-)
2022-12-18 19:59:58 +01:00
SebastianMC 91859cd0fa Comments clean up around the logic of determining which files to scan for sorting specs.
Added yarn.lock to support deterministic build
2022-12-05 17:38:13 +01:00
Sam Kvale 4c39f277c0
feat: Allow sortspec.md.md in addition to sortspec.md files (#38) 2022-12-05 16:05:42 +01:00