123 Commits

Author SHA1 Message Date
b25ed00830 Add the concept of a FolderView
For now we just have the StandardView which is the same as it was
previously.
2020-03-05 02:10:27 +01:00
0fc40da55b JournalEditor: Avoid crashing if note has no creation date
In the future when we improve the git itegration that will never happen,
but for now, it's what we have.
2020-03-02 19:57:26 +01:00
b199e4ef74 Simplify the sorting the presentation
Now we don't try to be smart and guess the sorting.

The problem was what to do when we don't have the modified/created
value. In those cases we were trying to use the fileLastModifed, but
that could get quite tricky and it wasn't obvious to the user what was
going on.

From now on - if it doesn't have a modified field, it just goes to the
end.
2020-03-01 14:17:06 +01:00
6d69217cae JournalList: Show the filename as the title when no metadata is allowed
Fixes #72
2020-03-01 13:14:13 +01:00
020c65e132 Minor cleanup 2020-02-28 14:16:05 +01:00
e1a06a439c NoteViewer: Simplify code 2020-02-28 12:42:37 +01:00
dae3d1aec9 Remove the FAB
Fixes #58

I've tried adding a black space under the FAB, but that just reduces the
available vertical space while typing. This does reduce the usability
for small notes, as clicking on the FAB is much easier than clicking on
top-right back button or clicking the back button twice on Android.
2020-02-28 12:34:56 +01:00
a49876e3ee Remove the title editor if it cannot be stored
It just makes it confusing for the user otherwise.
2020-02-19 23:00:52 +01:00
7c8cbdabaa JournalList: Use fileLastModified when no modified/created available 2020-02-17 16:44:37 +01:00
9f2fa7c3e4 Search: All look in the title
Fixes #64
2020-02-17 14:58:28 +01:00
d128fe61a8 MarkdownEditor: preview - Show the title even if it is empty
This way jumping between preview and editing isn't jarring as the text
doesn't need to move at all.
2020-02-13 17:19:12 +01:00
3a3ec76529 StateContainer: Use Provider
This way we can avoid listening for changes in many places.
2020-02-11 19:10:34 +01:00
d5f5b4975a Note Summary: Avoid reparsing the markdown on each build
Save it after it is done once. This should result in a significant
performance boost - over 22% while showing the list view. Also, now with
the addition of a few more animations, this is even more important.
2020-02-11 19:08:33 +01:00
9290d9421e Revert "[Feat] add date to trailing widget in journal listing"
This reverts commit 8f76b4d96089c4a9313a7bf15d40278afee9a6e0.

I want to make another release and this substantially changes the
existing behaviour - I thought it would be fine, but it's proving to be
challenging.

Problems -
* Many notes do not have a title and the fileName is just too ugly to
show to the user when it is an ISO8601 timestamp.
2020-02-09 19:13:46 +01:00
7fd2546334 Add as NotesFolderReadOnly interface
This simplifies the implementation of VirtualNotesFolder and
NotesFolder.
2020-02-09 19:11:01 +01:00
a97bdd8f92 Add a VirtualNotesFolder
Also disable the SortedNotesFolder - it's buggy.

This simplifies using a JournalList as one doesn't need to pick between
a list of notes / notesfolder.
2020-02-09 18:08:57 +01:00
be23f944b7 JournalList: Show the notes sorted
We're using a new SortesNotesFolder class. This way we don't continously
re-sort the notes.

And in the future we will be able to toggle the notes sorting method.
2020-02-09 17:38:51 +01:00
cfb2703414 SearchDelegate: Remove it when pressing 'x'
Usually 'x' just clears the query, but if there is no query it is
strange that nothing happens on pressing it.
2020-02-09 16:32:35 +01:00
0c0fd17543 syncNotes: Catch the exception outside the StateContainer
The StateContainer doesn't have access to the snackbar.
2020-02-09 16:32:35 +01:00
8f76b4d960 [Feat] add date to trailing widget in journal listing 2020-02-06 17:03:32 +01:00
4bfd04fa2d Simplify code 2020-02-06 01:46:46 +01:00
1c8c17fb47 JournalList: Do not show a removal animation if dismissed
Otherwise we show an animation twice, and it is quite jarring.
2020-02-06 01:39:55 +01:00
36543b51d5 Remove unused code 2020-02-06 01:32:55 +01:00
143a1d95c7 First iteration of animating the JournalList
Now on adding / removing elements, the list is animated. It looks
slightly better.
2020-02-06 01:29:30 +01:00
82aeb01ba9 JournalList: Replace ListView.seperated with ListView.builder
I wanted to stop using .seperated as it shows some ugly artifacts when
used with IconDismissable when removing an item, and it makes it more
difficult to replace it with an AnimatedListView
2020-01-31 23:07:17 +01:00
8761f96bbe UndoSnackBar: Stop using Fimber
It makes everything far more complicated, but at least this way the FAB
moves along with the scaffold. With Fimber, that is not the case, and it
is very annoying.
2020-01-31 17:41:05 +01:00
51e42780d6 Split NoteSearchDelegate into its own file 2020-01-31 16:12:55 +01:00
9e520e7e95 FolderSelectionDialog: Make it prettier
We don't need it to have such large icons.
2020-01-29 17:04:18 +01:00
43281bd2bb Add support for moving a Note to another folder
The Folder selection dialog needs a lot of work, but it's a start.
2020-01-29 16:51:57 +01:00
3f40a2992a Add the concept of Editors
* We no longer have a separate editing and browsing view - This does
mean we loose the ability to quick flip between notes by swiping.
However, this is more how a note editor would behave. I do later want to
add that capability back.

* We have 2 editors for now - Markdown and Raw. By default we use the
Markdown editor which can be toggled between Preview / Edit mode.

I later want to add a rich text editor and a todo editor as well.
2020-01-29 00:04:24 +01:00
6d38377144 Split NoteViewer into its own file 2020-01-28 16:02:54 +01:00
150543e065 RenameDialog: Do not accept a name that already exists 2020-01-27 23:27:45 +01:00
35f8559c74 Move RenameDialog to its own file
Also make it a bit more generic
2020-01-27 23:08:33 +01:00
a759ad4a23 Combine showSnackbar code
It's annoying to always have to remember to call it. We had forgotten in
one place and that resulted in a lot of noise.
2020-01-27 19:02:44 +01:00
b6b49e84e4 Simplify the code
Now the Note's modified/created can never have a date with a year = 10
meaning a special thing.
2020-01-07 23:56:58 +01:00
011962db5d Fix flutter analyze 2019-12-27 13:44:20 +01:00
72f1620e7e JournalListing: Use 'modified' date if 'created' is missing / invalid 2019-12-27 11:42:33 +01:00
2b09708793 JournalListing: Show the title
It's no longer a simple JournalListing and instead we also show the
title. The main problem is with what to do when the title is not there.
Just leaving it blank seems to feel weird, specially when the note is
too small.

Maybe it's time to change it such that each row size is not the same.
We're effectively wasting whitespace right now for very small notes.
2019-12-27 11:34:15 +01:00
7b40cbf65f SyncButton: Disable if no connectivity 2019-12-26 20:56:30 +01:00
bc9e308971 Move SyncButton to its own file 2019-12-26 20:56:30 +01:00
ce9a72676b Fix Folders navigation
Clicking on Folders in AppBar when inside a Folder wouldn't take you
back to the Folder Listing.
2019-12-22 15:38:04 +01:00
2ba5b52f8d Move fetch application logs to its own plugin
Maybe it will be useful to others. This way we're also closer to
removing almost all java / objective-c custom code.
2019-12-21 18:17:14 +01:00
591ba30762 Fix flutter analyze 2019-12-11 21:48:46 +01:00
27d5af8b01 FolderListing: Change the scaffold when a folder is selected
This way it's way more obvious. Also, add a back button so the user can
cancel the selection more explicitly.
2019-12-11 21:09:40 +01:00
8c6a33456a Allow folders to be renamed
This is a huge change which involves -
* Implementing Folder renames on the FS + Git level
* Implementing the concept of selecting an item in the FoldersListView,
  this feature isn't provided by default, and even now I'm not sure if
  the semantics which I've implemented are correct. I haven't
  implemented multiple folder selection for now.

Related to issue #18

Also, we're now one step closer to allowing notes to be renamed (#23)
2019-12-06 21:32:41 +01:00
073e76bcba AppDrawer: Try to highlight the selected route
This looks okayish in normal mode, but looks very ugly in dark mode, so
I'm not enabling this. But I don't want to discard this experiment, so
here I am committing this code.
2019-12-06 20:31:32 +01:00
82cfa72897 AppDrawer: Fix clicking on "Folders" when "Folders" is selected
This is a horrible hack, and I should figure out how to make custom
named route transitions work.
2019-12-06 20:30:50 +01:00
0a7f00af7b Stop overwriting the default divider color
It can be configured from the theme if I want it to be different. The
light grey actually seems fine, for now.
2019-12-06 20:12:00 +01:00
4c2285a2cc JournalList: Implement Hero transition
This was especially challenging because of this bug -
https://github.com/flutter/flutter/issues/36220

It's why we need the extra flightShuttleBuilder
2019-12-06 12:32:51 +01:00
0b161a9df4 Transition to Folders page with a fade
It's at the same hierarchy as 'Notes' and we shouldn't have a bottom to
top transition.
2019-12-06 12:11:39 +01:00