-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
file settings & sync #565
file settings & sync #565
Conversation
css copied from capture templates and not yet cleaned up
The dropdown used is a simple html-select. If we have recommended styling for selects or a special dropdown-component, I will use that instead. |
I'm sorry, I continued on this branch, so the sync-functionality doesn't have its own pr. I figure we have three sync types:
isLoading is now a Set of paths. I have not done anything with Capture yet. |
I built this so that a file path in the redux store not matching the url triggers a redirect. This way I can switch between files by dispatching an action and the url stays in sync. |
This looks like great progress!
Makes sense, good work!
If it is not too much work, it would be best, because that's how Emacs handles it. Personally, I have never seen a use-case to have one set of agenda files and another for refile targets, so I just use the same: https://github.com/munen/emacs.d/#refile-targets If adding refile is too much work, mixing agenda/refile might be a good workaround.
We have no components for dropdowns, yet. Also, from personal experience, I'd say that even popular styled dropdown components can feel quite clunky and lack functionality of native html-select. I'd say, it's a good decision to go with the native html-select here(; |
No worries, I'm stoked you're working on sync!
Yes, that's true. Tbh, sync is terribly complicated, already, and has grown organically when new bugs were found. At this point, we support the following use-cases:
That's a lot of cases. And adding multiple files will likely not decrease the nested complexity. If it makes things easier for you, I'd be fine if we ditched 1 and 2. Here's some thoughts around those for context: I've added those, because for me, they are completely necessary to:
I've added the latter two with switches to cater for those with less bandwidth. However, I'm not convinced this is the right approach. Less synching tends to yield more problems. If we wanted to cater to lower bandwidth users, then having stronger offline capabilities would be better than fewer syncs, imo. If that helps reduce complexity for you, I'm happy. If you're happy to use the status-quote to build on top, that works for me, too.
I agree that that's a valid pragmatic decision. From the top of my head, I can't think of another action that would change the contents of a different file than the currently open one. The only exception would be 'archiving', but we're not supporting this at all at this moment, so it's not really a concern. And adding two explicit actions - knowing well that these form a final set of potential actions - is still totally fine(;
Sounds like reasonably the easiest approach to build. The alternative would be to watch the other files for changes. But, then:
So, overall, the alternative sounds quite a bit more complicated than 'manual sync forces syncing all loaded files'.
Tbh, I don't know. They might be pushed on top of each other and the user might just see each of them at a time. But that's also a bit of wishful thinking(; A different approach might be to collect errors on synchronisation and only when the whole set of files has 'finished' in some way, display the modal. Just thinking out loud here. It's also ok if that edge case is not handled at the moment, and we add an issue for it. The call on how to proceed is yours, of course. |
Merging to |
Most of this is copied and adopted from capture templates.
Options with current defaults:
Loaded files without a setting entry would be handled according to these defaults. the currently viewed file will always be included in search, agenda & tasklist.
There is also refile. Should all files always be refile targets or should it be configurable?
The 'Load on startup'-option does not do anything yet.