Repository navigation
feat(Board): render a body BoardItemTitle in the item header - #113
Merged
Merged
Conversation
Content that draws its own title row had to pass a placeholder title, portal itself into it and hide an empty header through Board's private classes. A Board item now gives its description an item context: when the item has no title, the first BoardItemTitle in it renders in the header row (inline keeps one in the body), and useIsInBoardItem() tells content it is padded by the board.
Contributor
PR Analysis Report📚 Storybook PreviewGitHub Pages may take up to a minute to hydrate after the deploy. 🧩 Changed Components
1 other changed file(s) in
|
| Group | Gzip | Δ Gzip vs base |
|---|---|---|
components/Board |
12.4 kB | +0.4 kB |
index.js |
8.7 kB | +0.0 kB |
components/BoardItemTitle |
0.8 kB | +0.2 kB |
Total gzip (JS + CSS): 197.8 kB (+0.7 kB vs origin/main)
Generated by the PR Preview workflow for c2a5532 · Storybook · CI run
lablup-octodog
temporarily deployed
to
release
October 28, 2026 08:06 — with
GitHub Actions
Inactive
Contributor
|
Preview published under the pnpm add @lablup/ui-common@0.2.0-alpha.20.pr-113-20261028080932-c2a55328f
pnpm add -D @lablup/ui-common-cli@0.2.0-alpha.20.pr-113-20261028080932-c2a55328fIn backend.ai-webui: |
Clear the item context around an item's title node, so a Board nested in another item's description keeps its items' titles in their own header rows instead of claiming the outer item's header. Adds a test.
Contributor
Author
Ready gate review — round 1Reviewed
The fix landed after this review and was not re-reviewed (5 changed lines in |
lablup-octodog
marked this pull request as ready for review
October 28, 2026 08:09
lablup-octodog
temporarily deployed
to
release
October 28, 2026 08:12 — with
GitHub Actions
Inactive
agatha197
approved these changes
Oct 28, 2026
agatha197
added a commit
to lablup/backend.ai-webui
that referenced
this pull request
Oct 28, 2026
…ommon now covers Pin @lablup/ui-common to 0.2.0-alpha.20.canary-20261028082256-e3c262420, which carries lablup/ui-common#113 (a body BoardItemTitle renders in the item header, useIsInBoardItem) and lablup/ui-common#116 (the DataGrid page-size list flips above near the viewport bottom). - BAIBoard passes data.content as the description only; the title-slot portal, its :empty header CSS and the title stripping in onItemsChange go. - BAIBoardItemTitle renders ui-common BoardItemTitle as is; a second section title takes `inline` instead of BAIBoardItemInlineTitles. - useIsInBAIBoardItem stays as an alias of ui-common useIsInBoardItem. - BAITable.css, the page-size margin override, is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 28, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #111
Summary
Boardrenders each item's header row and description through a smallBoardItemBody, which provides an item context (BoardItemContext, internal) to the description.title, the firstBoardItemTitleinside its description claims the header row and renders there through a portal: same.uic-board-item__titleslot, so the same layout and drag-handle alignment as atitlenode. FurtherBoardItemTitles stay in the body, and the next one takes over if the first unmounts.inlineprop onBoardItemTitlekeeps it in the body (e.g. a second section title).titlenor a body title still renders no header row, so the content keeps the board's top padding.useIsInBoardItem(): true inside an item's description, false elsewhere (including thetitlenode).items, soonItemsChangereports only what the consumer passed.Board,BoardItemTitle), aTitleInDescriptionstory and a CHANGELOG entry (### Added). No new strings.Why
Consumers that build a dashboard card once (title row with help tooltip and actions, plus body) currently have to pass a placeholder
title, portal their title row into it, hide an empty header with selectors on Board's private.uic-board-item__*classes, and strip the placeholder back out ofonItemsChange. That CSS breaks silently whenever Board's DOM changes. With this change the card just renders aBoardItemTitlein its body and Board places it (#108). backend.ai-webui picks this up with the next@lablup/ui-commonrelease and can then drop that workaround.Test plan
src/components/Board/Board.test.tsx→ "Board item context": the hook is true only in the description; a body title renders in the header of an untitled item (heading, actions, nothing left in the body); it stays in the body when the item has a title or it isinline; only the first moves and the next takes over; the header row goes away with the title (also underStrictMode); moving items keeps one row, mounted once.src/components/BoardItemTitle/BoardItemTitle.test.tsx: renders in place outside a board,inlineor not.inline); move and resize items and check the rows don't duplicate.Verification