-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect changes to markdown syntax and open in code editing mode #3477
Comments
Before deciding anything, please read something about "undo" and UX. E.g. https://en.wikipedia.org/wiki/Mode_(user_interface) , https://www.uxmatters.com/mt/archives/2020/03/are-you-sure-versus-undo-design-and-technology.php etc. |
Thank you @max-nextcloud ❤️ Just a few additional notes:
|
There should be no saving without altering. But the problem I see here is: I do not think this is easily implemented for cooperative editing. |
If @PhrozenByte by "undo" I meant anything which does not ask any additional dialogues and allows only safe operations by default. The above "switch to collaborative markdown" approach would satisfy this. |
Additionally: Maybe it would be at least a good first step to provide a warning on first opening a MD file. So users are informed and may choose another app for editing markdown or as soon as we have implemented per-file source editing of markdown files choose that option |
This seems like an interesting question for a design review call! We can discuss this in the upcoming call on our Design team public talk channel on Tuesday 29 Nov at 14:00 CET. Cc @max-nextcloud @jancborchardt who will be there and anyone else who is interested :) |
If TipTap as the Markdown processing foundation of >Text< provides the information that it detects markdown or other stuff it cannot handle, a very user-friendly path would open up. With "cannot handle" I mean: convert the original data into TipTaps internal format and save it back into its original format (here: markdown) later will result in data-loss at save (=conversion from internal format to markdown). If TipTap doesn't provide such compatibility info, maybe this is a valuable and easy to implement extension/new feature for it? With this compatibility info from the TipTap importer available I would suggest the following options in the error message for fast risk-free usage when trying to open a not fully-compatible mark-down file as the offered choices:
When the user chooses to open the file readonly a button could be available in the editor to switch to editing (which would convert into ">Text< markdown" and save with data-loss). This switch from readonly to editing should only be done after confirmation of a message box (default: cancel) explaining the consequences of potential data-loss that might be suffered (incl. any available details provided by TipTap). I think, this way could avoid all the problems of the other approaches (file extension #3660, or metadata #3636). Also no performance issues with huge files due to potential additional file reading for comparisions would occur (achieving the same result by using the reading of the file that is done anyhow by >Text</TipTap). Or do I miss something? |
Splitting out an idea laid out in #593 (comment) as suggested by @PhrozenByte in #593 (comment)
Background
We want to enable the best possible editing experience to users while making sure that markdown syntax is preserved for those who care about it by default. There's a long discussion about this in #593.
A lot of work is going into preserving the markdown syntax already but the architecture of texts wysiwyg editing and limitations of the underlying libraries make it close to impossible to preserve all syntax out there.
Proposal
(updated to match the current state of discussion)
Possible Additions
Alternatives
Previous proposal
So for those documents that would be altered when saved by text I propose the following default behavior:
The desired behavior could be customized by the user ("Do not ask me again") or per instance to avoid asking the user all together.
The text was updated successfully, but these errors were encountered: