fix(ui): improve editor and asset layouts#1026
Merged
Merged
Conversation
Tighten the asset manager dialog and make asset rows wrap cleanly on smaller screens. Repair the tree view action trigger so its dropdown menu opens reliably again. Adjust the editor title bar spacing to improve mobile alignment without changing the surrounding header structure.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines several UI layouts to behave better on smaller screens and fixes an interaction regression in the tree view actions dropdown by making the action button compatible with “asChild”/ref-driven triggers.
Changes:
- Update Asset Manager list item layout to wrap actions cleanly on small screens and tighten the dialog width.
- Adjust editor title bar spacing/alignment for improved mobile layout.
- Refactor
TreeViewActionButtontoforwardRefand accept native button props for better integration with dropdown triggers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ui/leafwiki-ui/src/index.css | Updates Tailwind @apply rules for asset rows, asset manager dialog sizing, and editor title bar spacing. |
| ui/leafwiki-ui/src/features/tree/TreeViewActionButton.tsx | Converts to a forwardRef button that spreads native props (used by dropdown triggers). |
| ui/leafwiki-ui/src/features/assets/AssetItem.tsx | Wraps action buttons in a dedicated container and tweaks flex constraints for better wrapping/truncation. |
Comments suppressed due to low confidence (1)
ui/leafwiki-ui/src/features/tree/TreeViewActionButton.tsx:30
TreeViewActionButtonspreads...propsonto the<button>but then overwritesclassNamewith a constant. When used withDropdownMenuTrigger asChild(or any consumer passing className), this drops the caller-provided classes and can break styling/behavior that relies on them.
<button
{...props}
ref={ref}
type={type}
onClick={(e) => {
onClick?.(e)
e.stopPropagation()
}}
className="btn-treeview"
aria-label={tooltip}
data-testid={`tree-view-action-button-${actionName}`}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Tighten the asset manager dialog and make asset rows wrap cleanly on smaller screens. Repair the tree view action trigger so its dropdown menu opens reliably again. Adjust the editor title bar spacing to improve mobile alignment without changing the surrounding header structure.