Settings-view: Color picker value resets everytime

Created on 23 Aug 2016  ยท  5Comments  ยท  Source: atom/settings-view

I've been having a problem with the color picker in Atom built from source. Last time I built it was today, August 22, 2016.

I really can't reproduce it in safe mode because no third-party packages are loaded in safe mode. I mean, I don't have access to a color picker to try in safe mode.

I created a new entry in my theme's config schema:

"test": {
    "title": "Test color",
    "description": "This color picker does nothing. Has no code bound to its events.",
    "type": "color",
    "default": "#000000"
},

This new color picker has no JavaScript code bound to its changes. If you'd like, install atom-material-ui and try changing the theme's base or accent colors. I know it's not an isolated issue because it's been reported at atom-material/atom-material-ui#318 using a different OS.

System Info

Atom version: 1.11.0-dev-89c638a (built on August 22, 2016)
OS: Mac OS X El Capitan 10.11.6

Installed Packages

$apm list --installed
Community Packages (3) /Users/silvestre/.atom/packages
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

Reproduction steps

  1. Open a package's settings which includes a color picker.
  2. Change its value.

Expected behavior: The color picker retains the new value.
Observed behavior: The color picker gets reset to its default value.

GIF Showing the issue

colorpicker

Extra information

  • Problem can be reproduced in safe mode: _Can't test for the reason stated above_
  • Problem started happening recently, didn't happen in an older version of Atom: _Yes_
  • Problem can be reliably reproduced, doesn't happen randomly: _Yes_
  • Problem happens with all files and projects, not only some files or projects: _Yes_

Most helpful comment

Also able to repro this.

On Mon, Aug 22, 2016, 8:06 PM Silvestre Herrera [email protected]
wrote:

I've been having a problem with the color picker in Atom built from
source. Last time I built it was today, August 22, 2016.

I really can't reproduce it in safe mode because no third-party packages
are loaded in safe mode. I mean, I don't have access to a color picker to
try in safe mode.

I created a new entry in my theme's config schema:

"test": {
"title": "Test color",
"description": "This color picker does nothing. Has no code bound to its events.",
"type": "color",
"default": "#000000"
},

This new color picker has no JavaScript code bound to its changes. If
you'd like, install atom-material-ui
https://atom.io/packages/atom-material-ui and try changing the theme's
base or accent colors. I know it's not an isolated issue because it's been
reported at atom-material/atom-material-ui#318
https://github.com/atom-material/atom-material-ui/issues/318 using a
different OS.
System Info

_Atom version_: 1.11.0-dev-89c638a (built on August 22, 2016)
_OS_: Mac OS X El Capitan 10.11.6
Installed Packages

$apm list --installed
Community Packages (3) /Users/silvestre/.atom/packages
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

Reproduction steps

  1. Open a package's settings which includes a color picker.
  2. Change its value.

_Expected behavior_: The color picker retains the new value.
_Observed behavior_: The color picker gets reset to its default value.
GIF Showing the issue

[image: colorpicker]
https://cloud.githubusercontent.com/assets/1133339/17878818/0a032450-68c4-11e6-8ef5-4355e52588d5.gif
Extra information

  • Problem can be reproduced in safe mode: _Can't test for the reason
    stated above_
  • Problem started happening recently, didn't happen in an older
    version of Atom: _Yes_
  • Problem can be reliably reproduced, doesn't happen randomly: _Yes_
  • Problem happens with all files and projects, not only some files or
    projects: _Yes_

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/atom/settings-view/issues/832, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHQp87EgEuI18YmAmPS9GehquhJfpe1ks5qimOfgaJpZM4Jqgmk
.

All 5 comments

Also able to repro this.

On Mon, Aug 22, 2016, 8:06 PM Silvestre Herrera [email protected]
wrote:

I've been having a problem with the color picker in Atom built from
source. Last time I built it was today, August 22, 2016.

I really can't reproduce it in safe mode because no third-party packages
are loaded in safe mode. I mean, I don't have access to a color picker to
try in safe mode.

I created a new entry in my theme's config schema:

"test": {
"title": "Test color",
"description": "This color picker does nothing. Has no code bound to its events.",
"type": "color",
"default": "#000000"
},

This new color picker has no JavaScript code bound to its changes. If
you'd like, install atom-material-ui
https://atom.io/packages/atom-material-ui and try changing the theme's
base or accent colors. I know it's not an isolated issue because it's been
reported at atom-material/atom-material-ui#318
https://github.com/atom-material/atom-material-ui/issues/318 using a
different OS.
System Info

_Atom version_: 1.11.0-dev-89c638a (built on August 22, 2016)
_OS_: Mac OS X El Capitan 10.11.6
Installed Packages

$apm list --installed
Community Packages (3) /Users/silvestre/.atom/packages
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected]

Reproduction steps

  1. Open a package's settings which includes a color picker.
  2. Change its value.

_Expected behavior_: The color picker retains the new value.
_Observed behavior_: The color picker gets reset to its default value.
GIF Showing the issue

[image: colorpicker]
https://cloud.githubusercontent.com/assets/1133339/17878818/0a032450-68c4-11e6-8ef5-4355e52588d5.gif
Extra information

  • Problem can be reproduced in safe mode: _Can't test for the reason
    stated above_
  • Problem started happening recently, didn't happen in an older
    version of Atom: _Yes_
  • Problem can be reliably reproduced, doesn't happen randomly: _Yes_
  • Problem happens with all files and projects, not only some files or
    projects: _Yes_

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/atom/settings-view/issues/832, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHQp87EgEuI18YmAmPS9GehquhJfpe1ks5qimOfgaJpZM4Jqgmk
.

/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:1000

Error setting item in object: Validation failed at atom-material-ui.colors.abaseColor, {"_red":115,"_green":250,"_blue":121,"_alpha":1} cannot be coerced into a color

@simurai are you suggesting it might be something in the theme? because what's strange is that it's also happening to color pickers that have no javascript associated to them. ๐Ÿ˜•

No, that's just the error message I get. I can repro with another theme too. It gets thrown from here: https://github.com/atom/atom/blob/920f62a76a35bc0ef53ca0a0fada6126b5b1818d/src/config.coffee#L1215

Hey @maxbrunsfeld this looks like it's caused by the Color rewrite to JS? https://github.com/atom/atom/commit/3fd275a7f65781cc6eb55b0f3f2c48656aad80ed#diff-0795b1359a919ee59d7510baa3d94359

Was this page helpful?
0 / 5 - 0 ratings