awmartin / doctoral Goto Github PK
View Code? Open in Web Editor NEWOnline docs app a la Dropbox Paper and Google Docs
Online docs app a la Dropbox Paper and Google Docs
As an author, sometimes I need to write with a narrower window, and I expect the editor layout to adjust to fit the size of my browser window.
Firebase is a great platform, but it still relies on managed hosting by "someone else."
Providing another backend in Node.js and a NoSQL database enables authors to host their own deployment locally to keep their documents private, or to deploy on their own remote servers, or even Cloud Foundry, Heroku, etc., if they so choose.
This can also enable offline use cases.
I can use the same front-end code (deployed with yarn serve
) and specify the ExpressMongoBackend. After starting the server locally, I can create/modify/delete documents just like with Firebase.
First implementation has no authentication. It just assumes the server is running locally and MongoDB is deployed with default settings.
Using MongoDB Community v4.2 to start.
To further separate front-end from backend-code, let's isolate the Firestore-specific code. This also enables the possibility for other backends like Node.js/Express + MongoDB or Redis or whatever.
Creating docs and folders don't use the right Firestore-provided protections against failures, since multiple entries need to be created. Go ahead and use them.
When creating headings in a doc and styling them with highlights, the HTML for the highlight appears in the headings outline on the left. e.g. <mark class="pen-red">
.
The heading text in the outline should just be the text reflected in the heading in the document body, with no HTML artifacts.
When HTML characters (e.g. ) appear in headers, they show up in the headers outline on the left as escaped characters.
Looks really weird and gives an impression of instability in the app.
Those characters should be there in the outline, but they shouldn't be escaped, they should be the character they're intended to represent.
There may be a way in Vue.js to not escape contents that are interpolated into the template during rendering.
When reviewing the history of a document, I want the ability to restore a previous revision, because I've made changes that I don't want to keep.
The simplest would simply be a restore button when reviewing the revision.
As an author, when I'm looking at the starred items folder, when creating a doc or folder there, I expect that those are also starred.
The title search bar is implemented amidst the ContentList component. Factor this out into its own component to make it cleaner.
When writing a documents sometimes I want to see previous content I had written, because I had written content there that I want to reference now or I want to see the change of a doc.
Show a list of revisions on the right-hand side, maybe hidden by a button. Each revision should just be the date and time the revision was saved.
When editing, save a revision every 5 or 10 minutes and when the user navigates away from the doc.
When the window gets narrow enough, the sidebar disappears to make room for the rest of the content, but I still need a way to get to my content and folders without widening the window.
Have a toggle button that enables the content sidebar to reappear.
I need a way to identify the topics that I'm writing about and associate documents with those topics.
#design
I have lots of docs, but when I finish with them and won't be editing them again, I still want a way to store them and refer to them later, but out of the way.
Have an archive tab and an operation, like a simple button, that archives a doc or folder (and its contents).
At times, I want to restore the previous revision of a document as a new document, because I have previous content that I want to keep but without destroying the current doc I have written.
Have another button when reviewing a revision that restores the revision to a new document.
Consider having the user enter a title for the new document at this time, or later, by titling the new doc with the title of the current doc + revision timestamp.
Navigate to the new document.
When editing a doc, I'd like to know what folders the doc appears in and have the ability to move to those folders, since I use folders as an organizing mechanism for complex projects.
Should be a fairly standard breadcrumb in the menu above the document. Organize it from left to right:
Home → Folder → Folder → Doc Title
Consider whether the doc title is needed.
When clicking on a crumb in the breadcrumb, navigate the sidebar to that folder.
As an author self-deploying Doctoral, I want the ability to use the file system, instead of a running database, for storage, because I want to use a syncing service like Dropbox to manage backups, or I don't want the complexity of running such a database alongside the Express backend.
Provide a way to switch to the file system when initializing the server and specify a path, either in a config file or in the command to launch the server.
Store the table of contents in a json file, contents.json, for now. Each document should have its own JSON file.
As a user, given a document with multiple textutal tags, when I save the document, then I see a list of tags in the document view.
As an author, as I star documents and folders, I want to see a list of just them.
Have a toggle in the sidebar to view regular contents or just the filtered starred docs and folders.
An author should still be able to navigate folders by clicking and searcn, and also open documents by clicking.
As an author, I use the sidebar sorting features to help me organize and visually find documents and folders. I expect it to be consistent because it reduces the mental burden of having to reparse the sidebar if the sidebar sorting changes.
As an author, when I'm working with several documents, sometimes I need to search for a doc while I'm writing. It's more convenient to be able to focus the search bar with a keyboard shortcut than using my mouse.
When managing projects with my documents, I want to be able to manage task lists so I can keep track of the progress of those projects.
Enable the CKEditor feature in this doc
While writing blog posts and reports, seeing the word and character counts helps me author for situations in which there are limits to those.
Place the word and character counts in the menu bar on the upper right, or if there's no room, at the bottom of the header outline sidebar.
When writing apps, I need to highlight text and format it as strikethrough, subscripts, superscripts, based on the needs of my document.
Include the native features from the editor as buttons in the bubble toolbar.
Browsing the home page loads the app, which may read from the database needlessly.
The front page should be a static HTML page. The root of the app should redirect to the login screen or the dashboard.
When I have many docs in a folder, I want a way to find the most relevant docs easily by scanning the list visually.
Sometimes, I need to see the docs I edited most recently, because I'm working with a few docs in the same place.
Other times, I have folders with docs that I'm organizing in a particular order, so I want to see them alphabetically by title.
Add a small toolbar that can switch between the following options:
When reviewing the revision history of a document, I want to see the contents of a particular revision, so I can extract previous content, get a sense for the changes that have happened, etc.
Click on a revision and see either read-only overlay of the content, or load the content into the editor in read-only fashion.
Indicate clearly that this is a previous revision with a notification, perhaps a yellow butter bar, similar to the warning bar when looking at a trashed doc.
As a document author, given I've tagged a bunch of documents, when I click on a tag in the tags list, I see a list of tags and a list of text snippets surrounding each instance of a tag in the list of documents.
As an author navigating to a document via title search, when opening the doc, I expect the UI to be in a good editing state to reduce extra interaction.
When the author is searching for a doc by title and clicks on the doc (or presses enter), the following should occur:
For proper data models for the major objects in the app, instead of generic JavaScript objects.
Will require conversion to Firebase objects for the Firebase backend.
As an author, when I'm writing in a narrow window with the headings outline collapsed, I still want to be able to navigate with the headings.
Add another button like the one for the content sidebar. When clicking on a header, hide the outline again.
Given a narrow window with the headings outline hidden,
when I click on a button visible next to the content sidebar button,
then I see the headings outline again.
Given a narrow window with the headings outline exposed, where it would be hidden automatically,
when I click on a heading,
then the editor scrolls to that heading
and the headings outline disappears.
As an author, when I create a folder, I usually intend to name it something, so I would like the UI to enable me to specify a folder name when I create the folder with minimal effort.
I want to write with emoji and other symbols, but I don't have an app to do this for me. I may also have quirks in my typing that are hard for me to correct (e.g. "teh" when meaning to type "the"), and I'd like a way for the app to help correct it while I'm typing.
Config panel somewhere for associating text input with the replacement.
Shortcuts for generated replacement text like dates and time.
As a document author, given a log, when I look at the sidebar, then I see a tag button in the filter bar.
As a document author, given I have added tags to several documents and saved them, when I click on the tag list button in the filter bar at the top of the sidebar, then I see a list of all the tags I've used in all the documents, each listed once.
While writing, sometimes text you're just written will disappear. It seems to occur when a document is saved.
This should never happen.
It's difficult to reproduce and happens nondeterministically. Generally, when you're writing, stopping for a second, then writing again, will eventually reproduce it.
When my computer isn't connected to the Internet, I need a way to edit offline. Or I don't want to use a hosted service like Firebase, so I want to edit all of my docs locally.
Need a way to pick the specify the deployment backend in code.
Or a setting to sync to a local destination while using a remote hosting service.
I have lots of docs, so I need a way to call out specific ones that I'm working on, without having to use folder structure to do so.
I want to ensure that my content is save, so I need ways to back up my docs and restore them if something goes wrong.
As a document author, I'd like to see the number of documents I've tagged with a given tag, so that I can understand the distribution of tags in my content.
Given I've tagged some documents, when I look at the list of tags, then I see the count of the number of docs tagged with each tag.
As a document author, given I've tagged a bunch of documents and have the tag list open in the sidebar, when I click on a tag, then I see a list of documents tagged with that particular tag.
When docs get large, the typing experience degrades with frustrating staccato-like delays.
As per ckeditor/ckeditor5-vue#42.
Smooth typing.
Makes the app undesirable in general to use.
Don't use the Vue component and instead load the editor from a native build?
When headings have the same level (e.g. h2) and text, clicking in the outline on any of those headings will always scroll the editor to the first heading.
When clicking on the nth identical heading, the editor should scroll to the nth respective heading in the content.
This bug makes navigating with the headings outline difficult, as it's not terribly uncommon to have identical headers with the same text.
Ensure that when clicking on each header, we know whether it's the nth header, then reference the nth in the content.
As a user, I want to log into Doctoral using Microsoft authentication, because I prefer it to Google and other auth methods, or that's what my company uses.
As an author, I have learned some standard keyboard shortcuts from other online editors that I would like to continue to use, to reduce the burden of adoption for Doctoral.
Enable the following:
If possible:
As an author, I want the ability to share a document publicly, because I want others to read the content easily and in multiple outlets other than my Doctoral deployment.
Just a button to publish the current document's state will do for now.
Auto-generate a post URL from the document's title, from the same routine that generates the editable URL. e.g. /posts/myusername/document-title.html
The published state of a document will be called a "post."
The content of the post should not change when editing the doc after its publication.
While managing documents, I want to be able to move folders from one containing folder to another, in the process of organizing my content.
Can be done with same tree dropdown as moving documents, with the trigger button placed in the sidebar.
When managing trashed docs and folders, I want the ability to delete them permanently.
In the Trash view, clicking on a button next to the entry will delete it forever.
For folders, show the number of items contained in the folder that will also be deleted.
For all entries, show the folder in which the entry was contained originally.
Since it's a sensitive, no-undo operation, add a level of safety and user-acknowledgement by requiring the user to click the delete-forever button twice.
When writing apps, I need to justify text in particular ways for structural and clarity purposes.
Include the native features from the editor as buttons in the bubble toolbar.
The Sidebar should be a layout-based component that is visible in the Dashboard and Document views and provide mechanisms to search and navigate.
The ContentList should be something more basic that accepts an array of Content objects to display plus flags of how to filter and sort them.
The Backend abstraction should have the semantics of the database, so Content and Document objects.
The Vuex store should carry the semantics of documents and folders. It should translate operations of the app into CRUD operations for the Backend adapters.
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.