plain.admin 0.33.1__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,26 @@
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
+
14
+ ## [0.33.2](https://github.com/dropseed/plain/releases/plain-admin@0.33.2) (2025-07-07)
15
+
16
+ ### What's changed
17
+
18
+ - No user-facing changes in this release. Internal CSS cleanup and linter adjustments were made to the bundled admin styles ([3265f5f](https://github.com/dropseed/plain/commit/3265f5f)).
19
+
20
+ ### Upgrade instructions
21
+
22
+ - No changes required
23
+
3
24
  ## [0.33.1](https://github.com/dropseed/plain/releases/plain-admin@0.33.1) (2025-06-26)
4
25
 
5
26
  ### What's changed
@@ -5,9 +5,11 @@ end-user to drop in HTML elements and have a decent, consistent starting point.
5
5
  We shouldn't use many custom classes in here (like .btn) because the user
6
6
  could unintentionally overwrite those since our CSS is combined.
7
7
  */
8
+
9
+ /* biome-disable lint/style/noDescendingSpecificity */
8
10
  table {
9
11
  width: 100%;
10
- font-size: .875rem;
12
+ font-size: 0.875rem;
11
13
  line-height: 1.25rem;
12
14
  table-layout: auto;
13
15
  }
@@ -17,6 +19,14 @@ th {
17
19
  padding: 0.5rem 0.5rem;
18
20
  }
19
21
 
22
+ main a {
23
+ color: rgb(37, 99, 235);
24
+ }
25
+
26
+ main a:hover {
27
+ text-decoration: underline;
28
+ }
29
+
20
30
  table th a {
21
31
  color: rgba(255, 255, 255, 0.6);
22
32
  }
@@ -47,23 +57,15 @@ table img {
47
57
  border-radius: 2px;
48
58
  }
49
59
 
50
- main a {
51
- color: rgb(37, 99, 235);
52
- }
53
-
54
- main a:hover {
55
- text-decoration: underline;
56
- }
57
-
58
60
  select {
59
61
  border-radius: 6px;
60
62
  background-color: rgba(255, 255, 255, 0.05);
61
63
  border: 1px solid rgba(255, 255, 255, 0.1);
62
64
  }
63
65
 
64
- .actions a,
66
+ main button,
65
67
  .actions button,
66
- main button {
68
+ .actions a {
67
69
  display: inline-block;
68
70
  padding: 8px 16px;
69
71
  font-size: 14px;
@@ -74,7 +76,10 @@ main button {
74
76
  background-color: #2a2826;
75
77
  border: 1px solid #3f3d3b;
76
78
  border-radius: 6px;
77
- transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
79
+ transition:
80
+ background-color 0.2s,
81
+ border-color 0.2s,
82
+ transform 0.2s;
78
83
  cursor: pointer;
79
84
  flex-shrink: 0;
80
85
 
@@ -2,7 +2,7 @@ jQuery(($) => {
2
2
  $("[data-toggle]").on("click", function (e) {
3
3
  e.preventDefault();
4
4
  const targets = $(this).data("toggle").split(",");
5
- $.each(targets, (index, target) => {
5
+ $.each(targets, (_index, target) => {
6
6
  const $target = $(target);
7
7
  if ($target.data("toggle-class")) {
8
8
  $target.toggleClass($target.data("toggle-class"));
@@ -12,7 +12,7 @@ jQuery(($) => {
12
12
  });
13
13
  });
14
14
 
15
- $("[data-autosubmit]").on("change", function (e) {
15
+ $("[data-autosubmit]").on("change", function (_e) {
16
16
  $(this).closest("form").submit();
17
17
  });
18
18
 
@@ -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.1
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=6dNOjBmhuHnMjf2xVzjx9kQGX5QlHYS9WY2822GdP9Y,974
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
@@ -8,14 +8,14 @@ plain/admin/middleware.py,sha256=k3yP1o3CzvLiZZSoxqq-DvAZlp4sICRauaT-kD3FJKM,398
8
8
  plain/admin/templates.py,sha256=0xgMQmJEbh5U45ZlN2f15Xs42Y2A_lSS-_wdMp1BeD4,854
9
9
  plain/admin/toolbar.py,sha256=1bZm4Ub7d7rEXyh6TH7qbpcu9zqDOsS3Ynl9Xs0eM2M,2779
10
10
  plain/admin/urls.py,sha256=sriMi2RCkcrkjCX3CIIP1-Qzs_zDm2pxXeOw28vc7Y4,1301
11
- plain/admin/assets/admin/admin.css,sha256=x_8rGnClG6YNXBbXhhcE_6ETrGHO550Dsu8tFoHhsSI,2593
12
- plain/admin/assets/admin/admin.js,sha256=g_yruWKl63v1zprP5AWJHQN9BF-WRatK67aXx-LdWjQ,2569
11
+ plain/admin/assets/admin/admin.css,sha256=HsayPTAn0-pnwBR-fKkih9KrXUhM7jrWuReXwe5byHo,2662
12
+ plain/admin/assets/admin/admin.js,sha256=jI5u55YMvffibugVDf2QAZyrdahFsGLCciHyzFBCvmI,2571
13
13
  plain/admin/assets/admin/list.js,sha256=SDmDpSqsbbgLeAaV6V6JKbI-nG7WdjCD3MqFeO4LS_0,1835
14
14
  plain/admin/assets/admin/vendor/chart.js,sha256=GZiCYXjL6SmyuSCGE0Df80QvOUkw6H2YD-zsVID05lo,205089
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
@@ -23,7 +23,6 @@ plain/admin/cards/tables.py,sha256=lGUBeSaBsNVuzINVH8qU-1XF0PfPY03gcUKtN-462zE,5
23
23
  plain/admin/impersonate/README.md,sha256=GT7ubMxyB2RhUh-gDg_yYqWSm7oMp0hy1LepXyDRMo8,1012
24
24
  plain/admin/impersonate/__init__.py,sha256=houAFRscvEx8ajejZl9Im8Iu1aJFTTloHMXpgSwViVs,83
25
25
  plain/admin/impersonate/middleware.py,sha256=gFDLyEBqslJC908gKk1bFKmLFpimiaQdeaaXCBjUvaM,1261
26
- plain/admin/impersonate/models.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
26
  plain/admin/impersonate/permissions.py,sha256=N0EFshs0pgwFIAsK2MUgfnyhdb2rYheY_l47cYdGurE,332
28
27
  plain/admin/impersonate/settings.py,sha256=4wbWBN9eZIzei4fwkFLfw-_T5pvP_GG4l1lDdVpL_Co,193
29
28
  plain/admin/impersonate/urls.py,sha256=s8bwi8qPueKCCYcLW75p-hPFkBKhm2AMi6AQKQcZsWc,304
@@ -80,7 +79,7 @@ plain/admin/views/objects.py,sha256=eKL8A2B1ZMgTrCbTXnh6vCeju_HObxwetn_xc1vYlfY,
80
79
  plain/admin/views/registry.py,sha256=Lxib4YSQCMHb_zACnLKymJakV8jCZPWYll7J8-aV9Xw,3712
81
80
  plain/admin/views/types.py,sha256=ONMMdUoapgMoUVYgSIe-4YCdfvaVMQ4jgPWYiMo0pDk,178
82
81
  plain/admin/views/viewsets.py,sha256=dqMlQ6kLn9iqd9BwBWAZT1S271wH1FdfM5HXbOgBMEw,1655
83
- plain_admin-0.33.1.dist-info/METADATA,sha256=hkJX2jl6vOaIcPl4Ck4K4xJgxkFqlQzl9EiUwtN-Ugw,5051
84
- plain_admin-0.33.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
85
- plain_admin-0.33.1.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
86
- plain_admin-0.33.1.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,,
File without changes