ark-builders / ark-memo Goto Github PK
View Code? Open in Web Editor NEWARK Memo is one app for all of your notes: it's aiming to combine plain text, voice and hand-written notes
License: MIT License
ARK Memo is one app for all of your notes: it's aiming to combine plain text, voice and hand-written notes
License: MIT License
If we make user capable of growing image then they could do graphical notes using the app. Suppose that the user has a device supporting input with pen. The user can write on the image in drawing mode, but when they reach the edge they need more blank space to continue writing. We can grow space on scroll event or by pressing special floating button.
This UX problem could be solved also by vector graphics mode and infinite canvas.
(JFree)[https://github.com/jfree/jfreesvg] looks like the best lib for creating SVG. But lower-level XML generation is also possible with (XmlUtil)[https://github.com/pdvrieze/xmlutil]
Wire index update flow of arklib in Memo.
This helps avoiding manual check of file existence when creating a new file.
Related discussion here: #29 (comment)
When we modify a note, its ResourceId
changes as well. This is expected since we use content-addressing. In order to provide proper UX, we need to track versions of the same note and present them to user as a single note. We also need UI elements to present older versions to user ("timeback machine"). User should be able to view or remove unwanted versions. Forking older versions into another note is separate feature.
Version storage must be stored in .ark/versions
file and should look approximately like this:
3155416 -> 7705444
5839051 -> 8921986
9279849 -> 1558729
3155416 -> 9763586
2128401 -> 19145158
Each entry of the file is a pair of ResourceId
s, left id is parent and right id is child.
This feature needs a button to invoke list of versions, or "timeback machine", for any note. Each version must have a button to see its content (read-only mode), to remove it and to fork it (separate issue).
When we remove a version, we must keep the history unbroken.
Suppose, we have entries like this in storage:
3155416 -> 7705444
7705444 -> 8921986
If we want to remove 7705444
version, then we must replace these 2 entries with new entry:
3155416 -> 8921986
Similar to ARK-Builders/ARK-Navigator#78
Would be nice to be able to create graphical notes using pen. Common with ARK Retouch code should be extracted into separate repo.
After finishing ARK-Builders/arklib-android#79 we have .ark/user/properties
subfolder in every root for keeping user-defined metadata a.k.a. properties.
Now, it's possible to store fields like title
separately from resource.
This stabilizes resource ID — it won't change if we change title etc.
Related work:
Capability to create a note using voice only is essential for people spending a lot of time driving.
Right now saving title and description is tightly coupled to saving content. They should be separated, since they are stored separately it should be easy to save title only, description only or both without overwriting content.
When we have sequence of versions of a note, we can view or remove older versions but we also need UI elements to fork older version into new note. Fork means that we have several entries in version storage (.ark/versions
) with the same parent.
E.g.
3155416 -> 7705444
5839051 -> 8921986
3155416 -> 9763586
Here, notes with id 7705444
and 9763586
have the same parent with id 3155416
.
A button is needed in versions list, which allows to edit a version into new note.
ARK Memo must be able to save notes into a folder (should be able to set default folder in settings).
The format is plain-text. Extension .note
could be used to distinguish notes from other text files, but essentially they would be the same, just for the start.
ARK Memo must be able to add notes by:
Folder for saving the data must be possible to be configured by user. This shared component must be used for choosing it.
It is pretty easy to create a pair of text documents with the same content, the same content would result in the same ResourceId
. We should prevent creation of resources with duplicated id.
There are 2 ways of solving this:
ResourceId
of note being saved, lookup into the index for this id.For making notes it would be convenient to have an infinite canvas, so user could use as much space they want. If we don't want to sacrifice quality of drawing, the drawing must be represented as piece of vector graphics.
If user edits the content with empty title, title should reflect first 20 characters of the content.
When the user overwrites the title, it stops reflecting the content.
User should be able to create a description, too. But it should be hidden by default.
Crash: FileAlreadyExistsException
when saving same note to same folder.
java.nio.file.FileAlreadyExistsException: /storage/emulated/0/test1/10-1217600887.note
at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:429)
at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
at java.nio.file.Files.move(Files.java:1395)
at dev.arkbuilders.arkmemo.data.repositories.TextNotesRepoImpl.renameResourceWithNewResourceMeta(TextNotesRepoImpl.kt:115)
at dev.arkbuilders.arkmemo.data.repositories.TextNotesRepoImpl.access$renameResourceWithNewResourceMeta(TextNotesRepoImpl.kt:27)
at dev.arkbuilders.arkmemo.data.repositories.TextNotesRepoImpl$write$2.invokeSuspend(TextNotesRepoImpl.kt:91)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@59337dc, Dispatchers.IO]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.