Skip to content

feat: collapse older What's New entries by default#34

Merged
zjowowen merged 1 commit intomainfrom
feature/paper-study-enhancements
Mar 22, 2026
Merged

feat: collapse older What's New entries by default#34
zjowowen merged 1 commit intomainfrom
feature/paper-study-enhancements

Conversation

@zjowowen
Copy link
Copy Markdown
Collaborator

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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Checklist

  • My code follows the project's coding style
  • I have added tests that cover my changes (if applicable)
  • All new and existing tests pass (npm test)
  • Lint passes (npm run lint)
  • I have updated the documentation (if applicable)
  • I have checked that there are no sensitive data (API keys, tokens, etc.) in my changes

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>
Copilot AI review requested due to automatic review settings March 22, 2026 03:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in README.md and localized READMEs.
  • Updated the readme-whats-new workflow 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.

Comment on lines +327 to +331
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)
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
@zjowowen zjowowen merged commit 0cc7a6d into main Mar 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants