Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a collapsible "Release Notes" section to the documentation site and enhances file path handling for "Edit on GitHub" links. The release notes for v0.1.1 are added with comprehensive change documentation.
- Introduces a new release notes section with expandable/collapsible UI
- Adds filePath tracking to all documentation topics for GitHub edit links
- Includes v0.1.1 release notes markdown file with detailed change history
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| website/src/pages/Docs.tsx | Adds release notes section with expansion state, updates topic structure to include filePaths, implements getFilePathForTopic helper, and adds "Edit on GitHub" link functionality |
| release-notes/v0.1.1.md | New release notes document with highlights, detailed changes, and contributor acknowledgments |
| .github/copilot-instructions.md | Updates release guidance section with detailed instructions for creating release notes |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
| <button | ||
| type="button" | ||
| onClick={() => | ||
| setReleaseNotesExpanded( | ||
| !releaseNotesExpanded | ||
| ) | ||
| } | ||
| className="mb-2 flex w-full items-center justify-between text-xs font-semibold uppercase tracking-[0.2em] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200 transition-colors" | ||
| > | ||
| <span>Release Notes</span> | ||
| {releaseNotesExpanded ? ( | ||
| <ChevronDown className="h-3 w-3" /> | ||
| ) : ( | ||
| <ChevronRight className="h-3 w-3" /> | ||
| )} | ||
| </button> |
There was a problem hiding this comment.
The collapsible "Release Notes" button should include an aria-expanded attribute to improve accessibility for screen reader users. Add aria-expanded={releaseNotesExpanded} to the button element to indicate its state.
| {(() => { | ||
| const filePath = getFilePathForTopic( | ||
| activeTopic.id, | ||
| topics, | ||
| releaseNotes | ||
| ); | ||
| return filePath != null && ( | ||
| <div className="mt-8 pt-6 border-t border-slate-200 dark:border-slate-700 not-prose"> | ||
| <a | ||
| href={`https://github.com/LittleLittleCloud/RazorConsole/edit/main/${filePath}`} | ||
| target="_blank" | ||
| rel="noopener noreferrer" |
There was a problem hiding this comment.
[nitpick] The getFilePathForTopic function is called twice with the same arguments (lines 226-229 and 233-236). Consider storing the result in a variable to avoid redundant computation:
const editFilePath = getFilePathForTopic(activeTopic.id, topics, releaseNotes);
{editFilePath && (
<div className="...">
<a href={`https://github.com/LittleLittleCloud/RazorConsole/edit/main/${editFilePath}`}
…dling