* refactored URI to be less dependent on VS Code implementation
* moved uri tests in own file, and added test case from #507
* added license info for VS Code inspired code
* moved URI utility methods in abstract class for namespacing
* better names for some methods
Co-authored-by: Jonathan <jonny@mondago.com>
* added uri utility method, and exposing uri module
* added utility methods
* renamed and enhanced open-placeholder-note command to support all resources
* support for links via document link provider and decorator
* use open resource command in tree data provider
* make open resource command unavailable in command palette
* using snippet for better UX when creating note from placeholder
* exposing parser as a Foam service
* consolidated "open resource" command code
* added tests for document links provider
* added caching of VS Code also for lint
Even if linting doesn't require the vscode part of the cache, we are not separating the two cases so that we only have one cache to maintain, and linting being a faster task (and a task that should fail less than tests) will update the cache more often, speeding up the run of the tests afterwards
* `FoamWorkspace.find` to return `null` when no reference is provided for relative path
* turning wikilinks into browsable links in markdown preview
* moved preview styles in css file and reorganized code in static folder
Static was previous used only for the dataviz graph. Now we have 2 subdirectories: dataviz for the graph, and preview for the markdown preview.
For now the css style is a bit of an overkill, but sets up the right foundation for further customization down the line.
* chore: explicitly disabling gitdoc extension, removing unnecessary async keyword
* fix: fixed test utility fn (and linter warning)
* test: added tests for preview link generation
* changed launch configuration to support both foam-core and foam-vscode packages
* Use URI throughout dated-notes
* Fix typos in comments
* Allow absolute paths in `openDailyNote.directory`
This allows users to press the `alt-d` shortcut to open the daily note
from any instance of VSCode, not just within the `foam-template` repo.
The even listener is called with `this` bound to undefined, which causes the refresh function in fail when it accesses the object methods/fields. wrapping it into an arrow function avoids the problem
* Create Blank Note Explorer View
Creates a new "Blank Note" explorer view which displays all notes that
contain only a title. When note.source.text.trim().split('\n').length
is equal to 1, a note is considered blank. This should mean that the
note contains only a title.
The UX experience is identical to that of the Orphan view. A user can
toggle between both the flat view and a nested view grouped by
directory.
* Cleaned up views and made them much more dynamic.
Instead of just copy and pasting the orphans view into blank notes,
I created a filtered notes provider, which behaves identically to the
old orphan/blank notes providers, but allows the caller to pass in the
"filter function" which will narrow down the list of notes in the view.
This also allows us to more easily unit test the filtering logic, and
only test the flatten / nested logic in one place. It also makes it so
that when we refactor the way one of these views works (e.g. adding the
markdown preview), we don't have to make changes to the other view.
* Fixed unit test that was failing in Windows.
* Combined placeholders and blank notes.
* Removed workspacesFsPaths and replaced with workspacesURIs
Co-authored-by: J.T. James <joel.james@myfuelmaster.com>
* improved resolution for direct links and wikilink with definition
* if the definition of a wikilink points to a non-existing file, create a placeholder for the full path instead
* if a link doesn't point to a valid resource, create a placeholder for the full path instead
* commented out test-data.js import in dataviz.html
* moved test to more appropriate group