Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing settings #227

Closed
filipesilva opened this issue Mar 7, 2015 · 17 comments
Closed

Missing settings #227

filipesilva opened this issue Mar 7, 2015 · 17 comments

Comments

@filipesilva
Copy link
Contributor

Hey, is it just me or have pretty much all settings disappeared? I remember there being loads of settings in the GUI but now I can only find two. (windows 8.1, atom 0.186.0)

image

@Glavin001
Copy link
Owner

Sounds like the Atom API has changed and broke this package, once again. Thank you for letting me know.

@filipesilva
Copy link
Contributor Author

Anything I can do to help?
I was looking at how to do a PR to allow for a new option in jsbeautify (attribute wrapping for html) when I noticed this.

@Glavin001
Copy link
Owner

Pull requests are very welcome! Thanks!


Sent from Mailbox

On Sat, Mar 7, 2015 at 11:21 AM, Filipe Silva notifications@github.com
wrote:

Anything I can do to help?

I was looking at how to do a PR to allow for a new option in jsbeautify (attribute wrapping for html) when I noticed this.

Reply to this email directly or view it on GitHub:
#227 (comment)

@filipesilva
Copy link
Contributor Author

I've verified the new options work out of the box on a .jsbeautifyrc file, and after the problem with Atom's API is sorted I'll add the new options to the settings by following the example of other options.

I don't think I can help much with this specific bug though, I'm not really familiar with the Atom API. If you think it's something easy and can point me in the right direction, I'm happy to have a stab at it.

@Glavin001
Copy link
Owner

I'm not quite sure what could have changed however here are the appropriate docs: https://atom.io/docs/api/v0.186.0/Config#defining-settings-for-your-package
and here are the two places with configs: https://github.com/Glavin001/atom-beautify/blob/master/lib/beautify.coffee#L225-L256 and https://github.com/Glavin001/atom-beautify/blob/master/lib/language-options.coffee#L68-L384
I may be able to help out tomorrow. However it'd be awesome if you've solved it by then. Good luck and thanks for contributing! 😃

@filipesilva
Copy link
Contributor Author

Haven't managed to fix it, but here's what I have so far:
-added my fork as dev package, loaded atom in dev mode
-changed the config object, no change in the settings window
-checked the console, config object show that the options are there

image

@filipesilva
Copy link
Contributor Author

It seems like the a different config is being loaded, because there are configuration options (js break chained and js wrap line length). I can't find those options anywhere though, which is weird.

@filipesilva
Copy link
Contributor Author

Calling atom.config.get('atom-beautify') shows the settings in the first screenshot, plus the rest of them.

image

@filipesilva
Copy link
Contributor Author

An odd behaviour that I noticed: when atom starts, the plugin configuration is not all there. After the plugin is activated, the rest appears.

image

By the way, I'm sorry If I'm being spammy. I don't really know much about atom package development and just want to put here all the details.

@Glavin001
Copy link
Owner

I don't mind this spamminess, at all. This is great. Keep it coming. If anyone does not want to receive these messages they can simply unsubscribe to this thread. Thanks for the research!

That's interesting that it does not fully populate when atom loads. Maybe it's because atom beautify uses two separate config files? strange. 


Sent from Mailbox

On Sat, Mar 7, 2015 at 4:18 PM, Filipe Silva notifications@github.com
wrote:

An odd behaviour that I noticed: when atom starts, the plugin configuration is not all there. After the plugin is activated, the rest appears.
image

By the way, I'm sorry If I'm being spammy. I don't really know much about atom package development and just want to put here all the details.

Reply to this email directly or view it on GitHub:
#227 (comment)

@filipesilva
Copy link
Contributor Author

Apparently, if I remove the activationCommands from package.json the configuration loads correctly.

One of the changes in 0.184.0 had to do with activation function export being optional. Maybe it's related?

@Glavin001
Copy link
Owner

Sounds like you're on the right track. Potentially none of the options are being loaded and those that you do see you had manually set and so Atom knows of it from your person settings but not from the package itself. 


Sent from Mailbox

On Sat, Mar 7, 2015 at 4:32 PM, Filipe Silva notifications@github.com
wrote:

Apparently, if I remove the activationCommands from package.json the configuration loads correctly.

One of the changes in 0.184.0 had to do with activation function export being optional. Maybe it's related?

Reply to this email directly or view it on GitHub:
#227 (comment)

@filipesilva
Copy link
Contributor Author

Ah and here it is. That's the problem alright!
atom/settings-view#356

@filipesilva
Copy link
Contributor Author

So if I do something that activates the package, I can see the settings. I'll leave this as is for now and try to add in the new options for jsbeautify.

@Glavin001
Copy link
Owner

Yup looks like an Atom issue. Good work diagnosing. Move onto new options support. Thanks!


Sent from Mailbox

On Sat, Mar 7, 2015 at 4:48 PM, Filipe Silva notifications@github.com
wrote:

So if I do something that activates the package, I can see the settings. I'll leave this as is for now and try to add in the new options for jsbeautify.

Reply to this email directly or view it on GitHub:
#227 (comment)

@filipesilva
Copy link
Contributor Author

And done. #228

@Glavin001
Copy link
Owner

Closing this as it is an issue with Atom's Settings View and not Atom Beautify package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants