Comments (14)
Thanks!
So would it be a shortcut that you could hit on a line that would fold all nested (via indentation) lines below until one that is at the same level? Or are you thinking more globally?
from atom-tasks.
I was thinking more globally. Regardless of cursor position, you hit this shortcut and all completed tasks in the current file become folded.
from atom-tasks.
Only if they have child tasks? Just want to make sure I fully understand your goals!
from atom-tasks.
So here's the start of what I had in mind: mlms13@4f20cbe
The goal is just to find any (non-archived?) completed or cancelled task, and if it has sub-tasks (ie if it can be folded), fold it. Currently my code isn't particularly good because:
editor.foldBufferRow(lineNumber)
will work its way to the top of the document until it finds something to fold, so my command ends up folding the entire document. 😞 Really, I need something likeeditor.foldBufferRowIfFoldable(lineNumber)
. As far as I can tell, Atom doesn't provide something like this (or even an easy way to check if a row is foldable), but I could probably make my own.- All of the logic for getting completed tasks is duplicated from
taskArchive
, so I'll turn that into a utility function that they can both use. - The keybinding is Mac-only and completely arbitrary at this point.
I'll probably keep poking around this evening. This is the first I've looked at the Atom API (or really coffeescript, for that matter), so feel free to give me pointers if you have them.
from atom-tasks.
That sounds like a good direction! I haven't had a chance to work through it myself, but you might check out the task completion part that reads up looking for all projects that the task is a part of. Reversing the logic slightly by seeking through from the top and finding all tasks with children. If all the children are complete you could select up to the bottom most child and fold that selection. Hopefully that helps a little!
from atom-tasks.
How's this going? I may take a crack at solving it as well!
from atom-tasks.
Don't let me hold you back if you're interested. :) I haven't looked at it much since Friday.
from atom-tasks.
Ok, no worries! I want to do some thinking/planning on it to make sure it makes sense, so I'll do that when I get a chance and keep you posted.
from atom-tasks.
FYI on "Folding Text", which includes both folding and filtering. Code is there but it is not open source as he intends to charge for product in the future. It requires the HTML-based FTML format and not simply text files, so I suspect it has limited utility for a text based list, but I thought I'd pass it along in case it was useful.
http://www.foldingtext.com/foldingtext-for-atom/
http://jessegrosjean.gitbooks.io/foldingtext-for-atom-user-s-guide/content/appendix_b_file_format.html
from atom-tasks.
That looks pretty fancy! Seems that he would have had to build an entirely custom view (not using the normal text editor view). Not sure we'd need to do anything that drastic, my hopes are to hook into native atom code folding! But thanks for passing that along, very cool :)
from atom-tasks.
I agree that it's overkill. For ideas only...
from atom-tasks.
So I just looked back into this and I found that atom has built in commands for collapse and expand parent. It seems to work in my task files, so does this do what you need? Try going to a task in a project and using the hotkeys alt-cmd-[
and alt-cmd-]
.
If, however, you mean to only fold up the completed/cancelled tasks under a given project, that's a different story and wouldn't be doable in this current structure. I'd have to build my own editor renderer on top of atoms (which relates to a couple of the other issues currently being discussed). For now, you'll just have to take advantage of the task-archiver!
from atom-tasks.
Yeah my goal was to collapse only the completed/cancelled tasks. I looked into this as well a few months ago, and I wasn't able to find a good way to tell Atom to collapse arbitrary rows. I'm happy to close this and live with archiving, since it's probably not worth the effort with Atom's current folding API.
from atom-tasks.
Thanks! I'm slowly exploring a re-write that replaces the text editor with a custom version that would allow us to do all sorts of fancy things, but is going to take a lot of work. We'll see how it goes!
from atom-tasks.
Related Issues (20)
- Settings "filename pattern"
- Fix where checkbox is placed
- Add option to archive project itself
- Bullet-style Line Wrapping/Indenting
- Is this package still in development? ES6? Custom Text Editor view? HOT 1
- HTMLDocument.registerElement is deprecated.
- Toggle Timestamp Feature HOT 4
- Multiple prefixes for different tag types HOT 1
- Status bar showing all tasks as incomplete
- Update: Tasks package not activating on Atom 1.24.x and later HOT 18
- Please make cmd+enter convert current line to task
- Add syntax highlighting for basic tags HOT 1
- Tasks 2.9.1 HOT 1
- "Cannot find module" error on Atom 1.25.0-beta.0. HOT 3
- Failed to activate the tasks package HOT 15
- Cannot find module 'underscore' HOT 3
- Uncaught TypeError: ref3.tokenizedBuffer.onDidTokenize is not a function HOT 1
- I can't open the tasks on my atom HOT 1
- "About:" keyword "does something" HOT 6
- property 'TouchBarButton' of undefined
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 atom-tasks.