Closed thombruce closed 1 year ago
Ultimately the interface that supports this rich text/markdown editor as well as the intervals input and tallies should look like a seamless unit.
That is to say... it should basically always look like you're adding a comment (you should be able to attach a comment with a Tally input or an Interval input) that you can also add a date and time to, or a count to or a duration to.
And the comment part of this integrated form will be optional. All parts will be, but the user must be adding at least one of:
...otherwise it's just a date and time referencing nothing. 🤷♂️
We might want to rejuggle where validations happen. Might be good to look into the idea of introducing a set of classes that represent our object types and which interface with the store and/or LokiJS. I have been thinking about introducing a /models
folder for this for a while. /models/comment.ts
having a text attribute defined, plus validations for it, and some custom save and update functions that are maybe callable from the store. We'd propagate errors from its validation handling back up to the component.
I'll create a separate issue.
Redundant after the removal of comments.
See comment: https://github.com/thombruce/toodles/issues/38#issuecomment-1556719671
Mavon Editor is a fantastic piece of kit with just a handful of issues that make it less than ideal.
I also want to do this part myself anyway. My plan is to use ProseMirror as a basis, so Rich Text by default, and work Markdown in on top. ProseMirror is beautifully customisable, and the results achieved by Mavon are all possible using ProseMirror too.
We want more freedom to customise this in the future, and we want a more accessible utility. The tab ordering issue on Mavon is a real problem.