Atom: Update to Atom 1.2 file tree api

Created on 15 Nov 2015  Â·  13Comments  Â·  Source: file-icons/atom

The Tree View displays icons next to files. These icons are customizable by installing a package that provides an atom.file-icons service.

The atom.file-icons service must provide the following methods:

iconClassForPath(path) - Returns a CSS class name to add to the file view
onWillDeactivate - An event that lets the tree view return to its default icon strategy

https://github.com/atom/tree-view#api

enhancement

All 13 comments

Any timeline for this?

No timeline atm, I haven't had time to look into this properly.
PRs welcome

I'm currently unemployed and going berserk from code-obsessed restlessness... I'll have a look at it. =)

@DanBrooker We won't be able to work on this until atom/tree-view/issues/732 makes it into a public release. A (recently-fixed) bug is preventing the icons service from running on startup, meaning icons can only be added to newly-created files. It won't apply to files that already exist in the workspace on startup.

Erh, I'll rephrase that: we won't be able to _test_ this feature properly until the aforementioned fix makes it into the public release channel (I was informed that it's scheduled for release in v1.9.*).

I've already begun working on the logic to parse a new configuration structure. Much friendlier, cleaner, and easier to maintain than the existing setup. Should be a lot more performant too.

@Alhadis glad to know you'll be implementing the new atom.file-icons behavior service.
This service is already consumed by tabs and tree-view, with find-and-replace (find in project) and fuzzy-finder coming next :muscle:

@acontreras89 I'm glad for that, I have noticed you've been busy at work with this. ;-) Appreciate your efforts.

I submitted a pull request last night (or rather, at the arse-crack of dawn this morning) to apply a fix for the tree-view package. I haven't checked if this affects the tabs package too, although it probably does.

@DanBrooker This won't be backwards compatible with existing customisations; we'll need to release v2.0.0 due to breaking changes. Since this will require the newest version of Atom, the minimum required Atom version will also need to be lifted. Good a time as any to cut a new major release.

Yes to all of the things. @Alhadis glad you are all over this.

@DanBrooker would you mind giving me your thoughts on this so I know whether to implement it in v2.0.0 or not? =)

It'd be an awesome and useful feature to have, but I feel uncomfortable adding it without your permission.

@Alhadis there's no rush to release 2.0.0, I think it's a good opportunity to include other major/breaking changes also.

@DanBrooker I'm closing this in favour of a dedicated task-list, which will track all features related to v2.

Is this issue related to icons not being displayed (I can only see a rectangle instead of the icon).
I have my atom config folder ~/somepath/.atom fyi

And yes – I restarted my atom :-)

@raphaelokon Please file a separate issue if there's a problem. This doesn't seem related at all.

I'm locking this thread to avoid fragmenting future discussion on v2 or the API upgrade. Any further discussion should be held here so we're not running around checking different threads.

Was this page helpful?
0 / 5 - 0 ratings