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
* Combine steps
* Cancel if escape pressed in any step
* New template command
* Execute "create new template" when no templates found
* Provide inline documentation
* Add tests
* Add docs for the feature
Co-authored-by: Jonathan <jonny@mondago.com>
* improved delta logic in graph.js
fixes a bug that was due to using object.splice inside a forEach loop (sometimes stackoverflow is wrong - removing the element inside the loop will actually reduce the iterations and not all elements in the array will be visited!)
* various fixes to live update of workspace model + tests
* added tab size option in settings.json
* added workspace WIP
* workspace supports resources
* uri check more lenient (was causing bug by not recognizing some objects)
* added placeholder resource type
* consolidated code in FoamWorkspace and added more tests
* updated all modules to use FoamWorkspace
* fixed FoamWorkspace.getConnections function
when links or backlinks are not present it no longer adds `undefined` to the connection list
* fix in workspace handling of direct links
* consolidated id/name generation functions
* added test for wikilink resolution when several notes have same filename
* removed reference to graphMiddleware in foam-local-plugins doc
graph middleware won't be supported with the `FoamWorkspace`. Support for the markdown provider remains
* removed support for graph middleware, graphlib dependency, and old note-graph implementation
Running the tests with vscode 1.53.0 is causing issues in `suite.ts:23`, which is causing a stack overflow, possibly due to a recursive callback. Also see https://github.com/foambubble/foam/pull/479#issuecomment-774167127 .
It's unclear what's causing the issue, but forcing the version to 1.52.0 solves the problem.
To review, further investigate, and roll back this workaround.
* fix#442 - link to known-issues replaced
* formatted settings + enable format on save + improved jest config
* removed editorconfig in foam-cli
* formatted foam-vscode
* removed author in package.json files
* minor changes to readme files
* fixed husky pre-commit hook
* Add graph style to VSCode settings
* Update default to an empty object
* Add function to retrieve the graph style from the settings
* Implement the graph custom styling setting
The implementation makes use of the webview communication mechanism to
switch messages between the webview and the graph.
It works as follows:
- When the webview is loaded, it now sends a single request to VSCode,
the request asks VSCode for the graph style
- When VSCode answers with the style, the graph style is updated and
the webview loading process continues as normal.
The style change does not modify the API, in fact it makes use of the
shadiest programming tatic ever, *global variables* to remain
compatible.
The style object *currently* supports four base fields:
- background: string
- fontSize: int
- highlightedForeground: string
- node: object
- note: string
- nonExistingNote: string
- unknown: string
* Simplify null handling logic
* Remove debug logs
* Rename style setting
* Rename message style type
* Remove forgotten debug log
* Refactor the code to match model & action
* Add missing break
* Allow for dynamic style updates
* Fix the window loading bug
* Implement a permanent fix to the bug
* Replace `nonExistingNote` with `placeholder`
* Include the new graph style feature in the docs
* Remove unnecessary async
* Remove unused case
* support direct links
* added support for labels with formatting
* added documentation and removed lint warning
* ignore external links
* improved uri parsing
* filter links pointing to same note (e.g. sections within the note)
* check that note exists before navigating to it
* fixed compilation error
* added support for e2e vscode tests
* using github action that supports headless test run
* loading vscode test instance in empty dir to speed up bootstrap