-
Notifications
You must be signed in to change notification settings - Fork 25
feat: render readme.md file at the top of folder #1708
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
Conversation
Renders the readme.md file at to the top each folder if present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds functionality to display README.md files at the top of folders. When a README.md file is present in a folder, it is rendered as a collapsible markdown preview above the file list.
Key changes:
- Added a new
ListHeadercomponent to render README.md content with collapsible functionality - Integrated README.md detection and rendering into the
GenericSpaceview - Fixed TextEditor styling to remove top margin from markdown previews
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/web-app-files/src/components/FilesList/ListHeader.vue | New component that loads and displays README.md content with expand/collapse functionality |
| packages/web-app-files/src/views/spaces/GenericSpace.vue | Integrates ListHeader component and detects README.md files in the current folder |
| packages/web-pkg/src/components/TextEditor/TextEditor.vue | Wraps preview in article tag and removes top margin from first child in markdown preview |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| unref(markdownContainerRef).classList.remove('collapsed') | ||
| const markdownContainerHeight = unref(markdownContainerRef).offsetHeight | ||
| if (markdownContainerHeight < 300) { |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 300 appears twice (lines 12 and 63) for the collapse threshold. Extract this into a named constant to improve maintainability and ensure consistency.
kulmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I has unit tests? 😆
kulmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesomeness levels are rising over 9000 🚀
…ders feat: render readme.md file at the top of folder
|
Nice feature! As extension: also parse a hidden .readme.md ? |
Thanks for the suggestion, I like the idea! Solved via #1769 |
Renders the readme.md file at to the top each folder if present.