@gjsify/adwaita-storybook 0.54.0 → 0.56.0
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/package.json +6 -6
- package/src/app.ts +4 -0
- package/src/preview-scroll.spec.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-storybook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "Browser renderer for the @gjsify/stories contract — the web counterpart of @gjsify/storybook, built on @gjsify/adwaita-web",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"browser"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@gjsify/adwaita-core": "^0.
|
|
34
|
-
"@gjsify/adwaita-web": "^0.
|
|
35
|
-
"@gjsify/stories": "^0.
|
|
36
|
-
"@gjsify/storybook-core": "^0.
|
|
33
|
+
"@gjsify/adwaita-core": "^0.56.0",
|
|
34
|
+
"@gjsify/adwaita-web": "^0.56.0",
|
|
35
|
+
"@gjsify/stories": "^0.56.0",
|
|
36
|
+
"@gjsify/storybook-core": "^0.56.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@gjsify/cli": "^0.
|
|
39
|
+
"@gjsify/cli": "^0.56.0",
|
|
40
40
|
"typescript": "^6.0.3"
|
|
41
41
|
},
|
|
42
42
|
"gjsify": {
|
package/src/app.ts
CHANGED
|
@@ -301,6 +301,10 @@ export class StorybookWebApp implements StorybookView<StoryElement> {
|
|
|
301
301
|
]);
|
|
302
302
|
const window_ = h('adw-window', { class: 'sb-window' }, [this._navSplit]);
|
|
303
303
|
this._container.replaceChildren(window_);
|
|
304
|
+
// `<adw-window>` writes its 360x200 size request as inline style on connect, which
|
|
305
|
+
// outranks `.sb-window`; the storybook fills its host, so it states that after connect.
|
|
306
|
+
window_.style.width = '100%';
|
|
307
|
+
window_.style.height = '100%';
|
|
304
308
|
}
|
|
305
309
|
|
|
306
310
|
private _exposeGlobal(): void {
|
|
@@ -124,13 +124,16 @@ export const AdwStorybookPreviewScrollTest = async () => {
|
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
await it('lets the toolbar view, not this sheet, fill the story-list column', () => {
|
|
127
|
+
await it('lets the toolbar view, not this sheet, fill the story-list column', async () => {
|
|
128
128
|
// This sheet used to carry its own `.sb-sidebar-scroll { flex: 1 1 auto }`,
|
|
129
129
|
// which held the column up here while every other Adw.ToolbarView content
|
|
130
130
|
// widget in the project still stopped at its last row. The declaration is
|
|
131
131
|
// gone and `adw-toolbar-view` fills its content widget instead, so this
|
|
132
132
|
// asserts the widget rule from the consumer that used to hide its absence.
|
|
133
133
|
const { host } = mountTall();
|
|
134
|
+
// The breakpoint observer settles after the first layout flush; measuring
|
|
135
|
+
// before then reads a collapsed (display: none) pane as zero height.
|
|
136
|
+
await new Promise<void>((r) => requestAnimationFrame(() => requestAnimationFrame(() => r())));
|
|
134
137
|
try {
|
|
135
138
|
const scroll = host.querySelector('.sb-sidebar-scroll') as HTMLElement;
|
|
136
139
|
const area = scroll.parentElement as HTMLElement;
|