Skip to content

Commit 7e01697

Browse files
committed
Widget color property rename (short -> concise)
1 parent 65fb8be commit 7e01697

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

examples/notebooks/Widget Layout.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"cell_type": "markdown",
131131
"metadata": {},
132132
"source": [
133-
"**5.** Colorpicker alignment, short and long version"
133+
"**5.** Colorpicker alignment, concise and long version"
134134
]
135135
},
136136
{
@@ -152,7 +152,7 @@
152152
},
153153
"outputs": [],
154154
"source": [
155-
"cp.short = True"
155+
"cp.concise = True"
156156
]
157157
},
158158
{
@@ -163,7 +163,7 @@
163163
},
164164
"outputs": [],
165165
"source": [
166-
"cp.short = False"
166+
"cp.concise = False"
167167
]
168168
},
169169
{
@@ -196,7 +196,7 @@
196196
},
197197
"outputs": [],
198198
"source": [
199-
"cp2.short = True"
199+
"cp2.concise = True"
200200
]
201201
},
202202
{
@@ -207,7 +207,7 @@
207207
},
208208
"outputs": [],
209209
"source": [
210-
"cp2.short = False"
210+
"cp2.concise = False"
211211
]
212212
},
213213
{

ipywidgets/static/widgets/js/widget_color.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ define([
1313
defaults: _.extend({}, widget.DOMWidgetModel.prototype.defaults, {
1414
value: "black",
1515
description: "",
16-
"short": false,
16+
concise: false,
1717
_model_name: "ColorPickerModel",
1818
_view_name: "ColorPickerView",
1919
}),
@@ -42,11 +42,11 @@ define([
4242

4343
this.listenTo(this.model, "change:value", this._update_value, this);
4444
this.listenTo(this.model, "change:description", this._update_description, this);
45-
this.listenTo(this.model, "change:short", this._update_short, this);
45+
this.listenTo(this.model, "change:concise", this._update_concise, this);
4646
this.$colorpicker.on("change", this._picker_change.bind(this));
4747
this.$textbox.on("change", this._text_change.bind(this));
4848

49-
this._update_short();
49+
this._update_concise();
5050
this._update_value();
5151
this._update_description();
5252
},
@@ -66,14 +66,14 @@ define([
6666
this.$label.show();
6767
}
6868
},
69-
_update_short: function() {
70-
var short = this.model.get('short');
71-
if (short) {
72-
this.$el.addClass('short');
69+
_update_concise: function() {
70+
var concise = this.model.get("concise");
71+
if (concise) {
72+
this.$el.addClass("concise");
7373
this.$colorpicker.removeClass("input-group-addon");
7474
this.$textbox.hide();
7575
} else {
76-
this.$el.removeClass('short');
76+
this.$el.removeClass("concise");
7777
this.$colorpicker.addClass("input-group-addon");
7878
this.$textbox.show();
7979
}

ipywidgets/widgets/widget_color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
@register('Jupyter.ColorPicker')
1616
class ColorPicker(DOMWidget):
1717
value = Color('black', sync=True)
18-
short = Bool(sync=True)
18+
concise = Bool(sync=True)
1919
description = Unicode(sync=True)
2020

2121
_view_name = Unicode('ColorPickerView', sync=True)

0 commit comments

Comments
 (0)