Knowledge base
A team wiki with an article tree, an article in the Editor, comments on text, a review mode and the /ai command.
What it is built from
AppShellSideNavTopBarMobileTabBarTreeViewBreadcrumbsSplitPaneluseMediaQueryRichTextEditorSegmentedSearchControlDrawerAvatartoast
Try it
- Expand a folder in the tree on the left and open another article — each has its own text, and your edits in the previous one stay put.
- Put the caret in the highlighted words: a comment opens under them. Select other words and press the comment button.
- Switch to “Review”: the Toolbar goes away and the text cannot be edited, but comments still open on a click.
- Type
/aion an empty line and ask for, say, “a checklist for this process” — the answer is a canned draft, with no network. - Type “review” in the search — the tree keeps the matching articles and expands the path to them.
How it is built
The tree is the SideNav column, so on a phone it moves into a drawer automatically. The Gallery screen renders no
separate article panel: TreeView sits in a NavGroup, and below md AppShell shows the same column in a Drawer.
Changing routeKey when an article opens closes the drawer and moves focus to <main>. The tree keeps no state: the
expanded folders come in as a set, and while a search is active the Gallery screen passes all the folders at once.
The current article in the tree is marked with activeKey. The activeKey prop of TreeView sets
aria-current="page" and a highlight on the row of the open article, and does not enable checkboxes or selection mode.
The tree does not move the “current” mark on its own: the key comes from the Gallery screen together with the change of
article, and onAction handles the navigation. onAction does not expand a folder row, so the Gallery screen does the
expanding. Breadcrumbs show the path to the article: the last crumb has no href, and a folder crumb expands that
folder's branch of the tree.
The Editor's techniques come from the Recipes. A comment is a Mark with an author and text, described by
Schema rules; a Text card (textCards) opens under the marked words. The “review mode” is built from the same
readOnly and toolbar="none": Text cards work in readOnly, and the engine itself rejects edits made from them. The
“/ai” command is an Insert item with a popover, and the Field notice announces progress. The Gallery screen keeps
each article's Document in its own state (value and onChange), so edits survive switching between articles.
SplitPanel keeps the authors and comments beside the article. The list of comments is read from the Document's HTML;
“Resolve” removes the Mark and updates value. The panel's size belongs to the Gallery screen, and useMediaQuery reads
the window width: in a narrow window the panel collapses with the collapsed prop and the same comments open in a
Drawer, while the “Comments” button in MobileTabBar shows their count.