Skip to content

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

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

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

Conversation

@serhalp

@serhalpserhalp commented Feb 28, 2026

Copy link
Copy Markdown
Member

🔗 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

vercelBot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentFeb 28, 2026 4:59pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewFeb 28, 2026 4:59pm
npmx-lunariaIgnoredIgnoredFeb 28, 2026 4:59pm

Request Review

@graphieros

Copy link
Copy Markdown
Member

lol you beat me to it ^^

@serhalpserhalp changed the title feat: add 'across all versions' subtitle to weekly downloads sectionfeat(ui): add subheading to weekly downloads to clarify scopeFeb 28, 2026
@github-actions

github-actionsBot commented Feb 28, 2026

Copy link
Copy Markdown

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

FileNote
lunaria/files/en-GB.jsonLocalization changed, will be marked as complete.
lunaria/files/en-US.jsonSource changed, localizations will be marked as outdated.
lunaria/files/fr-FR.jsonLocalization changed, will be marked as complete.
Warnings reference
IconDescription
🔄️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

codecovBot commented Feb 28, 2026

Copy link
Copy Markdown

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 linesPatch %Lines
app/components/Package/WeeklyDownloadStats.vue50.00%2 Missing and 2 partials ⚠️
app/components/Modal.client.vue75.00%1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@graphieros

Copy link
Copy Markdown
Member

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

@graphierosgraphieros left a comment

Copy link
Copy Markdown
Member

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

coderabbitaiBot commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

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 nameStatusExplanation
Description check✅ PassedThe 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✅ PassedAll 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✅ PassedAll 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

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

Comment threadapp/components/Modal.client.vue
@serhalp
serhalp enabled auto-merge February 28, 2026 17:00
@serhalp
serhalp added this pull request to the merge queueFeb 28, 2026
Merged via the queue into main with commit 80dc9beFeb 28, 2026
21 checks passed
@serhalp
serhalp deleted the serhalp/empty-search-subheading branch February 28, 2026 17:04
Sign up for freeto 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

@serhalp@graphieros