-
Notifications
You must be signed in to change notification settings - Fork 275
Viewing a package's settings should activate it #356
Comments
👍, ran into this when trying to create my own package. Was really confused as to why I couldn't get settings to show up inside the Settings View. |
Possibly related to #347? |
Given that packages can and do change the editor state significantly on activation, we probably can't just activate them when their settings are viewed. |
I don't see why atom couldn't just |
@dschwen: I agree that it seems odd that the |
Sure, a separate cson file would be great. I was just hoping some less invasive change could be made, that didn't require updating all packages. What about caching the config defaults? And lazily check if the cache needs to be updated using a web worker after startup? |
@thedaniel My pull request uses |
When will this issue be solved ? should we wait until atom 0.180.0 ? |
@Code-Vortex There isn't a target version or release date for closing this issue. |
is there any work around that we can use until it got fixed ? |
Activate the package then open settings. So just run anything in the
|
@Arcath well , this will makes you able to use commands which already provided by some package, but you wont be able to select anything from a drop down list or check on something. |
This is an important bug, and it is very shocking to users (see above for links to here from other projects) when they open up their package's settings and see next to nothing. Since discussions are still ongoing for over a month, might I recommend that you (maintainers of Atom) accept the loading time presented by the temporary workaround of loading the package when the Settings view shows the package. For now, it will have a slow-ish loading time -- 250ms is not great when you're loading 10+ packages, but when viewing a single one, does it really bother anyone that much? -- however then we at least be able to actually see the Package's settings. Then once you can agree on a proper solution, change over to that and upgrade the User's experience. Right now the experience is discomforting: no settings, slow or not, at all. I think actually being able to see the Package's settings is more valuable and important to me than waiting even a few seconds, don't you? |
@Glavin001 Thank you for highlighting the importance of this bug. I agree 100%. @lee-dohm: perhaps we can retitle this bug to reflect the problem only (not the potential solution), to make the severity more apparent. Including a solution in a bug report can have a negative impact on the efficiency of resolving the bug. A potential title would be "Unable to see or modify package settings". |
I simply worked around this by not relying on I'd of course prefer to see this issue resolved, but let's not blow this out of proportion since it's relatively straightforward to work around the problem. I'd be happy to piece together an example package that handles it's own delayed activation. Just let me know. |
Removed activation events so settings will populate properly. See this issue: atom/settings-view#356
Just wanted to weigh in. I love atom and all of the hard work going into it. But I do find this to be a very important / frustrating bug. Not just for users, but as a package developer. I spent some time reading and re reading activation documentation thinking I was doing this wrong. "It can't be that bad of a bug", I kept thinking. I finally found the post in discuss pointing to this. I think with current load issues we probably really do need to be using activation events (for the most part). I like the fact the config values are in coffee and therefore could be created dynamically (I've never done that but interesting). This can still be achieved by pulling this out into it's own coffee file for clarity and this would make it pretty easy to wire up that into atom start up and not be tied into the rest of the package activation. It would also probably be easier conceptually. So in conclusion, I just wanted to weigh in that I find it as surprising to the package developer as it is for the regular user. Less work / barriers for package developers makes for a better Atom community. Edit: To add, I forgot to mention. For some reason when I opened the settings I saw 2/4 settings and they did not have their descriptions set. Upon activation I see all 4 with descriptions. Very, surprising behavior. |
I don't understand why the config isn't just moved to package.json It should be able to portray all the relevant values via the JSON schema. I've had difficulty getting it to do that, but that's a separate issue. While that makes the most sense to my brain, it's possible that the issue deals with customized default values that can't be known without running code. If this is the case, then a post-install callback might be in order. It coudl be used to set the initial values into the settings. Or, maybe require the main file when the user accesses the settings page, but don't activate it. Then the cost of requiring the file is deferred until it is known to be necessary, but the package is not activated and so does not go meddling with the environment. As of right now, my users are still editing confg.cson by hand. |
Because it's possible to create config dynamically in the public 1.0 API so we can't break it. I agree it's better to do it statically and this is likely to be the requirement in Atom 2.0. I think we'll probably add something for static config and strongly encourage it before then, even if we can't strictly enforce it. |
Reported again over at: atom/toggle-quotes#19 |
I struck this developing a package and want to weigh in. I need to have a setting that the user need to set before activating the package. To be concrete, the package needs to run a command "sbt" that the users need to point out. I've defaulted it to '/usr/local/bin/sbt' but that's just my system. That's for bootstrapping the package so it's kind of catch 22 not to be able to set it before using it. |
by updating the package manually using |
See this post on Discuss for full details.
Repro Steps
activationCommands
setExpected: To see the configured default settings
Actual: The package's settings are blank
The text was updated successfully, but these errors were encountered: