mobile optimization#89
Merged
Merged
Conversation
When using it on the desktop the sidebar should be still visible.
Closed
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances mobile responsiveness by introducing viewport-detection hooks, auto-closing the sidebar on small screens, and refactoring layouts and toolbars for better mobile UX.
- Added
useIsMobileanduseAutoCloseSidebarOnMobilehooks for responsive behavior. - Refactored
AppLayoutand sidebar components to support toggleable sidebar on mobile. - Updated editor and toolbar components with mobile-specific tab views and responsive styles.
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/leafwiki-ui/src/stores/sidebar.ts | Persist sidebar visibility and mode in store |
| ui/leafwiki-ui/src/lib/useIsMobile.ts | New hook to detect mobile breakpoint |
| ui/leafwiki-ui/src/lib/useAutoCloseSidebarOnMobile.ts | Auto-close sidebar on mobile route change |
| ui/leafwiki-ui/src/layout/AppLayout.tsx | Mobile sidebar toggle, header refactor |
| ui/leafwiki-ui/src/features/tree/TreeView.tsx | Height styling for full-height tree view |
| ui/leafwiki-ui/src/features/tree/TreeNode.tsx | Show action buttons on mobile and icon size tweak |
| ui/leafwiki-ui/src/features/sidebar/Sidebar.tsx | Added height classes for mobile layout |
| ui/leafwiki-ui/src/features/search/Search.tsx | Wrapped search content in full-height container |
| ui/leafwiki-ui/src/features/page/PageViewer.tsx | Added breadcrumbs and reset state on load |
| ui/leafwiki-ui/src/features/page/PageEditor.tsx | Added wrapper class on editor container |
| ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx | Hid certain toolbar buttons on small screens |
| ui/leafwiki-ui/src/features/editor/MarkdownEditor.tsx | Responsive editor/preview tabs for mobile |
| ui/leafwiki-ui/src/features/editor/MarkdownCodeEditor.tsx | Adjusted editor width for new layout |
| ui/leafwiki-ui/src/components/EditorTitleBar.tsx | Flex adjustments for title bar layout |
| ui/leafwiki-ui/package.json | Added new dependency |
Files not reviewed (1)
- ui/leafwiki-ui/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
ui/leafwiki-ui/package.json:46
- Verify that the newly added dependency
vaulis correct and intended; it may be a typo or an extraneous package.
"vaul": "^1.1.2",
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.