On this page

0.2.0 is the first release after 0.1.0. For most apps, upgrading is changing the version: nothing an app writes with createJali, definePane and <JaliRoot> was removed, and the one public name that changed keeps its old name for now.

npm install jali-layout@0.2.0

Four things can need a change in an app's own code. Go through them in order; most apps need none.

  1. A curated page's type is now PageBase. It is the same type, and ProfileBase still works, marked deprecated, until a later release.

    // Beforeimport type { ProfileBase } from "jali-layout";// Afterimport type { PageBase } from "jali-layout";
  2. In 0.1.0, a command of your app's with one of Jali's ids was dropped, keys and all. Now it replaces Jali's: ⌘K lists yours instead, and the keys bound to that id run it. If you gave a command a Jali id by accident and relied on Jali's still showing, give yours an id of its own.

    // Now the one "Reset layout" in ⌘K: Jali's is no longer listed.{ id: "layout.reset", title: "Reset layout", run: forgetAndReset }// To keep Jali's beside it, give yours an id of your own.{ id: "orders.reset-layout", title: "Reset layout", run: forgetAndReset }

    See Replace one of Jali's commands.

  3. If a server renders your page and you wrote a component that mounts <JaliRoot> in the browser only, <ClientOnly> and useHydrated() from jali-layout/react now do that. See Server rendering.

  4. If you passed a pane's paused down through a context of your own so that shared hooks could read it, call usePaused() instead. It returns false outside a pane, so it never throws. See Pause hidden panes.

These changes need no code. Each makes Jali do what a person expects, so check only that your tests don't rely on the old behaviour.

In 0.1.0In 0.2.0
A preset with more panes than the pane cap folded the extra ones into tabsIt shows all its panes. What the person adds meets the cap again (The pane cap)
A link opened with no room folded straight into a tab, so the person saw only "1 folded"The panes in least use fold to make room, and the new pane shows. createJali({ noRoom: "fold" }) keeps the old way (Opening when there is no room)
A preset always started with focus in its first paneA preset can name the pane people start in, focus; without it, the first pane, as before
tuck(id) on a pane in a row that scrolls returned { ok: true } and left the pane where it wasIt is refused as "blocked": a row that scrolls is no tuck's home
In 0.1.0In 0.2.0
A tab kept its whole title, and a short strip scrolled the other tabs away behind "+N"The tabs share the strip, the longest titles shortened first, down to 6rem each. Only then does it scroll. A pane can give a short title for a squeezed tab (Tab widths and short titles)
On a touch screen, every pane showed its header buttonsOnly the focused pane shows them. A tap on another pane focuses it, and its buttons come
A pane in error showed a red dotIts title and icon take the error colour, --jali-failed, with no dot (Activity marks)
A plain link's follow toggle said FollowingIt is its icon alone, named "Opened from …"
A follower that couldn't show its list's selection still said FollowingIt says Holding, with a dashed outline, until the list selects something it can show
In 0.1.0In 0.2.0
⌘K listed what matched in its own orderIt ranks matches: titles that start with the text, then a word in the title that does, then the title containing it, then the id or group
After the ⌘K prefix, Jali waited for the second key however long it tookThe wait ends when the palette closes, on a click, when the window loses focus, or after 2 seconds for a prefix that opened no palette
Keys typed while an input method composed text could run pane commandsThey are the input method's
Resize mode stayed on after its pane closed or was tucked, taking the arrows page-wideIt ends once focus leaves its pane, or the maximised pane changes
Esc with one pane on the full screen did nothingIt leaves full screen. Full screen also ends with its pane
⌘K opened the palette behind "Discard unsaved changes?"It does nothing while that question is open
In 0.1.0In 0.2.0
Jali set color-scheme: dark on the page's root when the system was darkOnly on Jali's own elements, so a light-only page keeps its own controls light
Stacking was fixed: dialogs 100, menus 60, full screen 50--jali-z-dialog, --jali-z-menu and --jali-z-fullscreen set it, for an app whose own bars sit higher
The shelf's "+N" list opened inside the shelf, where a status bar that clips could hide itIt opens in the instance's layer. .jali-shelf-menu still selects it
A toast shown while a pane was on the full screen sat behind itYour overlays go into the full-screen pane, with the root's theme and tokens
Discarding a draft left one saved by an earlier page load in storage, so a reload brought it backDiscarding removes it
  • Server rendering: useHydrated() and <ClientOnly>, in Installation.
  • Pausing from any hook: usePaused(), in Pause hidden panes.
  • Short titles: useTitle(title, { short }) and the --jali-tab-min token, in Tab widths and short titles.
  • Activity marks of your own: <JaliRoot parts={{ activity }}>, with the JaliParts and ActivityMarkProps types, and data-activity on every place a mark goes, in Activity marks.
  • Room for what was opened: createJali({ noRoom }) and openBeside(…, { noRoom, focus }). focus: false leaves focus where it is.
  • Reading what is on screen: jali.model().isShown(id) and useIsShown(id), and useFollowers(id) for the panes following a list.
  • Menus of your own: Menu, with MenuProps and MenuAt, which works as Jali's menus do and opens in the instance's layer.
  • Smaller things: copyLink(jali) resolves to whether the link reached the clipboard; messages.pane.plainName names a plain link's toggle; and the parts .jali-pane[data-framed], [data-jali][data-dragging] and the menu item's name, keys, check and separator (Parts).

This part is for code that imports jali-layout/adapter: an adapter for another framework, or a test that makes a store by hand. That entry may change in any minor version. An app that calls createJali changes nothing here.

createJaliStore takes what its env holds and what only the store reads as two objects. JaliConfig is gone.

// Beforeconst store = createJaliStore({  kinds,  name: "Shop",  features: [palette()],  id: "shop",  storage: memoryStorage(),  initial: { layout, area: { width: 0, height: 0 } },});​// Afterconst store = createJaliStore(  { kinds, name: "Shop", features: [palette()] },  {    id: "shop",    storage: memoryStorage(),    initial: { layout, area: { width: 0, height: 0 } },  },);
In 0.1.0In 0.2.0
JaliConfigEnvOptions (kinds, page, presets, the chrome's options, messages, gap) and StoreOptions (preset, url, sync, storage, id, initial, settings, keyboard, focusPane, unstable, beforeClose)
initial: Partial<UiState>initial: { layout?, area? }. A reading direction is EnvOptions.dir
url: the app's writer or the urlSync() feature's, told apart by its methodsurl, a writer of the app's own, or sync, the feature's UrlSync
Feature.address gave a UrlWriterA UrlSync
Env.messages was optionalAlways there: the store resolves the words
In 0.1.0In 0.2.0
Presentation: "tiled" | "single", and CHROME.single"tiled" | "onePane", and CHROME.onePane, so one pane at a time on a phone is no longer named like a curated page's Single view
ALONE_CHROME, told apart by chrome === ALONE_CHROMECHROME.alone, and chrome.alone
A curated page's Single view was the adapter's own flagchromeOf(placement, pageSingle) gives the frames' chrome: CHROME.tiled, onePane or alone, or pageTiled and pageOnePane in Single view. Chrome says alone, header ("shown" or "hidden"), menu, follow and rename
A hand-made Frame left pausing to the adapterFrame.paused: hidden, covered by a maximised pane, or scrolled out of view
Env.profile, the page, and Env.page, its engineEnv.page, the page, and Env.pageEngine, its engine. EnvOptions.profile is EnvOptions.page
roleOf(profile, id) and investigation(panes)viewOf(page, id) and openedPanes(panes)
OpenPage.investigation, and readSearch(...).page.investigationOpenPage.opened, and readSearch(...).page.opened
TuckRefusal: "missing", "tab", "hidden" or "last"Also "strip": the pane is in a row that scrolls
DomPort.dragging(what, divider)A third argument, the instance's root, which a port may ignore

Links, stored layouts and the state's own fields (page.profile, page.tab, a pane's role, ?open=) are as they were, so a saved layout or a shared link from 0.1.0 opens the same.

What React's adapter worked out without React is now in jali-layout/adapter, so another framework's adapter needn't write it again: tabGroups, hostFor and peekHostFor (with PaneHost), watchMeasure and watchKeyboard, followStatus, pageTabState, pressedFeature, createPopOutWindow, and the fold and stack announcements' words, foldWords and stackWords.