292 Commits

Author SHA1 Message Date
5571fdb65e Use time.dart
I'm sacrificing const code for readability. So maybe I'll lose a bit of
performance, but this is so much easier to read.
2020-11-10 19:07:09 +01:00
3c8e36aba6 Relicense inline tags code to MIT 2020-11-09 18:35:27 +01:00
aaf96c82d1 Convert IgnoreReason to an enum 2020-11-09 12:10:38 +01:00
63cc668db2 Improve log messages
* Remove one annoying one
* Event is an enum and prints a 'Event.'
2020-11-09 11:35:46 +01:00
ee34e2f628 Avoid annoying log statement
The reason should be saved in some other place so the user can know what
is going on. The debug logs get cluttered with this and this would leak
the folder names.
2020-11-08 10:36:29 +01:00
93fd99148f Experiment with the concept of Transformers 2020-11-07 15:52:33 +01:00
7be85bf569 Avoid using tr inside NotesFolderFS
Not sure why it doesn't work.

Fixes APP-F4
2020-11-03 13:44:58 +01:00
bc06efc446 Create new note when clicking on non existing Wiki Link
Fixes #240
2020-10-22 23:57:53 +02:00
c86e0d278c Remove verbose logs
These make reading the log files in bug reports really hard. Also it
contains some personal info, so I rather not have them.

I can look into another way of showing the user why certain files were
ignored.
2020-10-21 17:08:31 +02:00
704329e3d5 Fix setting up an empty repo
Fixes APP-EQ
2020-10-21 15:32:33 +02:00
98c92a3fe1 Handle new version of git_bindings
This changes the way the SSH keys are managed, they are no longer
managed by the git_bindings plugin and are instead just passed as
parameters. They are now saved in shared_prefs. This allows us to easily
have multiple ssh keys.

It also allows us to store the ssh keys in a more secure storage
location in the future.
2020-10-19 14:52:24 +02:00
88dd449ac6 Graph: Avoid calling a method on null
Fixes APP-DX
2020-10-18 10:06:03 +02:00
540078c413 Improve repo migrations
Earlier we had one folder 'journal_local', when the remote would be
setup a new folder called 'journal' would be created, and each all the
files would be copied over. This meant the local history was being
destroyed.

Now, we only have 1 folder 'journal', and on 'cloning', we add the url
as a remote, and do a git fetch + merge.

This simplifies everything drastically, and opens the door for multiple
remotes.
2020-10-15 12:18:47 +02:00
044592b92d Allow Journal Entries to have their own file naming scheme
Adding an individual setting is becoming way too complex now.
2020-10-12 18:21:26 +02:00
9499cea164 Remove Settings global
Stop it being a singleton. This means it needs to be passed around a
lot. This sucks, but it's how it should be. I shouldn't be using a
global variable to get around this.

This is needed as Settings will soon become repo specific when we
support multiple repos.

This breaks saving the settings in a file, that feature was toggled off
anyway. It needs to be thought over again.
2020-10-09 00:59:19 +02:00
1a74955e99 Improve inline tags regexp
Fixes #265
2020-10-05 11:43:52 +02:00
48b9b4d642 GraphView: Dispose the Graph correctly 2020-09-28 00:48:18 +02:00
4d586d85ae Avoid modifying the InteractiveViewer at all
Just import it with a different prefix
2020-09-28 00:17:55 +02:00
58de0498ac Replace git pull with git fetch + merge
This way we can swap the merge out easily for our own custom merge code.
Also, this makes it easier to do a merge as a way of migrating.

This commit probably breaks stuff on ios
2020-09-26 20:27:07 +02:00
82db15128b NoteFileFormat: Refactor
Get all the allowed extensions in one place. Currently the code is
scattered all over the place.
2020-09-26 19:19:26 +02:00
b34395f754 Graph: Do not let nodes get stuck
Nodes which have a pos < 0, are no longer force directed. This make the
graph behave strangely. It's better to just push it a little further
from the edge.
2020-09-26 06:03:14 +02:00
1b1e49902b Add a copy of the InteractiveViewer
The one in the current stable branch is buggy and the scaling doesn't
work reliably.

This is from the beta branch.

This breaks selecting a node and being able to move it easily.
2020-09-26 05:57:30 +02:00
475fbcbc00 Graph: Start drawing the nodes closer to the top left
Instead of drawing them somewhere in the middle.
2020-09-26 05:39:26 +02:00
6ede96a8ab Graph: Remove all debug print statements
Too much noise. I'll remove them later when I cleanup the code.
2020-09-26 05:37:14 +02:00
8e5ac69af2 Graph Layouting: Add original const values
These seem like magic values to me.
2020-09-26 01:17:35 +02:00
e616d69773 Graph Layout: Do not let nodes pos go < 0
Otherwise they fall off the visible area
2020-09-26 01:13:37 +02:00
42b7562989 GraphView: Properly cache the neighbours
Stupid mistake
2020-09-26 01:03:45 +02:00
70a48f6d2f Graph: Remove unused function
We never assign nodes randomly starting positions any more.
2020-09-26 00:48:46 +02:00
34630c671e Node: cache the label
Computing the path spec again and again is apparently very very
expensive.
2020-09-26 00:36:58 +02:00
b72e4719d2 Remove another case of the Settings singleton 2020-09-25 01:05:17 +02:00
eb4d99338b Remove some uses of the Settings singleton
It needs to be removed from everywhere.
2020-09-25 00:40:23 +02:00
0a2a5532f5 Link Refernces: Normalize the path properly 2020-09-14 22:12:08 +02:00
719d6842c3 GraphView: Move initial node positioning logic to its own class
Right now we're just placing it in a grid, but we could also place them
in a circle as is done by Obsidian.
2020-09-14 17:57:38 +02:00
f7adeafe7d First iteration of the Graph View
I'm testing this with the Foam documentation. This has revealed a number
of bugs in our link resolver - most of which have now been fixed.

The graph layouting is not being done as this is so incredibly slow.

This has been added as an experimental feature.
2020-09-14 17:47:26 +02:00
c94ff85804 Overhaul Link parsing
We were mixing up header links with wiki links and the alt text. It was
a bit messy. We currently do not support linking to a particular part of
a note. Nor do we support wiki links as link references.

Fixes APP-A0
2020-09-14 12:20:15 +02:00
a599be89fe FlattenedNotesFolder: Make title non optional
Also translate the title string.
2020-09-13 20:59:53 +02:00
da459c65e3 NNBD: try fixing some of the errors 2020-09-13 20:52:16 +02:00
56e5c10696 Add scaffolding to make emoji parsing optional 2020-09-08 23:33:48 +02:00
fa075c25e0 FolderView: Implement selecting a note
This is disabled for now, untill I expose the actions which should be
performed when selecting a note.
2020-09-05 15:53:26 +02:00
ddf7345b0d MdYamlCodec: Load maps properly
Our MdYamlCodec runs inside an isolate, and send the result back. The
YamlMap data structure doesn't seem to be serializable over an isolate
and gives us an error. Therefore, we should make sure it is a normal
map.
2020-09-03 14:03:49 +02:00
d3d04e6df9 NoteLoader: Handle the exceptions while trying to load the file
They were being silently dropped.
2020-09-03 13:48:57 +02:00
ec91a784de NotesFolderFS: Remove any notes which failed to load 2020-09-03 13:42:54 +02:00
6e289a6b6e Note: Add an API to get the images from a note
This will be used in the future to display the images in the grid/card
view.
2020-09-03 12:26:45 +02:00
1f071771ca Do not allow empty inline tags 2020-09-02 17:38:43 +02:00
074e918db4 Implement basic inline tags
Fixes #44
2020-09-02 17:24:34 +02:00
25f516c15c Add the scaffolding for automatically adding Wiki Links
The idea is that on save a Note, terms which have already been used
before as Wiki Links should automatically be converted into Wiki Links.
2020-09-02 17:02:13 +02:00
0b4867da10 LinksLoader: Ignore non local links
In Reference links

Fixes APP-9M
2020-08-31 08:55:27 +02:00
a8af8d795e MdYamlDoc: Add a very basic reverse implementation
A user requested that the YAML header be present at the bottom. I
thought this would be quite simple, but there are lots of edge cases
which will need to be solved.

Related to #223
2020-08-30 15:49:08 +02:00
a3f556df47 Actually implement the Zettelkasten filename format
I like an idiot only exposed it in the Settings.
2020-08-30 15:16:03 +02:00
aabeb57fc0 InlineTags: Add settings page
And support multiple prefixes.

This is disabled for now as it hasn't been fully integrated.
2020-08-21 12:18:55 +02:00