Skip to content

Commit e4ee80a

Browse files
vidartfjasongrout
andauthored
Split layout and style docs, add style attribute table (#3534)
* Split layout and style widgets Split the "Layout and Style" doc notebook into two, as it was quite large, and overly dominated by content on layout. * Add tables about styles + attributes Note that the cells generating the tables are hidden in nbsphinx! * I meant to hide input, not full cell! * Include new doc notebooks in index * Fix top header for styling notebook * Merge the tags input example file into the widget list file where all the other widgets are. * Change the IntInputs default format to 'd', suitable for integers. I found it confusing that the default format for integers looked like a floating point number. Co-authored-by: Jason Grout <[email protected]>
1 parent c572ec8 commit e4ee80a

File tree

9 files changed

+1461
-1479
lines changed

9 files changed

+1461
-1479
lines changed

docs/source/examples/Widget Layout.ipynb

Lines changed: 1328 additions & 0 deletions
Large diffs are not rendered by default.

docs/source/examples/Widget List.ipynb

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,14 +999,16 @@
999999
"cell_type": "markdown",
10001000
"metadata": {},
10011001
"source": [
1002-
"## Tags input widget"
1002+
"## Tag widgets"
10031003
]
10041004
},
10051005
{
10061006
"cell_type": "markdown",
10071007
"metadata": {},
10081008
"source": [
1009-
"The `TagsInput` widget is useful to for selecting/creating a list of tags. You can drag and drop tags to reorder them, limit them to a set of allowed values, or even prevent making duplicate tags."
1009+
"### TagsInput\n",
1010+
"\n",
1011+
"The `TagsInput` widget is useful for selecting/creating a list of tags. You can drag and drop tags to reorder them, limit them to a set of allowed values, or even prevent making duplicate tags."
10101012
]
10111013
},
10121014
{
@@ -1023,6 +1025,15 @@
10231025
"tags"
10241026
]
10251027
},
1028+
{
1029+
"cell_type": "markdown",
1030+
"metadata": {},
1031+
"source": [
1032+
"### ColorsInput\n",
1033+
"\n",
1034+
"The `ColorsInput` widget is useful for selecting/creating a list of colors. You can drag and drop colors to reorder them, limit them to a set of allowed values, or even prevent making duplicate colors."
1035+
]
1036+
},
10261037
{
10271038
"cell_type": "code",
10281039
"execution_count": null,
@@ -1037,6 +1048,44 @@
10371048
"color_tags"
10381049
]
10391050
},
1051+
{
1052+
"cell_type": "markdown",
1053+
"metadata": {},
1054+
"source": [
1055+
"### Float and Integer Input widgets\n",
1056+
"\n",
1057+
"The `FloatInputs` and `IntsInput` widgets enable creating a list of float or integer numbers."
1058+
]
1059+
},
1060+
{
1061+
"cell_type": "code",
1062+
"execution_count": null,
1063+
"metadata": {},
1064+
"outputs": [],
1065+
"source": [
1066+
"floatsinput = widgets.FloatsInput(\n",
1067+
" value=[1.3, 4.56, 78.90],\n",
1068+
" tag_style='info',\n",
1069+
" format = '.2f'\n",
1070+
")\n",
1071+
"floatsinput"
1072+
]
1073+
},
1074+
{
1075+
"cell_type": "code",
1076+
"execution_count": null,
1077+
"metadata": {},
1078+
"outputs": [],
1079+
"source": [
1080+
"intsinput = widgets.IntsInput(\n",
1081+
" value=[1, 4, 3243],\n",
1082+
" min=0,\n",
1083+
" max=1000000,\n",
1084+
" format='$,d'\n",
1085+
")\n",
1086+
"intsinput"
1087+
]
1088+
},
10401089
{
10411090
"cell_type": "markdown",
10421091
"metadata": {},

0 commit comments

Comments
 (0)