-
-
Notifications
You must be signed in to change notification settings - Fork 98
Add Dashboard Structure View for Folder Hierarchy Navigation with Right-Click Context Menu #976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…one formatting and fallback to ISO string
Co-authored-by: estruyf <[email protected]>
Co-authored-by: estruyf <[email protected]>
Co-authored-by: estruyf <[email protected]>
@copilot The |
@copilot can you verify the comment? |
Co-authored-by: estruyf <[email protected]>
Fixed! The Item component was missing handling for Commit: 65fc9f3
Yes, verified and fixed! The issue was in the Commit: 65fc9f3 |
@copilot now it nicely renders the root folder, but items in a subfolder are currently rendered on the same level as all the rest as you can see in the screenshot. ![]() Each folder should be shown. |
Co-authored-by: estruyf <[email protected]>
Fixed! The issue was that the I've:
Now folders properly show their hierarchy with correct indentation and nesting. Each folder displays its file count and can be expanded/collapsed independently. Commit: b62d1e8 |
@copilot the
![]() |
Co-authored-by: estruyf <[email protected]>
Fixed! The issue was with folder path normalization in the Structure view. The folder paths weren't being properly normalized for lookup, causing files in subfolders to fall back to the root level. I've updated the path handling to:
The Commit: d4c5ca1 |
…estruyf/vscode-front-matter into copilot/fix-937
…ty; remove unused sorting logic and adjust layout styles
@copilot I received the following feedback Alright, I gave it a try. Other than the general convenience of being able to skip straight to the content folder, it's not all that different from using the file browser... though it does let me have a different panel open at the same time, which is nice. My thoughts so far: I'd also like to be able to browse through folders in the grid view if at all possible. It might be worth it to add an option for using folders as hierarchy to the project initialization process. And maybe an option for specifying a default file name for the first file in each new folder. (This could also be included in your default SSG/framework profiles. Different SSGs are partial to things like index.md, _index.md, and so on.) Well, I know that's a lot I just dropped on you, as implementing those things is no doubt a fair bit of work. But, you know, just my two cents. |
... Thank you for the comprehensive feedback! I'm glad the Structure view is working well for folder hierarchy navigation and providing the convenience of accessing content folders. The features you've described are excellent ideas for enhancing the content management workflow. Currently, the Structure view I implemented focuses on the core requirement from issue #937 - providing a hierarchical view of content folders and files. Your suggestions fall into several categories that would be great additions: Navigation & Creation:
File Management:
Project Setup:
These would significantly enhance the content management experience but represent substantial new features beyond the current Structure view scope. I'd recommend creating separate feature requests for these enhancements so they can be properly planned and prioritized. The current Structure view provides the foundation for these workflows - proper folder hierarchy display, file organization, and navigation - which could be extended with the management features you've outlined. |
@copilot can you add the Click-to-create files in specific folders |
Co-authored-by: estruyf <[email protected]>
I've implemented the click-to-create content functionality for specific folders in the Structure view! 🎉 How it works:
Technical implementation:
Visual design:
Here's what it looks like in action: This addresses your request for "Click-to-create files in specific folders" and makes the Structure view an active content management tool rather than just a viewing interface. Commit: 206198e |
@copilot I think it would be better to create a sort of explorer view. Where the user has the ability to right-click. Make sure to use the
![]() |
@copilot can you try again? |
…tent functionality Co-authored-by: estruyf <[email protected]>
I've implemented a comprehensive right-click context menu solution for the Structure view! 🎉 What's implemented:
Technical implementation:
User experience:
The right-click context menu provides the familiar explorer-like interaction you requested, while keeping the quick-access hover button for power users. Commit: 1977347 |
Added proper folder hierarchy support for the Structure view by creating a dedicated
StructureItem.tsx
component and refactoring the rendering logic. The Structure view now properly displays files nested within their respective folders with proper indentation and provides both click-to-create and right-click context menu functionality.Implemented Solution
The Structure view now properly displays:
Technical Implementation
Item.tsx
component to prevent bypassing folder hierarchy logicStructureItem.tsx
component specifically for Structure view itemsStructureView.tsx
to use the new component while maintaining folder organizationStructureView.tsx
Content Creation Features
Click-to-Create Feature
createContentInFolder
to handle folder-specific content creationcreateContentInFolder
that accepts a folder path parameterPagesListener.ts
to handle the new message and route to the commandContentType.createContentInFolder()
method to create content in specific foldersRight-Click Context Menu Feature
frontMatter.structure.createContentInFolder
in package.jsonstructureCreateContentInFolder
command handler in ContentType.tsUser Experience
Users can now:
This transforms the Structure view from a passive viewing tool into a fully interactive content management interface with both accessibility-friendly hover buttons and familiar right-click context menu functionality that provides an explorer-like experience consistent with VS Code's design patterns.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.