Repository navigation
Conversation
|
I'll try to list all that I can think of :). As for the CC, I guess that @joefitzgerald or @thomasjo may be interested as well |
|
Thanks! |
|
I think a lot of people still struggle with the notion that things can (and often should) be asynchronous. Events / commands confusion is one example of that. Another concrete example is that the autocomplete-plus Provider / Suggestion API is synchronous (I am working on fixing this). I would put some serious thought into educating people how to write packages in such a way that they do not degrade the performance of Atom. This may seem redundant ("why should we teach people how to code properly in node... everyone knows you should use callbacks and promises?!"), and yet it's still a pervasive problem. I would start with:
I'm sure there's much more to add there. |
|
Here's a first batch based on what came up regularly on the forum or that I experienced myself. Most of the time it is related to a lack of documentation, and where I'm confident I can dig in the code by myself there's probably a lot of people that either doesn't have the time/interest to do so or may be are a bit at loss because they are new to JavaScript/CoffeeScript or does not use it on a daily basis.
Hope it helps. |
|
Thank you guys. These are a huge help.
YES. Man, it's easy to shoot yourself in the foot with performance. Ideally, we'd have the easy way be the fast way in common cases (see decorations api). |
|
+1 on reporting errors, warnings, and informational messages. I think this is a great example of where this could be added as a core package, with a half-way point of establishing an API for reporting them and then modifying As it stands today, On the other hand, I'd still need something like |
|
@benogle The decorations API was huge. Allowed me to remove multiple views from my package and generally reduce complexity while enhancing speed. |
|
Yeah, big 👍 on reporting messages to the user. This is something I need to tackle in my LaTeX package very soon, and while I'll most likely end up using I've had some pain points around various functions (and instance variables/properties) not being documented; while they are easy to find, it has left me unsure whether they are public or private. This means I'm not sure if they are "safe" to use or not. I don't relying on private stuff, since they can be changed or removed at anytime since they are not part of the public API. |
|
Noted on the messaging stuff. I didnt know it was a problem at all!
That is exactly what we are doing right now. Making a conscious decision about which parts are public / private. Then we can base the docs off those. Can you elaborate on things you are using you were unsure about? Specific APIs would be helpful. |
|
Sure thing. These are the ones I remember off the top of my head
Now that I've written that list, I realize that I'm basically unsure whether any property use is considered safe. Basically I think properties that are considered part of the public API (e.g. I'll try to think of more examples. |
|
Thanks for kicking this off @benogle! Let's see ... where to begin. I think the things that will provide the most bang-for-the-buck are:
These are mostly selfish things that I've run into in writing my own packages. I'll see if I can cull some things from the board and add them to the list. |
|
Another thing I thought of: there is general confusion about how to log information that might be useful in debugging a package.
|
|
Perhaps instead of 'Debug Mode' there would be a way to set |
|
@joefitzgerald I wrote a small module when working on the minimap to have logs in debug mode but mute them otherwise. |
|
💭 It looks like everyone's done a pretty thorough job so far. Let's see what I can reinforce and if I can come up with anything else.
|
|
Read-only For those times when you want to display code in some part of the UI, but don't want the user to be able to edit it. |
|
Resizeable elements: I think this could be a huge win, to provide a generic resizable view that any view could be placed within. |
|
Case-in-point regarding events. I feel like I use them heavily, and even now I was making some rather large mistakes, leaking event subscriptions, not cleaning up after myself, and generally being a bad package on activate / deactivate / activate cycles (e.g. package update). Attempt 1 (failed): joefitzgerald/go-plus@9cac33b Brutal critiques of what I have done are much appreciated. |
|
Interestingly, if you An aside: Why doesn't |
This is due to the fact that |
|
Thanks for the info, guise. Closing in favor of atom/atom#3399 |
I want to create a document that outlines all the difficulties people have had using the API. I feel like we have a lot of really good data in the forum, in @probablycorey's analysis of the packages, etc. It would be nice to get it all in one place to help us make some informed decisions.
Feel free to suggest changes on this PR or add them directly to the md doc.