feat: collapse older What's New entries by default#34
Conversation
Show only the 2 most recent dates expanded, wrap older entries in a collapsible <details> block. Updated the readme-whats-new workflow to apply this formatting automatically on each run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the “What’s New” sections across the main README and localized docs so that only the two most recent dates are expanded by default, with older entries collapsed behind a <details> disclosure. Also updates the readme-whats-new GitHub Actions workflow to apply this formatting automatically after it appends new entries.
Changes:
- Wrapped older “What’s New” entries in a
<details>block inREADME.mdand localized READMEs. - Updated the
readme-whats-newworkflow to trim entries and auto-collapse older dates (with localized<summary>labels).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Collapses older “What’s New” entries under a <details> section. |
| docs/README_CN.md | Same collapse behavior for Chinese README with localized <summary>. |
| docs/README_JA.md | Same collapse behavior for Japanese README with localized <summary>. |
| docs/README_FR.md | Same collapse behavior for French README with localized <summary>. |
| docs/README_DE.md | Same collapse behavior for German README with localized <summary>. |
| .github/workflows/readme-whats-new.yml | Automates trimming + collapsing older unique dates into <details> on each run. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| result = "\n".join(visible) | ||
| if collapsed: | ||
| label = LANG_LABELS.get(readme_file, "Show earlier updates") | ||
| result += "\n\n<details>\n<summary>" + label + "</summary>\n" | ||
| result += "\n".join(collapsed) |
There was a problem hiding this comment.
result = "\n".join(visible) / "\n".join(collapsed) can cause the number of blank lines between entries to grow on every workflow run because each entry already contains trailing newlines (everything up to the next \n#### ...), and join adds an extra separator newline on top. This can bloat the README sections over time and already appears to be producing large vertical gaps. Consider normalizing entries before joining (e.g., strip leading/trailing newlines per entry) and then joining with a fixed separator (often "\n\n") so spacing stays stable run-to-run.
| result = "\n".join(visible) | |
| if collapsed: | |
| label = LANG_LABELS.get(readme_file, "Show earlier updates") | |
| result += "\n\n<details>\n<summary>" + label + "</summary>\n" | |
| result += "\n".join(collapsed) | |
| # Normalize entries to avoid accumulating blank lines across runs | |
| visible = [e.strip() for e in visible] | |
| collapsed = [e.strip() for e in collapsed] | |
| result = "\n\n".join(visible) | |
| if collapsed: | |
| label = LANG_LABELS.get(readme_file, "Show earlier updates") | |
| result += "\n\n<details>\n<summary>" + label + "</summary>\n\n" | |
| result += "\n\n".join(collapsed) |
Show only the 2 most recent dates expanded, wrap older entries in a collapsible
Details
block. Updated the readme-whats-new workflow to apply this formatting automatically on each run.Summary
Changes
Related Issues
Type of Change
Checklist
npm test)npm run lint)