@marimo-team/frontend 0.23.16-dev43 → 0.23.16-dev45
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/dist/assets/{edit-page-ejL0j3OD.js → edit-page-DQuTJlR3.js} +5 -5
- package/dist/assets/{index-BLnlUAQy.js → index-Dmz2_F1x.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/components/editor/__tests__/viewer-banner.test.tsx +14 -0
- package/src/components/editor/viewer-banner.tsx +4 -1
- package/src/core/edit-app.tsx +1 -2
package/dist/index.html
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
|
|
67
67
|
<!-- /TODO -->
|
|
68
68
|
<title>{{ title }}</title>
|
|
69
|
-
<script type="module" crossorigin src="./assets/index-
|
|
69
|
+
<script type="module" crossorigin src="./assets/index-Dmz2_F1x.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-TXkS1QI3.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/objects-BlG0ZrO0.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/chunk-LvLJmgfZ.js">
|
package/package.json
CHANGED
|
@@ -54,6 +54,20 @@ describe("ViewerBanner", () => {
|
|
|
54
54
|
expect(container).toBeEmptyDOMElement();
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
it("pins the banner without reserving layout space", () => {
|
|
58
|
+
const store = createStore();
|
|
59
|
+
store.set(kioskModeAtom, true);
|
|
60
|
+
render(
|
|
61
|
+
<Provider store={store}>
|
|
62
|
+
<TooltipProvider>
|
|
63
|
+
<ViewerBanner />
|
|
64
|
+
</TooltipProvider>
|
|
65
|
+
</Provider>,
|
|
66
|
+
);
|
|
67
|
+
const wrapper = screen.getByTestId("takeover-button").closest("div.sticky");
|
|
68
|
+
expect(wrapper).toHaveClass("sticky", "top-2", "h-0");
|
|
69
|
+
});
|
|
70
|
+
|
|
57
71
|
it("renders nothing in present mode", () => {
|
|
58
72
|
const store = createStore();
|
|
59
73
|
store.set(kioskModeAtom, true);
|
|
@@ -51,8 +51,11 @@ export const ViewerBanner = () => {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
// A zero-height sticky row pins the banner to the top-left of the notebook
|
|
55
|
+
// scroll area, so it stays visible while scrolling without reserving space in
|
|
56
|
+
// the flow.
|
|
54
57
|
return (
|
|
55
|
-
<div className="
|
|
58
|
+
<div className="sticky top-2 left-2 z-50 h-0 ml-2 w-fit print:hidden">
|
|
56
59
|
<Banner
|
|
57
60
|
kind="info"
|
|
58
61
|
className="flex items-center gap-2 rounded px-2 py-1 text-xs shadow-sm"
|
package/src/core/edit-app.tsx
CHANGED
|
@@ -164,6 +164,7 @@ export const EditApp: React.FC<AppProps> = ({
|
|
|
164
164
|
width={appConfig.width}
|
|
165
165
|
onReconnect={reconnect}
|
|
166
166
|
>
|
|
167
|
+
<ViewerBanner />
|
|
167
168
|
<AppHeader
|
|
168
169
|
connection={connection}
|
|
169
170
|
className={cn(
|
|
@@ -179,8 +180,6 @@ export const EditApp: React.FC<AppProps> = ({
|
|
|
179
180
|
)}
|
|
180
181
|
</AppHeader>
|
|
181
182
|
|
|
182
|
-
<ViewerBanner />
|
|
183
|
-
|
|
184
183
|
{/* Don't render until we have a single cell. NotStartedConnectionAlert
|
|
185
184
|
still covers the "no remote runtime started" prompt. */}
|
|
186
185
|
<ProgressiveBoundary
|