102 Commits

Author SHA1 Message Date
510b277398 Add Note.apply
Avoid calling each setter as each results in the entire tree being
rebuilt.
2021-09-16 20:07:33 +02:00
63489ab349 ChecklistEditor: Add highlighting 2021-09-15 17:00:28 +02:00
33a731a3d7 Add reuse licensing to files in lib 2021-09-15 13:06:43 +02:00
cfaf1436f1 Move the MarkdownYamlCodec out of the Note class 2021-09-09 10:08:38 +02:00
637666b5e4 Add search term highlighting to all the editors
Minus the checklist editor
2021-09-08 02:04:50 +02:00
3d348fe66f Avoid hardcoding the text highlight color
This also fixes text selection not being very visible in the dark mode.

Related to #467
2021-09-07 18:13:55 +02:00
d3fae40173 Rename views to providers
The providers give a View
2021-09-06 14:32:25 +02:00
d209ed4d30 MaterializedViewProvider: Make the fetch function async
Also make the contructor sync, this makes everything much easier.
2021-09-06 14:15:38 +02:00
7abfc505e3 Note: move rename function to the parent
I want the note class to have a simple object with no internal state
mutation.
2021-09-05 11:15:24 +02:00
abc9a31290 Add InlineTags Materialized View
This way we avoid parsing the tags from the body again and again, also
I can make the tags processing more complex without worrying too much
about the computational overhead.
2021-08-31 22:59:41 +02:00
5ea80fb617 Note: Move Image code to its own class
The Note class is way way too huge and has too many responsabilities. I
would like the Note class to be very small and immutable.
2021-08-31 12:30:47 +02:00
6367466c1b RawEditor: Small experiment to show the searched text
Related to #477
2021-08-30 23:21:37 +02:00
59c1f83b21 LocaleKeys++ 2021-08-26 14:09:25 +02:00
ef1536223d Remove Note.addImageSync
We can just always use the async version.
2021-08-04 08:28:10 +02:00
39096c270c Note.save: Move to NoteStorage
I'm trying to move all FS related operations out of the Note class, and
ideally make it super small. This class will need to be serialized over
the wire for the web version, and that needs it to be small.
2021-08-04 08:03:48 +02:00
3a71cca202 Move logging code to its own folder 2021-07-30 14:39:13 +02:00
72e9de29de Move editor related code into its folder
I'm trying to separate the code based on the domain so that this code
can be easily reused in other projects
2021-07-30 11:12:00 +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
70adcb2e5d Card/GridView: Add hero animation 2021-07-26 18:57:24 +02:00
0ea8da0d44 Remove a few more cases of dart:io usage
I want to abstract out all uses of File and Directory. The sooner I can
do that the sooner I can use it on the web.
2021-07-23 15:18:25 +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
30b9a850d4 Move utils file to utils folder 2021-06-04 18:59:58 +02:00
fce1a8ac06 NoteEditor: null safety++
With this we are nearly done with null safety
2021-06-02 10:46:29 +02:00
190dae6f09 Null Safety++
This is exhausting
2021-05-27 13:41:34 +02:00
4632dc40b9 Split NoteEditor types into its own file
NoteEditor still hasn't been migrated to null safety
2021-05-25 10:16:59 +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
d6b09eec6d Auto format
I use - flutter pub run import_sorter:main to keep everything neat. I
wish this was part of flutter. Maybe I should stop caring about this.
2021-03-25 12:28:21 +01:00
aa83f037d3 license 2021-03-25 12:10:04 +01:00
93cf6433d6 OrgEditor 2021-03-25 12:10:04 +01:00
171126aa87 initial support for .org files 2021-03-15 10:54:32 +01:00
406a72088b Use context.read instead of Provider.of with listen false
Shorter
2021-02-15 22:31:45 +01:00
130f2fe9a0 Rename Repository => GitJournalRepo
Repository is too vague of a word and it gets me confused with the Git
Repository. Also shorterned Repository to Repo. It's easier to read and
write.
2021-02-15 22:28:53 +01:00
e87a096c7d Allow Delete dialogs to be configured
Fixes #330
2020-11-18 13:01:33 +01:00
85d21a62e5 Avoid logging note data 2020-11-07 15:32:36 +01:00
770394a8f9 Rename StateContainer to Respository 2020-10-23 01:38:47 +02:00
bc06efc446 Create new note when clicking on non existing Wiki Link
Fixes #240
2020-10-22 23:57:53 +02:00
eac7ff3c63 Auto save the note when the App loses focus 2020-10-22 15:11:48 +02:00
f81b2ed167 NoteEditor Discard Changes: Do a git checkout on the file
This way it will go back to the exact original version. Our Note loading
and saving sometimes changes the yaml metadata order.

Also, this allows us to autosave the note file.
2020-10-22 14:57:12 +02:00
40349b5660 Add missing trailing commas
How did this file ever even get saved?
2020-09-28 00:09:49 +02:00
43269bbe53 Add lots of listen: false when using Provider
Provider version 4 has an assert which fires if used incorrectly.
2020-09-28 00:09:14 +02:00
265e253584 Generate one journal entry per day
Fixes #243
2020-09-16 11:08:16 +02:00
984fc6864e Make all remaining strings translatable 2020-09-08 23:01:39 +02:00
49dee11a26 Move Note Delete dialog to its own file
+ translate
2020-09-07 16:24:52 +02:00
6ba0f3974a NoteEditor: Pass it the parentFolder
A note has a parent which is the physical folder it is inside, and a
parent folder which it is being displayed inside. It's useful to have
the latter as that can be used to display the next note - in the case of
the Journal Editor, and open the graph view as well.
2020-08-20 10:42:39 +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
b14e094e59 Copy Note to clipboard when it cannot be saved
Also avoid showing the actual exception. It's not very useful to the
user, and we're logging the exception to Sentry anyway.

Related to #124
2020-07-13 17:27:39 +02:00
84fab89f48 Do not allow us to edit the Note Editor if the Note cannot be saved
In some rare cases the note just doesn't get saved on disk - in those
cases instead of silently failing we will refuse to exit the note
editor, forcing the user to copy the note and paste it somewhere else in
order to not lose the date.

This isn't the best solution, but it prevents data loss, in a few edge
cases which I cannot reproduce.

Fixes #124
2020-07-13 17:13:02 +02:00
fb9b69bb46 TagsFolder: Auto add relevant tag to new notes 2020-07-09 18:03:06 +02:00
ae74e02fa7 Rename Note: Ensure markdown files end with .md
This broke when supporting txt files
2020-06-10 15:16:14 +02:00
5714642e15 NoteEditing: Make sure we report exceptions on save
We don't want to silently ignore these.
2020-06-10 13:18:48 +02:00