27 Commits

Author SHA1 Message Date
c6665fa63e Simplify Settings/Config classes 2021-07-29 12:45:33 +02:00
c66eaf1052 NotesFolderConfig: Read directly from the SharedPref
It's super annoying that we have this class which reading from the
settings, so adding any new value involves updating some 12 new things.
2021-07-27 16:33:16 +02:00
09cf55bc80 Add a failing test for Dendron Frontmatter
This is trickier to implement than I thought.
2021-07-14 12:24:46 +02:00
d6e2f09a72 Move all settings code to its own folder
Jumping around between the widgets / screens and outside is bit
confusing. Also this way, I can add the stories right here.
2021-06-05 12:23:28 +02:00
9acf3d15f6 null safety++ 2021-06-02 09:40:53 +02:00
96c2809d3e Migrate most of the tests to null safety 2021-05-19 12:09:45 +02:00
d008f0d982 First version of dart migrate
Most of the files haven't been migrated. Lets work on this bit by bit
2021-04-10 22:18:35 +02:00
d2d9504dc9 Make sure all notes end with a \n
Fixes #383
2021-03-26 10:09:15 +01:00
f75e119995 Make Settings take the folderName as a parameter 2020-10-23 02:29:48 +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
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
2668d14510 Replace test with simpler test
Also lets not auto convert old notes title format.
2020-08-19 11:40:50 +02:00
ada656c675 Do not write the title as h1 if it is in the yaml header
In general, we try to follow the conventions in the note parsed over
whatever the default config.

Related to #214
2020-08-19 11:31:16 +02:00
2fa475e10a Add an extra test for txt files and the title
Just to make sure it's never parsed.
2020-07-29 16:29:27 +02:00
30f9f86ad3 Fix all the broken tests because of title change 2020-07-29 15:58:43 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
88552fe8e9 Revert "Workaround intl bug by harding 'en' locale"
This reverts commit 303192d9d575b26a77a00f7a62212f310ec1e329.
This reverts commit cd9d128b47ed523036f7ae1232ec7adcf04ed8a9.

GitJournal is used by non-English speakers (a lot in China and Russia)
and while we don't support those languages completely, we do support
them a little bit. I don't want to loose this functionality. It would be
better for us to fix the bug in intl.
2020-06-10 09:31:08 +02:00
303192d9d5 Initialize intl in tests
This sucks.
2020-06-09 18:44:37 +02:00
67c2777d9b Parse links in wiki syntax [[term]]
This way we can use this faster syntax which is also supported by
Obsidian.
2020-06-08 00:52:03 +02:00
991af6e1fb Add a test to make sure new notes always have a file extension
This bug has appeared way too many times
2020-06-06 13:52:23 +02:00
42d6386096 Add basic txt file support
With this 'txt' files are now read and written. However, they don't have
any metadata so they don't show up correctly in the sort order and
currently the Markdown Editor is still available for them.

Related to #55
2020-06-02 00:15:18 +02:00
af69dd6e48 Note: Allow returning the links in the document
This isn't perfect as we aren't handling referenced links and maybe even
autolinks, but it's a start.

Related to #141
2020-05-26 14:50:23 +02:00
a5ad172790 NoteTest: Remove datetime value
Causes the test to fail on the CI as Dart doesn't have proper timezone
support.
2020-05-13 01:12:37 +02:00
52fd859990 Note: Make tags a set instead of a list
This way we don't need to check for duplicates
2020-05-12 23:33:57 +02:00
59ab66844f Note: Allow tags to be read and serialized
This is just exposing the tags on the Note class. Not making it
available through any interface.
2020-05-12 22:59:45 +02:00
b252f037b3 Rename NotesFolder -> NotesFolderFS
And NotesFolderReadOnly to NotesFolder. It just makes more sense this
way as we're now getting more and more different "types" of
NotesFolders.
2020-03-15 02:01:07 +01:00
442d9d2b4e Allows Notes to have a different modified yaml key
Possible Options - modified, mod, lastModified, lastMod, lastmodified or
lastmod. When read the the note we will figure out which one is being
used and accordingly write back that value.

This makes it easier to use GitJournal for editing Hugo websites as they
usually use the 'lastmod' field to indicate when the post was last modified.
2020-01-05 18:12:35 +01:00