55 Commits

Author SHA1 Message Date
0f5bb345d3 Allow Swipe to delete to be configurable 2020-08-31 11:38:04 +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
46269dd94a Implementing controlling of the sorting order
The dialog looks quite ugly right now, but at least everything works. I
can work on making it prettier after this.
2020-08-14 19:17:38 +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
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
cd9d128b47 Workaround intl bug by harding 'en' locale
https://github.com/dart-lang/intl/issues/266

This is strange since Intl.getLocale() returns 'en_US' in my case.

Currently, GitJournal only supports 'english' anyway, so this shouldn't
be a big problem.
2020-06-09 18:23:43 +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
8aa96c1b9c GridView: Use CardView internally
Just with a fixed height card. This way we save on lots of code
duplication, specially as each of these views will become more complex
as we add dismissable, animations and selectable notes.
2020-05-18 23:46:36 +02:00
aa52f49fff CardView: Make it responsive 2020-05-18 23:38:46 +02:00
c9b755862b Folder ListView: Reset the listeners
I clearly didn't understand the State lifecycle
2020-05-14 12:42:08 +02:00
b2d0cf44ab Stop using deprecated TextStyle properties 2020-05-08 10:55:00 +02:00
317f75799f Add Title + FileName sorting modes 2020-05-03 16:01:21 +02:00
a0ea7397ee Remove unused variable 2020-04-14 16:47:47 +02:00
de84d99c11 CardView: Fix top padding
It should be part of the list and go away when scrolling.
2020-04-04 11:51:10 +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
cfc38b90b9 NoteTile: Implement Inkwell
It needs to be inside the Material to work.
2020-04-02 19:15:18 +02:00
2b6c5e69f1 NoteTile: Adjust border color 2020-04-02 18:45:25 +02:00
fbbc92eea8 NoteTile: Remove empty lines in the end 2020-04-02 18:45:09 +02:00
64e3d36130 Improve stripMarkdown formatting
At some point this will need to be done in another thread.
2020-04-02 18:19:50 +02:00
56f73ffe3d NoteTile: Limit to 11 lines of body
Looks much better this way. It's also similar to how Google Keep does
it. This way users moving from it will feel right at home.
2020-04-02 17:25:06 +02:00
965639e6f2 Add the concept of Folder Settings
This contains the default editor / view / sortingMode / etc. For now the
folder settings are shared among all Folders. But the idea is that we
should be able to set different settings per folder (real or virtual)
2020-03-31 11:16:04 +02:00
040a1a228a NoteTile: Make it prettier
Decrease the font size for the header and reduce some spacing. It's
finally starting to look somewhat okay.
2020-03-30 12:27:09 +02:00
b52613ef5b GridView: Make the tiles smaller 2020-03-30 12:25:17 +02:00
499aa00e4d Improve Grid/Tile view styling 2020-03-30 12:17:18 +02:00
5c44905772 Make Grid/Card View share the tile 2020-03-30 11:57:35 +02:00
9cbe6dd389 GridView: Improve look of tiles 2020-03-30 11:54:10 +02:00
930356aaf1 Add a GridView
This doesn't really work for small notes, but meh.
2020-03-30 11:45:17 +02:00
cdd5d7aca0 For generated titles - prefer the provided title 2020-03-19 15:40:09 +01:00
2c361172c6 Avoid recreating DateFormats
They only need to be created once. This should result in a minor
performance gain while building the folder views.
2020-03-19 15:23:30 +01:00
d5484502df Ensure all ListTiles in FolderView are of the same height
It looks way neater this way.

https://github.com/flutter/flutter/issues/31134
2020-03-19 02:59:59 +01: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
97cea0d8f9 CardView: Make it a bit prettier
It still has a long way to go to being usable. But I rather have in
integrated so I can slowly keep improving it, and for some users to try
it out. It is clearly marked as experimental.
2020-03-12 14:38:26 +01:00
e352f1f9c9 CardView: Render checklists better 2020-03-12 14:33:38 +01:00
00f3edbedf CardView: Remove extra new lines 2020-03-12 14:31:43 +01:00
063d0fda3a CardView: Show the title 2020-03-12 14:30:21 +01:00
f4dd4fd148 Add experimental card view
This notes are displayed as cards. This is meant to emulate a more
google keep style.
2020-03-12 14:23:15 +01:00
59658db045 StandardView: Show the date time based on the sorting mode
Just like in the journal view.
2020-03-12 00:13:42 +01:00
7aea2611bf Allow the StandardFolderView to be customized
The customization screen is very ugly and this entire thing feels
extremely hacky with the abstractions leaking out everywhere. However,
it does work.

I'll clean it up another day.
2020-03-11 14:48:32 +01:00
d2b6b0eb08 Remove the Compact View
I need to merge it into the StandardView. The more I think about it, the
more this view doesn't make sense. Specially since I need to add the
same extra configuration options in both views.
2020-03-11 13:19:50 +01:00
d7265ec69b FolderViews: Never let a Row have a null widget
Otherwise we get an exception. This happens when a note has not loaded
and we're trying to render it. Ideally we should handle those cases with
some kind of animation instead of the current approach.
2020-03-06 19:25:00 +01:00
2f9f8b3e73 Add a Compact View
Fixes #66
2020-03-05 19:24:20 +01:00
9ff33f51ce Remove unused imports 2020-03-05 19:15:41 +01:00
8e9b23982c Add support for a simpler filename format
Also make this the default when one doesn't have a title.

This is important as now the filename is far more visible with the new
standard view.
2020-03-05 19:14:27 +01:00