Comments (14)
First suggestion implemented in 76d77f0. Tell me if it doesn't work.
from mycorrhiza.
saving it in the middle and jumping back and forth between the editon and the hypha is tedious sometimes.
@chekoopa Why would you need that jumping? if you want to check how hypha will be rendered, you can use Preview button
@DanInSpace104 One may want to see how the hypha used to look like.
I think you all missed the point, the idea is to save periodically to prevent losing changes. You would need to click Save, then click Edit... then click Save, Edit... and so on.
from mycorrhiza.
Seems pretty easy, I'll tackle that. Thanks for the suggestions!
from mycorrhiza.
saving it in the middle and jumping back and forth between the editon and the hypha is tedious sometimes.
@chekoopa Why would you need that jumping? if you want to check how hypha will be rendered, you can use Preview button
from mycorrhiza.
@DanInSpace104 One may want to see how the hypha used to look like.
from mycorrhiza.
First suggestion implemented in [76d77f0]
I'm trying to build it on Nix, but have little problems with embed
and io/fs
libs. Seems that I need to upgrade my Go compiler. brb
from mycorrhiza.
First suggestion implemented in [76d77f0]
I'm trying to build it on Nix, but have little problems with
embed
andio/fs
libs. Seems that I need to upgrade my Go compiler. brb
Yep, they require Go 1.16 IIRC.
from mycorrhiza.
Add 'unsaved changes' warning (purely frontend, first priority)
Yeah, we need that. Thanks @handlerug for implementing.
Add draft feature for the editor
@chekoopa's git-branch-driven way is not how it should be done, let's not abuse Git, it is already used much more than it should be. We can store drafts in cache/drafts/
directory or something like that instead. It will be easier to do and more reliable.
As of the front-end way, it seems ok. Sure, it is limited to just one device, but who cares[?] But wait, this behaviour is built in browsers already, right?
Allow saving without jumping back on the hypha page (unnecessary, but adds comfort), which unlocks...
Why? What comfort will it bring?
Add toggleable autosave
Why? It makes sense to auto-save drafts, but why auto-save edits?
from mycorrhiza.
#25 also seems quite close to the issue
from mycorrhiza.
#25 is merely a blocker here for the actual drafts feature, not a duplicate issue or something.
from mycorrhiza.
UPD: already done in 9ad9db9, I've missed that commit
First suggestion implemented in [76d77f0]
Looks neat, but it also pops up when you press 'Save'. The fix is simple:
let saveButton = document.querySelector('.edit-form__save');
saveButton.addEventListener('click', function () {
changed = false;
});
let warnBeforeClosing = function (ev) {
if (changed) {
ev.preventDefault();
return ev.returnValue = 'Are you sure you want to exit? You have unsaved changes.';
}
};
from mycorrhiza.
@chekoopa's git-branch-driven way is not how it should be done, let's not abuse Git, it is already used much more than it should be. We can store drafts in
cache/drafts/
directory or something like that instead. It will be easier to do and more reliable.
Tee-hee. Yes, that's actually better, that was just the first idea came into my mind.
As of the front-end way, it seems ok. Sure, it is limited to just one device, but who cares[?] But wait, this behaviour is built in browsers already, right?
Checked that, really it is, but it's very implicit IMO. It also ignores external text changes (as you get your 'draft' based on the older version), and also bypasses the new unsaved changes
check (but who cares[?]).
Allow saving without jumping back on the hypha page (unnecessary, but adds comfort), which unlocks...
Why? What comfort will it bring?
Comfort of staying on a single page, keeping pace and flow.
It seems to go against minimalistic form-based organization and add a dependency to perform AJAX requests. However, it can be kept as a script-supported feature by adding the button only in scripted browsers.
Add toggleable autosave
Why? It makes sense to auto-save drafts, but why auto-save edits?
My task list was a first-approach, so your point is fair. I've mentioned this feature to make Myco as comfortable for note-taking as Notion, for example. It would add dynamics and make the editing easier. But with server-based drafts it's better to autosave them, for sure.
from mycorrhiza.
I personally don't trust browsers to retain my edits when I navigate away. Browsers also have full control over local storage of the website, and they're free to clear it whenever they feel like so. A server-side auto-saving of drafts would be much more reliable.
As for the two last suggestions, feel free to discuss them. We have a lot to do before we catch up to Notion, though, so it's not like it's going to help us. (also, you could auto-save edits (not drafts) using custom javascripts...)
from mycorrhiza.
Half a year after, this modal window warning about unsaved changes has been causing nothing but irritation. I wonder how is for others
from mycorrhiza.
Related Issues (20)
- `silentGitsh` ignores environment variables HOT 1
- Changing passwords HOT 10
- Make a new category auto-complete based on JavaScript
- Category descriptions
- Mycorrhiza 1.15 HOT 2
- Categories is not available HOT 8
- Make -create-admin more known HOT 1
- Rename hypha renames git repo instead HOT 5
- custom.css file HOT 6
- Caching static resources HOT 2
- Replace default static files HOT 5
- naming hypha 'wiki' results in unexpected behavior HOT 1
- A proper admin creation
- Language should be picked in settings by admins, not on client
- External links with a globe icon should always be on the same line HOT 7
- Add local time buttons in the editor
- Interwiki transclusion
- Can't remove media file from hypha HOT 4
- Math/LaTeX support in markup HOT 2
- Decrease tab-size HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mycorrhiza.