31 Commits

Author SHA1 Message Date
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
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
c1d81da15d NewFolder: Fix mix up between Create and Discard
Fixes #139
2020-05-19 11:30:44 +02:00
07576bb624 Do not let the RootFolder be renamed 2020-05-18 00:31:55 +02:00
a959101010 Make some strings translatable
Instead of hard-coding the strings.
2020-05-14 12:00:40 +02:00
4375d0cf6d Add const 2020-05-13 01:21:40 +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
6d3b093499 Rename JournalListingScreen to FolderView 2020-03-05 01:48:50 +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
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
dccd58c5f1 prefer_const_constructors 2020-01-04 15:44:34 +01:00
83e5c44a5c FolderListing AppBar: Make the title a plural
Folders instead of Folder
2019-12-22 15:39:13 +01:00
a2f237ede3 Add scrollbar's in JournalLists and FolderLists
Pros: It's nice to know where we are in the list.
Cons: It makes the lagging in the list view far far more apparent.
2019-12-22 15:16:41 +01:00
abb6029798 Allow Folders to be deleted
For safety we're only allowing non-empty folders to be deleted. Ideally,
we should have some kind of undo button. Or some kind of history - since
we do have that with git.

Related to #18
2019-12-11 21:43:08 +01:00
453a6c518d Allow Sub Folders to be created
Fixes #34
2019-12-11 21:18:12 +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
0b1a41f3bd FolderListing: Use Provider to fetch the NotesFolder
This is our first use case of trying to use 'Provider' for state
management. Right now, we're doing state management quite horribly as
all the widgets are rebuilt whenever the state of the app changes.

With this, we can now start to refactor and only rebuild the widgets
whose data has changed.

There we many many different state management solutions to choose from,
I've settled on Provider, as it seems like the simplest to integrate
into the code base. Bloc/Redux seemed like they would add too much
complexity for me.
2019-12-07 16:30:39 +01:00
d0107b6a26 Fix flutter analyze 2019-12-06 23:58:22 +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
975b235df3 Add Folder creation
Folders for now can only be created under the root folder. I cannot seem
to figure out how to design a good interface for designing how to choose
the parent folder.
2019-12-05 17:08:02 +01:00
5b8fc6342a Connect the AppState to the Folders
Now when adding/editing/removing a note, it gets modified from the
directory it was present in. There is no longer a just a plain list of
all notes, but always a tree of notes, which are inside Folders.
2019-12-04 15:33:30 +01:00
10d65cd6fb Rename NoteFolder -> NotesFolder 2019-12-04 15:33:27 +01:00
464b7512e9 Move Note and NoteFolder class into a core folder 2019-12-04 14:18:11 +01:00
50b8238c27 FolderListing: Hook it up to the JournalListing
Now clicking on a Folder shows all the notes from that folder. You can
even modify the notes, but deleting and adding notes won't work
correctly right now.
2019-12-04 01:30:23 +01:00
c8bfa0e2a0 Move FolderTreeView into its own file 2019-12-04 01:14:17 +01:00
10c4de0769 FolderTreeView: Simplify the code drastically 2019-12-04 01:09:58 +01:00
f2e40d4baf FolderListing: Indent sub-folders 2019-12-04 00:56:29 +01:00
3a3f9c7ad6 FolderListing: Show a leading arrow if the Folder has SubFolders
Also change the Arrow if the folder is expanded.
2019-12-04 00:51:41 +01:00
56ccf00260 FolderListing: Show the actual folders
Also don't load hidden folders
2019-12-04 00:35:29 +01:00
3f8159a353 Add the first iteration of a Folder Listing screen
This is just me experimenting with how the folder listing could look
like, and the different libraries I could use - For now I'm using the
https://github.com/ajilo297/flutter_tree_view library which I've forked
into this file, as it requires many many modifications to get it to how
I want it to work. Plus the library is really simple.
2019-12-03 23:57:13 +01:00