Commit Graph

62 Commits

Author SHA1 Message Date
SebastianMC 1322dbab52 #202 Syntax sugar to satisfy stricter TS compilation rules and improve readability 2025-04-23 00:20:32 +02:00
SebastianMC 22992ad421 Finetuned DOM observer and detector of the fully-fledged File Explorer view to enable smoother auto-application of custom sorting 2025-04-22 23:41:21 +02:00
SebastianMC e0b7c9bd6d Minor finetuning of console log message 2025-04-22 23:41:21 +02:00
SebastianMC b8708f81e9 Finetuning initial application of custom sort order:
- console messages more accurate
- DOM-based watcher for deferred File Explorer view to automatically apply custom sort when File Explorer view is actually displayed
2025-04-22 23:41:20 +02:00
SebastianMC 10e0ae096f A different error message on mobile when the File Explorer view is not available (e.g. is deferred). 2025-01-23 23:17:38 +01:00
SebastianMC ef5926c24f #188 - Group of changes addressing compatibility issued with Obsidian 1.7.2 and newer 2025-01-06 13:35:18 +01:00
SebastianMC 92c0e0c431 #188 - Group of changes addressing compatibility issued with Obsidian 1.7.2 and newer 2025-01-06 13:12:19 +01:00
SebastianMC fc6706d8cf #188 - Group of changes addressing compatibility issued with Obsidian 1.7.2 and newer 2025-01-06 12:29:33 +01:00
SebastianMC ae0d2f5280 #188 - Group of changes addressing compatibility issued with Obsidian 1.7.2 and newer 2025-01-06 02:25:41 +01:00
SebastianMC 51ea92f0e8 #185 - drop backward compatibility
- removed legacy code to handle backward compatibility with <0.15.0, <1.2.0, <1.4.11 and <1.6.0
2025-01-03 13:24:13 +01:00
SebastianMC c3008946cc #185 - drop backward compatibility
- removed integration with Starred code plugin (which hasn't already been there for months)
2025-01-03 13:24:12 +01:00
SebastianMC 5013b47e26 185 - drop backward compatibility
- upgraded libraries and TS
- fixed compilation issues
- no other code changes yet
2025-01-03 12:22:31 +01:00
SebastianMC 1019484935 #160 - compatibility with Obsidian 1.7.2
- the fileExplorer patchability check made smarter and version-dependent
- the plugin-integration-point support required by Obsidian 1.7.2 has been already incorporated in the plugin earlier on, for 1.6.0 Obsidian release
2024-09-20 18:53:50 +02:00
SebastianMC 60a60dfb72 #156 - improved support for index-note-based folder notes
- implementation completed, basic tests done
- needs code review with a fresh head
- needs more regression tests of affected sorting methods
2024-09-02 00:11:29 +02:00
SebastianMC 605d5026a6 #156 - improved support for index-note-based folder notes: PUT ON HOLD
- turned out to be not so trivial with one challenging place
- PUT ON HOLD
- added inline annotations with !!! (intentionally breaking the TS syntax)
2024-09-01 17:07:56 +02:00
SebastianMC e66d7be9d3 Extracted setting to a separate settings.ts 2024-09-01 15:23:38 +02:00
SebastianMC 3bc307c121 Bugifx for #147 2024-06-10 22:35:28 +02:00
SebastianMC d59b1af62a #137 - Impose File Explorer refresh with standard sorting when the plugin gets disabled 2024-06-07 23:37:44 +02:00
SebastianMC 3c257bc5d2 #145 - polished code w/o duplication in main.js 2024-05-14 08:47:38 +02:00
SebastianMC 4ab21d6ff5 #145 - refactored the plugin integration point and sorting function invocation and wrapper(s) to work under Obsidian 1.6.0 (which introduced significant refactoring)
Remains to do:
- polish the code to remove duplication in main.js
- full testing under 1.6.0
- regression tests under latest 1.5.x (the code is backward compatible)
2024-05-13 20:14:03 +02:00
SebastianMC f5c64845ba The global `app` object becomes deprecated in Obsidian 1.6.0
- subsequent code adjustments
2024-05-13 14:51:57 +02:00
SebastianMC 107c32e461 The global `app` object becomes deprecated in Obsidian 1.6.0
- switched code to use the DI approach - the handle to `app` is handed over to the Plugin at initializaion. Keep in and supply down the execution chain, as needed
2024-05-13 14:36:13 +02:00
SebastianMC 9f4008c2a2 Revert "Bugfix for #131"
This reverts commit 238c027903.
2024-02-09 14:03:48 +01:00
SebastianMC 238c027903 Bugfix for #131
Obsidian introduced breaking changes around File Explorer JS structure which prevented this custom-sort plugin from working.
2024-02-07 23:34:27 +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 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