@antelopejs/dms 0.7.10 → 0.7.11
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.7.11
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.7.10...v0.7.11)
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **guard:** Space several children the way the page spaces its blocks ([#221](https://github.com/AntelopeJS/dms/pull/221))
|
|
10
|
+
|
|
11
|
+
### ❤️ Contributors
|
|
12
|
+
|
|
13
|
+
- Antony Rizzitelli <rizzitelli.antony@pm.me>
|
|
14
|
+
|
|
3
15
|
## v0.7.10
|
|
4
16
|
|
|
5
17
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.7.9...v0.7.10)
|
|
@@ -13,7 +13,8 @@ import { notFoundTexts } from "../../build/utils/fetchNotFound";
|
|
|
13
13
|
// `Guard` block (interface-dms `base/guard`): renders its children unchanged
|
|
14
14
|
// unless a route says there is nothing for them, then one EmptyState (the
|
|
15
15
|
// `fallback`, with the answer's `emptyState` laid over it) in their place.
|
|
16
|
-
//
|
|
16
|
+
// Several children stack with the room the page leaves between its blocks,
|
|
17
|
+
// as in a tab: the page spaces the guard, not what it holds.
|
|
17
18
|
interface GuardProps extends DefaultComponentProps {
|
|
18
19
|
fetchUrl?: string;
|
|
19
20
|
fetchUrlMethod?: string;
|
|
@@ -67,7 +68,7 @@ const fallback = computed<GuardFallback | null>(() => {
|
|
|
67
68
|
</script>
|
|
68
69
|
|
|
69
70
|
<template>
|
|
70
|
-
<div class="
|
|
71
|
+
<div class="space-y-6" data-dms-guard>
|
|
71
72
|
<DmsEmptyStateBlock v-if="fallback" v-bind="fallback" />
|
|
72
73
|
<slot v-else />
|
|
73
74
|
</div>
|
|
@@ -19,3 +19,11 @@ it("spaces the blocks of a tab the way the page spaces its own", () => {
|
|
|
19
19
|
),
|
|
20
20
|
);
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
// A guard holding two blocks drew them edge to edge: the page spaces its own
|
|
24
|
+
// wrapper, not the blocks inside it.
|
|
25
|
+
it("spaces the blocks of a guard the way the page spaces its own", () => {
|
|
26
|
+
expect(sourceOf("dms-ui/app/components/guard/Guard.vue")).toMatch(
|
|
27
|
+
new RegExp(`<div class="[^"]*\\b${BLOCK_SPACING}\\b[^"]*" data-dms-guard>`),
|
|
28
|
+
);
|
|
29
|
+
});
|