56 Commits

Author SHA1 Message Date
e2c1363224 Remove unused code + deps
Both this calendar view and this history screen need a lot of work to
get them to a place where they can be shipped, and there are no plans of
doing that.
2024-08-17 00:47:41 +02:00
7fd1c99287 Use Provider's context.read/watch
Instead of the legacy Provider.of. Less scope of bugs this way and the
code is so much nicer to read.
2023-12-06 08:20:40 +01:00
833dcd3294 Improve code readability 2023-12-06 08:20:40 +01:00
657721adc6 Update dart-git and stop using the Result class
Instead we're going to move back to standard exceptions.

Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code

I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
2023-11-24 14:03:30 +01:00
b925da7a47 Use the generated localization instead of easy_localization
Not everywhere, but a large part of the code base.

This way, hot reloading will also reload the strings which makes for
such a better developer experience.
2022-11-19 03:02:01 +01:00
92e73c414d Move core Note classes into a separate file
I'm trying to get ride of this huge 'Note' class, and have it be quite
dumb. The idea is that we'll have separate Note subclasses - TxtNote,
MdNote, etc
2022-04-24 13:09:14 +02:00
c3e7a9ffd7 lint: Add avoid_void_async 2021-11-17 18:10:59 +01:00
e589d1c1eb Experiment with a CalendarView 2021-11-15 12:39:12 +01:00
4b641f88c8 Move NoteEditor screen to the editors folder 2021-11-04 15:14:52 +01:00
6a915864f2 Move NotesFolder's code to their own folder
The 'core' folder is becoming way too huge.
2021-10-15 12:31:35 +02:00
097ffc6b42 Support multi note selection
Fixes #90
2021-10-14 15:38:07 +02:00
3a68ccac76 FolderView: Optionally show nothing when empty
This is helpful when combining multiple folderviews.
2021-10-12 17:10:25 +02:00
7e0a77ace3 Fix many cases of 'avoid-ignoring-return-values'
Now that dart-code-metrics has been updated, this lint can finally be
used. So far all of these are false positives, in the sense that I don't
care about their return values.

I wish there was an easy way of marking functions whose return value
shouldn't ever be ignored.
2021-09-27 18:39:18 +02:00
c4ef1f569b Use flutter_lint
Instead of picking lint values. This way I don't need to routinely
looking at extra lints to enable.
2021-09-21 15:42:13 +02:00
e1ec1c1b1e Remove useless debug statement
+ add missing license
2021-09-17 10:10:55 +02:00
5f5d04eec8 WikiLinks: Clicking on them should open the correct note editor 2021-09-16 22:37:32 +02:00
f92c21461f Hardcore /newNote/ in a variable 2021-09-16 22:34:17 +02:00
74ac0f4328 Fade to newNote 2021-09-16 22:30:26 +02:00
33a731a3d7 Add reuse licensing to files in lib 2021-09-15 13:06:43 +02:00
6367466c1b RawEditor: Small experiment to show the searched text
Related to #477
2021-08-30 23:21:37 +02:00
7ff61d2f41 Disable dart-code-metrics for now
Even though I'm not using v4.2, the return-value rule is still being
applied with `flutter analyze` though not consistently.

For now, lets disable this, as there are 300+ warnings to fix.
2021-08-25 11:17:21 +02:00
3a71cca202 Move logging code to its own folder 2021-07-30 14:39:13 +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
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
844111007b FolderViews: Null Safety++ 2021-05-25 11:25:24 +02:00
73f9db5fab Core: Null Safety++
This is a rather huge change. I hope I haven't broken anything.
2021-05-17 18:15:47 +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
77a0670bf7 Use ScaffoldMessenger
Scaffold has been deprecated for the snackbar
2021-03-24 15:29:25 +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
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
265e253584 Generate one journal entry per day
Fixes #243
2020-09-16 11:08:16 +02:00
fac2826800 Implement the scaffolding for search highlighting
Still need to implement the actual highlighting part
2020-09-05 16:14:16 +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
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
b85f9028fe Half implement Note selection in a FolderView
This allows you to long press on a note and select it, thereby allowing
you to perform actions on it, without opening the note.

This is disabled for note, as it isn't completely implemented. I'm not
sure how to pass down the informatin on which Note is selected.
2020-07-31 20:36:20 +02:00
27c98b8b0a FolderViews: Minor refactor
Expose the noteTapped and noteLongPressed functions from all the views.
This will be required in the future as we support selecting a note (or
multiple notes) in order to perform some action on it.

Right now selecting a note means opening the Note Editor.
2020-07-31 19:38:26 +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
835bf1f089 Fix undo not always working
This should hopefully fix it

fixes APP-31
2020-06-04 15:24:59 +02:00
8b4fa886ba Add a CustomRouteObserver
This basically asserts if we move to a route without a name. This way
I'll always catch when a route doesn't have a name, and I can start
getting better analytics on which screens are used most frequently.
2020-05-26 13:43:41 +02:00
bb0e574495 Abstract out the logging
This way moving away from Fimber will be much easier.
2020-04-04 11:50:57 +02:00
9e60a74c19 Allow opening relative links while are notes 2020-04-02 19:34:54 +02:00
930356aaf1 Add a GridView
This doesn't really work for small notes, but meh.
2020-03-30 11:45:17 +02:00
3e38628102 Add a 'type' to each Note
This way we can load the appropirate editor according to the types
available.
2020-03-19 02:36:59 +01:00
a235048b2a Allow a note of a different 'type' to easily created
This adds a bottom bar, which hopefully doesn't make the app too
cluttered.
2020-03-19 01:46:51 +01: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
893fa3f90f Undo Snackbar: Remove the previous one before showing the new one 2020-03-15 01:03:55 +01:00