Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions apps/web/src/pages/workspace/artifact-pane.module.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/* The pane's own header holds only its close button, at the end, on the pane's surface. */
.pane [data-slot="panel-header"] {
display: flex;
align-items: center;
justify-content: flex-end;
padding: var(--space-2) var(--space-3);
border: 0;
background: transparent;
}

.content {
flex: 1;
min-height: 0;
Expand All @@ -19,15 +9,15 @@

/* Each pane is its own scroller, so the padding belongs inside it: padding on the panel sat below
the scroller as a band the page never reached. The foot leaves room for the last lines to scroll
clear of the floating bar, whose height the bar sets on its pane. */
clear of the prompt box floating over it, whose height the room sets. */
.content[data-slot="panel-content"] {
position: relative;
padding: 0;
}

.content > [data-slot="panel-pane"]:not(.fill) {
padding: var(--space-3) var(--space-6)
calc(var(--space-6) + var(--pane-bar-height, 0px));
calc(var(--space-6) + var(--box-height, 0px));
}

.empty {
Expand Down
43 changes: 39 additions & 4 deletions apps/web/src/pages/workspace/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,46 @@
}
}

/* The status pill floats above the prompt box, over the project view's foot where its floating
bar stands; while the pill shows, the bar stands clear above it. */
.page:has(> [data-slot="composer"] [data-slot="pill"])
/* The prompt box floats over the project view's foot, whatever it shows: a written page runs on
under it over a fade into the page's backdrop, so its last lines read clearly as they scroll
beneath it, and a design or the live app keeps its full height under it. Each keeps what it must
reach clear of the box by the box's height, which the room sets on the page. Full screen, the
chat is the page instead. */
.footFade {
display: none;
}

.page:has(
> [data-slot="artifact-pane"]
[data-slot="panel-pane"][data-state="active"]
[data-slot="document-page"]
):not(
:has(> [data-slot="composer"] > [data-slot="chat-sheet"][data-state="full"])
)
> .footFade {
display: contents;
}

/* Over the project view only: the plugin sheet keeps its box below what it asks. Above whatever
the view lays over its own page, its bar's popovers and panels among them. */
.page[data-slot="room-project"]:not(
:has(> [data-slot="composer"] > [data-slot="chat-sheet"][data-state="full"])
)
> [data-slot="composer"] {
position: absolute;
inset-inline: 0;
bottom: 0;
z-index: 4;
}

/* Pulled up, the chat covers the view's foot and, on a narrow canvas, its edge where the view's
floating bar stands, so the bar steps aside until the chat is put away. */
.page:has(
> [data-slot="composer"]
> [data-slot="chat-sheet"]:is([data-state="open"], [data-state="moving"])
)
:is([data-slot="pane-bar"][data-floating], [data-slot="pane-bar-handle"]) {
bottom: calc(var(--space-3) + 2.5rem);
visibility: hidden;
}

/* The pane is a side panel by make, which a narrow container lays over everything; over the room
Expand Down
8 changes: 8 additions & 0 deletions apps/web/src/pages/workspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from "./room.model.ts";
import { RoomFault, RoomSkeleton } from "./room-skeleton.tsx";
import { RoomView } from "./room.view.tsx";
import { RoomThread } from "./transcript.tsx";
import { WrittenDocument } from "./written-document.tsx";

/** The room shows its loading or fault state until its first read is in hand. */
Expand All @@ -42,6 +43,13 @@ function ReadyRoom(props: ReadyRoomProps) {
<QuestionOutcomes value={questionOutcomes}>
<RoomView
{...view}
// Over the project view the chat pulls up around the prompt box, so the person reads and
// replies without leaving the page; with nothing said yet there is nothing to pull up.
chat={
view.conversation.empty === null ? (
<RoomThread {...view.conversation.thread} />
) : undefined
}
pluginSpace={
spaceScreen === null ? null : <SpaceScreen {...spaceScreen} />
}
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/pages/workspace/live-app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ summary.checklistRow:hover {
}

/* Every state but the running app is one centred block in the empty pane, scrolling clear of the
floating bar when the pane is shorter than it. */
prompt box floating over its foot when the pane is shorter than it. */
.state {
display: flex;
flex-direction: column;
Expand All @@ -142,13 +142,13 @@ summary.checklistRow:hover {
width: min(100%, 40rem);
margin: auto;
padding: var(--space-6) var(--space-6)
calc(var(--space-6) + var(--pane-bar-height, 0px));
calc(var(--space-6) + var(--box-height, 0px));
overflow: auto;
}

.app > [data-slot="sketching"] {
justify-content: safe center;
padding-bottom: calc(var(--space-6) + var(--pane-bar-height, 0px));
padding-bottom: calc(var(--space-6) + var(--box-height, 0px));
overflow: auto;
}

Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/pages/workspace/live-app.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import {
AppWindow,
ExternalLink,
KeyRound,
ListChecks,
LoaderCircle,
Square,
Expand Down Expand Up @@ -296,6 +297,7 @@ export function LiveAppView({
id: "demo-login",
label: text.demoLogin(demoLogin.email, demoLogin.password),
text: text.demoLogin(demoLogin.email, demoLogin.password),
icon: <KeyRound size={16} aria-hidden="true" />,
note: true,
},
]),
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/pages/workspace/mockup-tweaks.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* A small panel over the mockup, above the floating bar. */
/* A small panel over the mockup's foot, just above the prompt box floating there. */
.panel {
position: absolute;
bottom: calc(var(--space-3) + 3rem);
bottom: calc(var(--space-3) + var(--box-height, 0px));
left: 50%;
z-index: 3;
display: flex;
Expand Down
52 changes: 40 additions & 12 deletions apps/web/src/pages/workspace/pane-bar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,36 @@
background: var(--wb-background);
}

/* Over a page that fills the pane, the bar stands up its right edge, in the middle of what the
prompt box floating at the foot leaves above it. */
.bar[data-floating],
.handle {
position: absolute;
bottom: var(--space-3);
left: 50%;
top: calc((100% - var(--box-height, 0px)) / 2);
right: var(--space-3);
margin: 0;
transform: translateX(-50%);
transform: translateY(-50%);
}

.bar[data-floating] {
flex-direction: column;
max-width: none;
max-height: calc(100% - var(--box-height, 0px) - 2 * var(--space-3));
}

.bar[data-floating] > .rule {
width: 1.25rem;
height: 1px;
margin-inline: 0;
margin-block: 2px;
}

.bar[data-floating] > .row {
flex-direction: column;
margin-block: 0;
margin-inline: -4px;
overflow-x: visible;
overflow-y: auto;
}

/* One class, not two: the app-wide disabled button colour has to win over the muted one here,
Expand Down Expand Up @@ -83,11 +106,11 @@
flex-shrink: 0;
}

/* The folded bar: a small tab at the page's foot that brings the bar back. */
/* The folded bar: a small tab at the page's edge that brings the bar back. */
.handle {
z-index: 2;
width: 2.5rem;
height: 1.25rem;
width: 1.25rem;
height: 2.5rem;
border: 1px solid var(--wb-border);
border-radius: 999px;
background: var(--wb-background);
Expand All @@ -99,22 +122,27 @@
opacity: 1;
}

/* A floating bar with a popover: the anchor carries the bar's placement, so the popover sits on
whatever the bar is (the pill, a wrapped pill, or the folded handle) and a press on either is
inside it. It spans the page so a tall popover shrinks to fit rather than leave the pane; only
its own children take presses. */
/* A floating bar with a popover: the anchor carries the bar's placement, so the popover opens just
beside whatever the bar is (the bar or the folded handle) and a press on either is inside it. It
spans the page so a tall popover shrinks to fit rather than leave the pane; only its own children
take presses. */
.anchor {
position: absolute;
inset: var(--space-3) 0;
inset: var(--space-3) var(--space-3)
calc(var(--space-3) + var(--box-height, 0px));
z-index: 3;
display: flex;
flex-direction: column;
flex-direction: row;
align-items: center;
justify-content: flex-end;
gap: var(--space-2);
pointer-events: none;
}

.anchor > :not(.bar, .handle) {
max-height: 100%;
}

.anchor > * {
pointer-events: auto;
}
Expand Down
Loading
Loading