Closed Steelsouls closed 11 years ago
Just because of one person that uses file names to organize his/her gists, you should not change one of the basic and familiar functionalities of the plugin. Some of us did not assign any file names to all of our gists and instead used 'Description' to categorize them. And after this update when trying to look for a gist, we were presented with a massive list of gists that were all called 'gistfile1' !!! I think this should be either an option in settings or the plugin should resort back to descriptions as title if the file name is missing.
I can understand wanting something to work how you're used to, but the previous functionality was broken. I'm not sure why you assume that "one person" wanted this change. I wrote this code in response to a ticket that multiple other people wanted changed as well. Sometimes things need to be fixed even when people get used to using them as broken.
Also, that code you show defaults to description. The author of this plugin wouldn't have accepted the pull request if that wasn't the intended behavior. The last line should be "title = file_name[0] or description or gist.get('id')".
I guess I was just frustrated to see a big list of 'gistfile1' instead of my beloved gists. (assuming that only one person wanted the change was as flawed as assuming very limited # of people used description for organizing the gists) I still believe such a change in plugin behaviour warrants some sort of announcement or popup in ST.
What do you think about adding a new entry in the plugin settings?
I would also be very frustrated by that! I'm not sure about implementing a plugin setting; I'd leave that to @condemil. However, my adjustment to the fix you suggested should be perfect. It will default to file names, but accommodate any users who don't use them. I'll submit a pull request to fix this later today. Including both possibilities makes for stronger software.
I carefully craft my gist titles, so it was counterproductive for the 'open gist' menu to only show descriptions.
The Gist API returns the file name inside a dictionary, so first .get('files'. Then list() the files dict, which returns an array with 1 entry. Finally, replaced 'description' with file_name[0]
I am submitting this as a pull for the main repo because I assume this is the intended behavior. If not maybe this functionality could be included as a config option?