atom / tabs

Tabs in Atom
MIT License
111 stars 115 forks source link

Provide service API #512

Closed UziTech closed 4 years ago

UziTech commented 6 years ago

Description of the Change

Provided a service that lets other packages get the path of a context target in a standard way.

At the moment any package that interacts with the tabs package to get files or other information are doing so by getting the active package's mainModule or checking classes and data attributes on elements.

There is a standard way to get this information through the Services API

Alternate Designs

We may want to change what actually gets provided.

Benefits

Other packages can interact with this package in a standard way.

Possible Drawbacks

none

Applicable Issues

UziTech commented 6 years ago

The only thing I can think of using this service for is getting the path of a tab that was right clicked on.

A package like context-git just uses the data-path attribute from the .title element. It seems like there should be a standard way to get the path given a target.