plain.admin 0.33.2__py3-none-any.whl → 0.34.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plain/admin/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # plain-admin changelog
2
2
 
3
+ ## [0.34.0](https://github.com/dropseed/plain/releases/plain-admin@0.34.0) (2025-07-18)
4
+
5
+ ### What's changed
6
+
7
+ - The admin toolbar now automatically expands when an exception occurs, making it easier to immediately see exception details ([55a6eaf](https://github.com/dropseed/plain/commit/55a6eaf))
8
+ - The admin toolbar now remembers your custom height preference when resized, persisting across page reloads and browser sessions ([b8db44b](https://github.com/dropseed/plain/commit/b8db44b))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - No changes required
13
+
3
14
  ## [0.33.2](https://github.com/dropseed/plain/releases/plain-admin@0.33.2) (2025-07-07)
4
15
 
5
16
  ### What's changed
@@ -43,6 +43,10 @@ const plainToolbar = {
43
43
  document.querySelector("#plaintoolbar-details").classList.add("hidden");
44
44
  localStorage.setItem("plaintoolbar.expanded", "0");
45
45
  },
46
+ expandTemporary: function () {
47
+ this.expanded = true;
48
+ document.querySelector("#plaintoolbar-details").classList.remove("hidden");
49
+ },
46
50
  showTab: function (tabName) {
47
51
  this.expand();
48
52
 
@@ -74,6 +78,15 @@ const plainToolbar = {
74
78
  }
75
79
  localStorage.setItem("plaintoolbar.tab", tabName);
76
80
  },
81
+ resetHeight: () => {
82
+ const content = document.querySelector(
83
+ "#plaintoolbar-details [data-resizer]",
84
+ )?.nextElementSibling;
85
+ if (content) {
86
+ content.style.height = "";
87
+ localStorage.removeItem("plaintoolbar.height");
88
+ }
89
+ },
77
90
  };
78
91
 
79
92
  // Render it hidden immediately if the user has hidden it before
@@ -91,10 +104,28 @@ window.addEventListener("load", () => {
91
104
  if (lastTab) {
92
105
  plainToolbar.showTab(lastTab);
93
106
  }
107
+ // Restore custom height if it was set
108
+ const savedHeight = localStorage.getItem("plaintoolbar.height");
109
+ if (savedHeight) {
110
+ const content = document.querySelector(
111
+ "#plaintoolbar-details [data-resizer]",
112
+ )?.nextElementSibling;
113
+ if (content) {
114
+ content.style.height = savedHeight;
115
+ }
116
+ }
94
117
  } else if (state === "0") {
95
118
  plainToolbar.collapse();
96
119
  }
97
120
  const toolbar = document.querySelector("#plaintoolbar");
121
+ const hasException = toolbar.querySelector('[data-toolbar-tab="Exception"]');
122
+
123
+ if (hasException) {
124
+ plainToolbar.show();
125
+ if (!plainToolbar.expanded) {
126
+ plainToolbar.expandTemporary();
127
+ }
128
+ }
98
129
 
99
130
  for (const tab of toolbar.querySelectorAll("button[data-toolbar-tab]")) {
100
131
  tab.addEventListener("click", () => {
@@ -160,6 +191,8 @@ window.addEventListener("load", () => {
160
191
  isDragging = false;
161
192
  handle.style.cursor = "grab";
162
193
  document.body.style.userSelect = "";
194
+ // Save the new height to localStorage
195
+ localStorage.setItem("plaintoolbar.height", content.style.height);
163
196
  }
164
197
  });
165
198
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.admin
3
- Version: 0.33.2
3
+ Version: 0.34.0
4
4
  Summary: Admin dashboard and tools for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- plain/admin/CHANGELOG.md,sha256=N11d-amtJRZVskK52ohuSbpmOx1sLYzC-90Dka4t4Jw,1320
1
+ plain/admin/CHANGELOG.md,sha256=GJeHxMASUMT6dlrl-t-ZPr4Z9pC-0PBrtqK-A1aj7NA,1859
2
2
  plain/admin/README.md,sha256=w5N8yhHdMgY2RIf4WUvIXKvBrRTHLy4CV0ROtdK2Jiw,4614
3
3
  plain/admin/__init__.py,sha256=bPv9iftT8aLqBH6dDy-HTVXW66dQUhfIiEZ-LIUMC0Y,78
4
4
  plain/admin/config.py,sha256=TDYmJe4UYmKw4bz0x5s9PkDa-X4V-9JoJlka162-J7M,676
@@ -15,7 +15,7 @@ plain/admin/assets/admin/vendor/chart.js,sha256=GZiCYXjL6SmyuSCGE0Df80QvOUkw6H2Y
15
15
  plain/admin/assets/admin/vendor/jquery-3.6.1.slim.min.js,sha256=W2eb4M1jdKpuZ_-_KnDgqI9X9SwGLrXtO0dknpNPJyE,72534
16
16
  plain/admin/assets/admin/vendor/popper.min.js,sha256=SgCxkjQZdrt2puqn62YUu9hknpCBGBEAy9uhQ9PPZaI,20083
17
17
  plain/admin/assets/admin/vendor/tippy-bundle.umd.min.js,sha256=oVWBpeGTKMG_iBWGkQF02JnGIMFPYuFqTjUWeJY3pZ0,25668
18
- plain/admin/assets/toolbar/toolbar.js,sha256=MTO7ya8kLXQLCCIOvrud2KT79nDJ3vNeW5jH5Bz6Gh4,5349
18
+ plain/admin/assets/toolbar/toolbar.js,sha256=nPWx2X_iCjdpkbuGoOOvk_MAOMU4UMYVuxMTgjbVwUI,6423
19
19
  plain/admin/cards/__init__.py,sha256=8NfWrguyJRriJFUc3_QeGaDILhgeU3d1aXktzIuAR1E,172
20
20
  plain/admin/cards/base.py,sha256=ESYY0tX3OossyZi9ubCrLxwxUZ0Z3snZUCVmLvTIg-U,2247
21
21
  plain/admin/cards/charts.py,sha256=uUNO_uN_GVdkwYNSTx1bt1j2L-89rEyIg0vDaxP-9NE,4929
@@ -79,7 +79,7 @@ plain/admin/views/objects.py,sha256=eKL8A2B1ZMgTrCbTXnh6vCeju_HObxwetn_xc1vYlfY,
79
79
  plain/admin/views/registry.py,sha256=Lxib4YSQCMHb_zACnLKymJakV8jCZPWYll7J8-aV9Xw,3712
80
80
  plain/admin/views/types.py,sha256=ONMMdUoapgMoUVYgSIe-4YCdfvaVMQ4jgPWYiMo0pDk,178
81
81
  plain/admin/views/viewsets.py,sha256=dqMlQ6kLn9iqd9BwBWAZT1S271wH1FdfM5HXbOgBMEw,1655
82
- plain_admin-0.33.2.dist-info/METADATA,sha256=Rj5VzVT3GsJRYPqjcYuVz5Ff3kkqHj54UZ0DdIbfIvI,5051
83
- plain_admin-0.33.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- plain_admin-0.33.2.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
85
- plain_admin-0.33.2.dist-info/RECORD,,
82
+ plain_admin-0.34.0.dist-info/METADATA,sha256=EKReVBUrOY1H4Mbjq3iQJHOYmABP9PYyqZV3ll8t7xA,5051
83
+ plain_admin-0.34.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
+ plain_admin-0.34.0.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
85
+ plain_admin-0.34.0.dist-info/RECORD,,