atom / settings-view

🔧 Edit Atom settings
MIT License
272 stars 275 forks source link

No settings button for package #710

Closed rootatdarkstar closed 8 years ago

rootatdarkstar commented 8 years ago

I'm trying create a pull-request for the package (https://github.com/rootatdarkstar/atom-sublime-select/tree/feature/configurable-keys), that adds config to the package.

After reloading atom, i don't see settings button: 2015-12-05 18 30 34

And there's no settings available in the package pane: 2015-12-05 18 30 43

This package doesn't have any activation commands (https://github.com/atom/settings-view/issues/573)

Here's some debugging (package was activated):

atom.config.getSchema('Sublime-Style-Column-Selection')
Object {type: "object", properties: Object} // It's OK

atom.packages.isPackageActive('Sublime-Style-Column-Selection')
true

Config:

module.exports =
  config:
    mouseButtonTrigger:
      title: "Mouse Button"
      description: "The mouse button that will trigger column selection.
        If empty, the default for your plattform (#{os.platform()}) will be used (#{defaultCfg.mouseNum})."
      type: 'string'
      enum: ['left', 'middle', 'right']
      default: defaultCfg.mouseName
    selectKeyTrigger:
      ttile: "Select Key"
      description: "The key that will trigger column selection.
        If empty, the default for your plattform (#{os.platform()}) will be used (#{defaultCfg.selectKey})."
      type: 'string'
      enum: ['altKey', 'shiftKey', 'ctrlKey']
      default: defaultCfg.selectKey

  activate: (state) ->
    atom.config.observe "#{packageName}.mouseButtonTrigger", (newValue) =>
      inputCfg.mouseName = newValue
      inputCfg.mouseNum = mouseNumMap[newValue]

    atom.config.observe "#{packageName}.selectKeyTrigger", (newValue) =>
      inputCfg.selectKey = newValue

Package JSON:

{
  "name": "Sublime-Style-Column-Selection",
  "main": "./lib/sublime-select",
  "version": "1.3.0",
  "description": "Enable Sublime style 'Column Selection'. Just hold 'alt' while you select. Also similar to Texmate's 'Multiple Carets', or BBEdit's 'Block Select'",
  "repository": "https://github.com/bigfive/atom-sublime-select",
  "license": "MIT",
  "engines": {
    "atom": ">0.165.0"
  },
  "dependencies": {}
}

I have atom 1.2.4 and linux mint 17.2. Full code available here https://github.com/rootatdarkstar/atom-sublime-select/tree/feature/configurable-keys.

lee-dohm commented 8 years ago

Why is the name of the package in the Settings View "atom-sublime-select" when the name of the package in the package.json is "Sublime-Style-Column-Selection2"? That is what could very well be causing the issue.

rootatdarkstar commented 8 years ago

I'm very sorry, i have attached wrong version of file from another folder (an attempt to understand problem). Now it's correct. Problem still here.

lee-dohm commented 8 years ago

I just tested it and cannot reproduce the behavior you're describing using Atom v1.4.0-dev-0896142 on Mac OS X 10.11.1. Here's what I did:

  1. Clone the repository from https://github.com/rootatdarkstar/atom-sublime-select.git
  2. Changed into the directory atom-sublime-select
  3. Changed the active branch to feature/configurable-keys
  4. Linked the package using apm link --dev
  5. Launched Atom with atom --dev
  6. Opened the Settings View with Cmd+,
  7. Clicked the package tab
  8. Searched for "sublime"

Expected and Actual: Settings button exists

  1. Click Settings button on package

Expected and Actual: Settings show up

screen shot 2015-12-05 at 10 32 46 am screen shot 2015-12-05 at 10 33 06 am
rootatdarkstar commented 8 years ago

I have totally purge my atom from system with this, and tried test some versions of atom:

sudo apt-get remove atom
sudo rm /usr/local/bin/atom
sudo rm /usr/local/bin/apm
rm -rf ~/atom
rm -rf ~/.atom
rm -rf ~/.config/Atom-Shell
sudo rm -rf /usr/local/share/atom/

Tests: mint 17.2 64bit + atom 1.2.4-1~webupd8~0 from https://launchpad.net/~webupd8team/+archive/ubuntu/atom/ - affected mint 17.2 64bit + atom 1.2.4 from .deb from atom.io site - affected mint 17.2 64bit + atom-beta 1.3.0-beta6 from .deb from atom.io site - affected

Afterwards i've boot my windows 10, then install atom stable from offcial site (first time on this system). Win10 - affected. No button and no settings. 2

lee-dohm commented 8 years ago

I also was unable to reproduce this issue on Atom v1.3.0-beta6 on Mac OS X 10.11.1.

Did you follow my repro steps? Including linking the development directory with apm link --dev?

rootatdarkstar commented 8 years ago

Yes, i've followed all your steps except apm link --dev. Yes, apm link --dev solve this issue. I created symlink (withh ln -s) before, and it's have caused this problem. Thank you and sorry for having wasted your time.

lee-dohm commented 8 years ago

It's quite alright. I'm glad we were able to get it fixed :grinning: