Skip to content

Conversation

@Harkunwar
Copy link
Contributor

Description

Adding a stateless version of ChangeHistory component which can be potentially be used without JavaScript enabled.
image

Validation

Tested by rendering a few different versions in Storybook

Related Issues

Related to nodejs/doc-kit#10 (comment)

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Copilot AI review requested due to automatic review settings June 15, 2025 21:31
@Harkunwar Harkunwar requested a review from a team as a code owner June 15, 2025 21:31
@vercel
Copy link

vercel bot commented Jun 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jun 16, 2025 4:15pm

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Jun 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.46%. Comparing base (1ccf19c) to head (25723f7).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7869   +/-   ##
=======================================
  Coverage   75.46%   75.46%           
=======================================
  Files         101      101           
  Lines        8306     8306           
  Branches      218      218           
=======================================
  Hits         6268     6268           
  Misses       2036     2036           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This comment was marked as outdated.

@Harkunwar Harkunwar requested a review from Copilot June 15, 2025 21:41

This comment was marked as outdated.

Copy link
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

This PR introduces a new stateless ChangeHistory component to display version change logs in a non-JS dropdown, along with associated styles and Storybook stories.

  • Adds ChangeHistory React component with customizable label, alignment, and change entries
  • Includes CSS module for styling the dropdown and summary states
  • Provides Storybook stories demonstrating default, no‐changes, left‐aligned, and large history scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/ui-components/Common/ChangeHistory/index.tsx New ChangeHistory component implementation
packages/ui-components/Common/ChangeHistory/index.module.css Styles for the summary button and dropdown menu
packages/ui-components/Common/ChangeHistory/index.stories.tsx Storybook demos covering various component states
Comments suppressed due to low confidence (1)

packages/ui-components/Common/ChangeHistory/index.tsx:50

  • [nitpick] This ariaLabel variable shadows the outer ariaLabel prop name, which can be confusing. Consider renaming it to something like itemAriaLabel to improve clarity.
const ariaLabel = `${change.label}: ${change.versions.join(', ')}`;

@avivkeller avivkeller changed the title feat(ui-components): add change history component feat(ui-components): add `ChangeHistory' Jun 15, 2025
@avivkeller avivkeller changed the title feat(ui-components): add `ChangeHistory' feat(ui-components): add ChangeHistory Jun 15, 2025
Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Almost there!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 15, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 97 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟠 82 🟢 96 🟢 100 🟠 82 🔗
/en/about/previous-releases 🟢 99 🟢 96 🟢 100 🟠 83 🔗
/en/download 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

Harkunwar and others added 2 commits June 16, 2025 00:35
Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Harkunwar and others added 2 commits June 16, 2025 09:13
Co-authored-by: Caner Akdas <canerakdas@gmail.com>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
Co-authored-by: Caner Akdas <canerakdas@gmail.com>
Signed-off-by: Harkunwar Kochar <10580591+Harkunwar@users.noreply.github.com>
@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Jun 17, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jun 17, 2025
@Harkunwar Harkunwar added this pull request to the merge queue Jun 17, 2025
Merged via the queue into nodejs:main with commit 8cf10eb Jun 17, 2025
19 checks passed
@Harkunwar Harkunwar deleted the feat/change-history-component branch June 17, 2025 05:23
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.

5 participants