Files
windmill/frontend/src/lib/components/PageHeaderContent.svelte
T
Guilhem LemouelandClaude Opus 5 8f0b16e933 feat: an app's Edit sits with its name
At the far end of the bar it was a journey across the window from the thing it edits —
on a page whose header is only there while the pointer holds it, a journey with a time
limit. It goes beside the app's path instead.

The slot it uses is the one Runs' documentation tooltip already had, renamed from `hint`
to `afterName` and documented for both: what belongs to the page's name, whether that is
a mark or a control that acts on what the name points at.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-23 17:40:38 +02:00

40 lines
921 B
Svelte

<!--
@component
Fills the layout's page header from the route that mounts it: the breadcrumb (an item's path, or a
section name for a list) and the page's own buttons. Renders nothing itself.
Only a route page mounts this. An editor nested in a session pane or a drawer must not take over
the header, so nesting is decided by the caller rather than guessed from context.
-->
<script lang="ts">
import { onMount } from 'svelte'
import { pageHeader, type PageHeaderContent } from './pageHeaderRegistry.svelte'
let {
item,
section,
afterName,
actions,
actionsOrder,
contexts,
actingWorkspaceId,
barRightInset,
fullBleed
}: PageHeaderContent = $props()
onMount(() => {
const id = pageHeader.register(() => ({
item,
section,
afterName,
actions,
actionsOrder,
contexts,
actingWorkspaceId,
barRightInset,
fullBleed
}))
return () => pageHeader.release(id)
})
</script>