Commit Graph

38 Commits

Author SHA1 Message Date
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 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 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 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 b752662d82 Simplification of this.app ==> app - this is a globally exposed object 2023-08-23 18:55:29 +02: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 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 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
SebastianMC fabd586348
#23 feature request sorting notes with metadata (#26)
* #23 - support for sorting by metadata

- added support for grouping items by the presence of specified metadata
  - new keyword `with-metadata:` introduced for that purpose in lexer
  - if metadata field name is omitted, the default `sort-index-value` is used
- added support for sorting items by notes and folders metadata
  - new keyword 'by-metadata:' introduced for that purpose
  - if metadata field name is omitted, the default `sort-index-value` is used (or metadata name inheritance is used)
- unit tests of sorting spec processor extended accordingly
- documentation and code example in README.md 
- extended to also support true alphabetical on metadata fields
- release unnecessary references after sorting completed
2022-11-12 16:18:18 +01:00
SebastianMC b9592920b7 #22 - bugfix of the status indicator in ribbon icon sometimes not updated
- plus version bump for release
2022-11-03 10:23:11 +01:00
SebastianMC 4cfe62afe8 19 - Less confusing description and handling of the `designated note` settings
- added comments for clarity
2022-10-13 09:29:18 +02:00
SebastianMC 426eb789da 19 - Less confusing description and handling of the `designated note` settings
- the path to note entered in setting is treated as (all at once):
  - path to the note file, OR
  - path to the note, OR
  - name of the note
2022-10-13 09:10:40 +02:00
SebastianMC 29f3a16dce Removed the default value from designated note setting (as per remark from review https://github.com/obsidianmd/obsidian-releases/pull/1173#issuecomment-1273788109) 2022-10-10 23:33:32 +02:00
SebastianMC 6e54db9f1c Introduced `normalizePath(...)` for consuming a path to note from plugin settings 2022-09-30 15:49:07 +02:00
SebastianMC 13f76cc623 Unified the way of accessing the FileExplorerView and added a bit more defensive programming in this area. Also added support for deferred monkey-patching of FileExplorerView in case it doesn't succeeds in the initialization sequence 2022-09-29 19:05:06 +02:00
SebastianMC 57b1cd8ae2 Bugfix for #17 - plugin closes most recent tab
Version bump for release
2022-09-29 10:01:10 +02:00
SebastianMC 65b452ef3f 14 - Disable notification option
- finetune the description of the newly introduced setting
2022-09-26 15:06:29 +02:00
SebastianMC c12db12d37 14 - Disable notification option
- added plugin setting to enable/disable notifications
2022-09-26 15:03:00 +02:00
SebastianMC 43d30a6cb6 Updated description of a plugin setting for clarity 2022-09-14 11:33:54 +02:00
SebastianMC fe90df845a Added more clarity and readability to the code around monkey-patching of TFolder.sort() method 2022-09-14 11:10:47 +02:00
SebastianMC fd8dfa1fcd Bugfix - custom designated file of sorting config was ignored, the default Inbox/Inbox.md was always used instead 2022-09-14 11:09:19 +02:00
SebastianMC c01d069829 Merge from upstream git@github.com:obsidianmd/obsidian-sample-plugin.git
- because of strict null check adjusted the code where necessary
2022-09-13 18:47:39 +02:00
SebastianMC 9962d9e76e Ticket #4: Feature Request: Activate / Deactivate Custom Sort through command
- added two new commands to enable/suspend the plugin
- intentionally put in the description convenient names: sort-on and sort-off
- code area was not covered by unit tests, not adding new one at this point (simple logic, fresh mind ;-)
2022-09-07 22:47:16 +02:00
SebastianMC d44a386167 Ticket #3: added new plugin setting to enable/disable status bar entry
- comment clean up
2022-09-07 21:51:33 +02:00
SebastianMC 5672dfaf9e Ticker #3: added new plugin setting to enable/disable status bar entry 2022-09-07 21:44:16 +02:00
SebastianMC 5838a81b9c Ticket #1: added support for imposed sorting rules inheritance by subfolders
- bugfix: detection of duplicate specifications for the same folder across multiple (yaml) source files
2022-08-30 23:25:39 +02:00
SebastianMC e972bce007 Ticket #1: added support for imposed sorting rules inheritance by subfolders
- new syntax: target-folder: Reviews/*  <-- applies to folder, subfolders and all descendant folders
- new syntax: target-folder: Reviews/...  <-- applies to folder and subfolders
- special case: target-folder: /*  tells the plugin to apply the specified sorting to entire vault
- enhanced syntax for '.' - can be used to specify relative path now (e.g. target-folder: ./daily)
- added new sorting attribute (sorting: standard) to actually give back the sorting into the hands of standard Obsidian mechanisms
- fixed a minor bug: some of error messages were displayed only in console, not in the ballons
- unit tests for all new and changed functionality
- pending README.md update
2022-08-30 18:53:58 +02:00
SebastianMC b1a43dff3a
More informative message to the user when no custom sorting specification was found at all 2022-08-17 20:23:37 +02:00
SebastianMC 93daf529d3 First public release of the Obsidian custom sort plugin 2022-08-06 03:15:44 +02:00