Repository: hanjinliu/magic-class (language: python)

Issue:
"enabled" parameter
Enabled parameter does not seem to work as expected? For instance, in the code below I would expect the PushButton to display as disabled: 


```python
@magicclass
class Foo:
    a = field(PushButton,options={"enabled":False})

if __name__=="__main__":
    ui = Foo()
    ui.show()
```

however it displays as a clickable button: 
<img width="232" alt="Screenshot 2022-03-24 at 08 51 05" src="https://user-images.githubusercontent.com/72206039/159878595-7cd6c674-7541-4744-882f-f658529384ea.png">

is this behaviour expected?



Discussion / hints:

Fix patch:
diff --git a/Untitled.ipynb b/Untitled.ipynb
deleted file mode 100644
index f27937fe..00000000
--- a/Untitled.ipynb
+++ /dev/null
@@ -1,265 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": 1,
-   "id": "4742f39f",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "from magicclass import magicclass, field\n",
-    "from magicclass.widgets import Figure, Logger\n",
-    "from magicclass.ext.jupyter import show_in_jupyter"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 2,
-   "id": "73ea28b4",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "@magicclass(widget_type=\"mainwindow\")\n",
-    "class A:\n",
-    "    plt = field(Figure)\n",
-    "    log = field(Logger)\n",
-    "    def f(self):\n",
-    "        self.plt.cla()\n",
-    "        self.plt.plot(np.random.random(100))\n",
-    "ui = A()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 3,
-   "id": "b184ccba",
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "65c5a736788148e4aa1ef75d015bc868",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "RFBOutputContext()"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "text/html": [
-       "<div class='initial-snapshot-5aa8eb2e41244a2c82028e0484b272ed' style='position:relative;'><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhE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z6MCEDDo0mUEHJmTQockMOjAhgw5NZtCBCRl0aDKDDkzIoEOTGXRgQgYdmsygAxP6Nuiz1ZvJzBp0aCCDDgABDDoABDDoABDAoANAAIMOAAEMOgAEMOgAEMCgA0AAgw4AARo96AsLC2V7e7v2GwkAmmxnZ6fZg760tFRWV1drv6EAoMk2NjbKy5cvmzvoW1tbe2fpm5ubztQB4H+qbaxOfKutrDazsYN+MOrVwwhPnjwpjx8/BgBGnj59Wubn56c+5n9k0AGAv8+gA0AAgw4AAQw6AAQw6AAQwKADQACDDgABDDoABDDoABDAoANAAIMOAAEMOgAEMOgAEMCgA0AAgw4AAQw6AAQw6AAQwKADQACDDgAB/gNWHOnDB5BV3wAAAABJRU5ErkJggg==' style='width:500.0px;height:300.0px;' /><div style='position: absolute; top:0; left:0; padding:1px 3px; background: #777; color:#fff; font-size: 90%; font-family:sans-serif; '>initial snapshot</div></div>"
-      ],
-      "text/plain": [
-       "<jupyter_rfb._utils.Snapshot object>"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "5aa8eb2e41244a2c82028e0484b272ed",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "JupyterQWidget()"
-      ]
-     },
-     "execution_count": 3,
-     "metadata": {},
-     "output_type": "execute_result"
-    },
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "<PyQt5.QtGui.QMouseEvent object at 0x000001F01E5B7550>\n"
-     ]
-    }
-   ],
-   "source": [
-    "show_in_jupyter(ui)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 4,
-   "id": "2b2bfb26",
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "<class 'numpy.ndarray'>\n"
-     ]
-    }
-   ],
-   "source": [
-    "with ui.log.set_plt():\n",
-    "    plt.plot(np.arange(10))"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 4,
-   "id": "670afbd4",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "ui.f()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 6,
-   "id": "1c450550",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "from pyqtgraph.jupyter import PlotWidget"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 2,
-   "id": "528c7669",
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "%gui qt"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 7,
-   "id": "21ec6ce4",
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "3ed67c4f3b9042e6a7349e774a7e77f9",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "RFBOutputContext()"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "text/html": [
-       "<div class='initial-snapshot-24a3d3d920824684999f169238ccbf69' style='position:relative;'><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAEsCAYAAAA1u0HIAAARi0lEQVR42u3du1IjyxIF0PkmPgCbCDxMTDwsLBwcHBwMHIzzu9xIxS3UKfQi6SalmWWsOKruVimnjtBW9Ut//vz587Gkh4eHj//++2/136VfCwD+Ycu+wHcDPbbd5gQGCgBO2bIvUAn0ExgUADg3y76AQAeAX7HsCwh0APgVy76AQAeAX7HsCwh0APgVy76AQAeAX7HsCwh0APgVy77A3d3dx8vLy+q/x2wv0AGgpL2ARKADQEl7AYlAB4CS9gISgQ4AJe0FJAIdAEraC0gEOgCUtBeQCHQAKGkvIBHoAFDSXkAi0AGgpL2ARKADQEl7AYlAB4CS9gISgQ4AJe0FJAIdAEraC0gEOgCUtBeQCHQAKGkvIBHoAFDSXkAi0AGgpL2ARKADQEl7AYlAB4CS9gKSCPSLi4uV7loA4Iy0F5CYoQNASXsBiUAHgJL2AhKB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qbxvjHTN2H3bxjvu8yqrFr2JfYed/jh74UeI//zEkEul9mO83xnN7qsfvfdMqWfP86hr7cmE8vt9o8+W3fjVT+RXOM977tRv8C/WdOItABgHn8D2IzI41J1eyiAAAAAElFTkSuQmCC' style='width:500.0px;height:300.0px;' /><div style='position: absolute; top:0; left:0; padding:1px 3px; background: #777; color:#fff; font-size: 90%; font-family:sans-serif; '>initial snapshot</div></div>"
-      ],
-      "text/plain": [
-       "<jupyter_rfb._utils.Snapshot object>"
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "application/vnd.jupyter.widget-view+json": {
-       "model_id": "24a3d3d920824684999f169238ccbf69",
-       "version_major": 2,
-       "version_minor": 0
-      },
-      "text/plain": [
-       "PlotWidget()"
-      ]
-     },
-     "execution_count": 7,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "ui = PlotWidget()\n",
-    "ui"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 8,
-   "id": "d037984f",
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "<pyqtgraph.graphicsItems.PlotDataItem.PlotDataItem at 0x2a6b04070d0>"
-      ]
-     },
-     "execution_count": 8,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "ui.plot(np.random.random(100))"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 9,
-   "id": "912d41fa",
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "<PyQt5.QtWidgets.QWidget at 0x2a6b0455670>"
-      ]
-     },
-     "execution_count": 9,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "ui.gfxView.viewport()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "id": "d672251f",
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Python 3 (ipykernel)",
-   "language": "python",
-   "name": "python3"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 3
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.9.7"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/magicclass/fields.py b/magicclass/fields.py
index 99224d96..e8c40ac6 100644
--- a/magicclass/fields.py
+++ b/magicclass/fields.py
@@ -47,7 +47,6 @@ def __init__(
         default_factory=MISSING,
         metadata: dict[str, Any] = {},
         name: str | None = None,
-        enabled: bool = True,
         record: bool = True,
     ):
         metadata = metadata.copy()
@@ -65,7 +64,6 @@ def __init__(
         self.callbacks: list[Callable] = []
         self.guis: dict[int, _M] = {}
         self.name = name
-        self.enabled = enabled
         self.record = record
 
         # MagicField has to remenber the first class that referred to itself so that it can
@@ -110,7 +108,6 @@ def get_widget(self, obj: Any) -> _W:
                 self.guis[obj_id] = widget
             if self.parent_class is None:
                 self.parent_class = objtype
-            widget.enabled = self.enabled
 
         return widget
 
@@ -129,7 +126,6 @@ def get_action(self, obj: Any) -> AbstractAction:
                 self.guis[obj_id] = action
             if self.parent_class is None:
                 self.parent_class = objtype
-            action.enabled = self.enabled
 
         return action
 
@@ -370,7 +366,6 @@ def field(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicField[ValueWidget, _X]:
     ...
@@ -383,7 +378,6 @@ def field(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicField[_W, Any]:
     ...
@@ -396,7 +390,6 @@ def field(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicField[ValueWidget, _X]:
     ...
@@ -409,7 +402,6 @@ def field(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicField[_M, Any]:
     ...
@@ -422,7 +414,6 @@ def field(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicField[Widget, Any]:
     ...
@@ -434,7 +425,6 @@ def field(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicField[Widget, Any]:
     """
@@ -455,8 +445,6 @@ def field(
         Widget type. This argument will be sent to ``create_widget`` function.
     options : WidgetOptions, optional
         Widget options. This parameter will always be used in ``widget(**options)`` form.
-    enabled : bool, default is True,
-        Set whether widget is initially enabled.
     record : bool, default is True
         Record value changes as macro.
 
@@ -464,7 +452,7 @@ def field(
     -------
     MagicField
     """
-    return _get_field(obj, name, widget_type, options, enabled, record, MagicField)
+    return _get_field(obj, name, widget_type, options, record, MagicField)
 
 
 @overload
@@ -474,7 +462,6 @@ def vfield(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicValueField[ValueWidget, _X]:
     ...
@@ -487,7 +474,6 @@ def vfield(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicValueField[_W, Any]:
     ...
@@ -500,7 +486,6 @@ def vfield(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicValueField[ValueWidget, _X]:
     ...
@@ -513,7 +498,6 @@ def vfield(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicValueField[Widget, Any]:
     ...
@@ -525,7 +509,6 @@ def vfield(
     name: str = "",
     widget_type: str | type[WidgetProtocol] | None = None,
     options: dict[str, Any] = {},
-    enabled: bool = True,
     record: bool = True,
 ) -> MagicValueField[Widget, Any]:
     """
@@ -550,9 +533,6 @@ def vfield(
     widget_type : str, optional
         Widget type. This argument will be sent to ``create_widget`` function.
     options : WidgetOptions, optional
-        Widget options. This parameter will always be used in ``widget(**options)`` form.
-    enabled : bool, default is True,
-        Set whether widget is initially enabled.
     record : bool, default is True
         Record value changes as macro.
 
@@ -560,7 +540,7 @@ def vfield(
     -------
     MagicValueField
     """
-    return _get_field(obj, name, widget_type, options, enabled, record, MagicValueField)
+    return _get_field(obj, name, widget_type, options, record, MagicValueField)
 
 
 def _get_field(
@@ -568,7 +548,6 @@ def _get_field(
     name: str,
     widget_type: str | type[WidgetProtocol] | None,
     options: dict[str, Any],
-    enabled: bool,
     record: bool,
     field_class: type[MagicField],
 ) -> type[MagicField]:
@@ -577,7 +556,7 @@ def _get_field(
     options = options.copy()
     metadata = dict(widget_type=widget_type, options=options)
 
-    kwargs = dict(metadata=metadata, name=name, enabled=enabled, record=record)
+    kwargs = dict(metadata=metadata, name=name, record=record)
     if isinstance(obj, type):
         f = field_class(default_factory=obj, **kwargs)
     elif obj is MISSING:


Test patch:
diff --git a/tests/test_fields.py b/tests/test_fields.py
index fd856d9f..4a06bc39 100644
--- a/tests/test_fields.py
+++ b/tests/test_fields.py
@@ -323,10 +323,10 @@ def test_enabled():
     class A:
         @magicclass
         class B:
-            a1 = field(int, enabled=False)
-            a2 = vfield(int, enabled=False)
-        b1 = field("b1", enabled=False)
-        b2 = field("b2", enabled=False)
+            a1 = field(int, options={"enabled": False})
+            a2 = vfield(int, options={"enabled": False})
+        b1 = field("b1", options={"enabled": False})
+        b2 = field("b2", options={"enabled": False})
 
     ui = A()
     assert not ui[1].enabled