Skip to content

feat(ui): add subheading to weekly downloads to clarify scope#1752

Merged
serhalp merged 4 commits intomainfrom
serhalp/empty-search-subheading
Feb 28, 2026
Merged

feat(ui): add subheading to weekly downloads to clarify scope#1752
serhalp merged 4 commits intomainfrom
serhalp/empty-search-subheading

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Feb 28, 2026

🔗 Linked issue

Resolves #1670

🧭 Context

The npm downloads API aggregates data at the package level only, not per version. Users could be misled when selecting a different version and seeing the same download stats. This change adds a clarifying subtitle to make this behaviour explicit upfront.

📚 Description

Added a subheading feature to the CollapsibleSection component to display secondary text below section headings. The weekly downloads section now displays "Across all versions" as a subheading below "Weekly Downloads".

Screenshot 2026-02-28 at 11 01 38

Add the same to the chart modal when downloads is selected:

Screenshot 2026-02-28 at 11 32 07

Clarifies that download stats are aggregated at the package level,
not per version. Adds a subtitle prop to CollapsibleSection and
uses it in the downloads sidebar to reduce user confusion.

Closes #1670
@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 28, 2026 4:59pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 28, 2026 4:59pm
npmx-lunaria Ignored Ignored Feb 28, 2026 4:59pm

Request Review

@graphieros
Copy link
Contributor

lol you beat me to it ^^

@serhalp serhalp changed the title feat: add 'across all versions' subtitle to weekly downloads section feat(ui): add subheading to weekly downloads to clarify scope Feb 28, 2026
@github-actions
Copy link

github-actions bot commented Feb 28, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/en-GB.json Localization changed, will be marked as complete.
lunaria/files/en-US.json Source changed, localizations will be marked as outdated.
lunaria/files/fr-FR.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/Package/WeeklyDownloadStats.vue 50.00% 2 Missing and 2 partials ⚠️
app/components/Modal.client.vue 75.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@graphieros
Copy link
Contributor

I think we can add a modal-subtitle prop to chartModal too, wdyt ?

Copy link
Contributor

@graphieros graphieros left a comment

Choose a reason for hiding this comment

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

Looks good to me ❤️

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07530bb and 5426dd5.

📒 Files selected for processing (1)
  • app/components/Modal.client.vue

📝 Walkthrough

Walkthrough

This pull request adds subtitle support across multiple Vue components and updates localisation. It introduces an optional subtitle?: string prop to CollapsibleSection, an optional modalSubtitle?: string prop to Modal and ChartModal, and wires a computed modalSubtitle through WeeklyDownloadStats into the modal and collapsible section. Templates and ARIA attributes are updated to render and describe subtitles. i18n schema and locale files (en, en-GB, en-US, fr-FR) gain a downloads.subtitle key. Tests were updated to assert the subtitle text appears.

Possibly related PRs

Suggested reviewers

  • graphieros
  • danielroe
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly explains the motivation (npm API aggregates at package level), the implementation (subheading feature added to CollapsibleSection), and the visual changes with supporting screenshots.
Linked Issues check ✅ Passed All coding requirements from issue #1670 are met: subtitle feature added to CollapsibleSection component, subtitle integrated into WeeklyDownloadStats and ChartModal components, and clarifying text displayed in both summary and modal UI.
Out of Scope Changes check ✅ Passed All changes directly support the objective of clarifying download aggregation scope: component modifications, prop additions, i18n translations, schema updates, and test assertions all relate to implementing the subtitle feature.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch serhalp/empty-search-subheading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5ccbff and 07530bb.

📒 Files selected for processing (11)
  • app/components/CollapsibleSection.vue
  • app/components/Modal.client.vue
  • app/components/Package/ChartModal.vue
  • app/components/Package/WeeklyDownloadStats.vue
  • i18n/locales/en.json
  • i18n/locales/fr-FR.json
  • i18n/schema.json
  • lunaria/files/en-GB.json
  • lunaria/files/en-US.json
  • lunaria/files/fr-FR.json
  • test/nuxt/components/PackageWeeklyDownloadStats.spec.ts

@serhalp serhalp enabled auto-merge February 28, 2026 17:00
@serhalp serhalp added this pull request to the merge queue Feb 28, 2026
Merged via the queue into main with commit 80dc9be Feb 28, 2026
21 checks passed
@serhalp serhalp deleted the serhalp/empty-search-subheading branch February 28, 2026 17:04
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.

weekly downloads not refresh when version changes

2 participants