Skip to content

fix: correct the code style in the hover status - #9142

Open
btea wants to merge 4 commits into
nodejs:mainfrom
btea:fix/changehistory-dropdown-code-style
Open

fix: correct the code style in the hover status#9142
btea wants to merge 4 commits into
nodejs:mainfrom
btea:fix/changehistory-dropdown-code-style

Conversation

@btea

@btea btea commented Sep 4, 2026

Copy link
Copy Markdown

Description

sync nodejs/doc-kit#1080

Validation

Related Issues

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 lite review requested due to automatic review settings September 4, 2026 04:42
@btea
btea requested a review from a team as a code owner September 4, 2026 04:42
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
nodejs-org Ready Ready Preview Sep 4, 2026 10:47am UTC

Request Review

Copilot AI 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.

🟡 Changes recommended

The new hover-only light-theme override should also apply for :focus-visible to avoid inconsistent/incorrect styling for keyboard users.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR syncs a styling fix from doc-kit to adjust how inline code is colored when a ChangeHistory dropdown item is hovered, specifically under the light theme.

Changes:

  • Adds a light-theme-specific CSS rule to override code text color on dropdown item hover.
File summaries
File Description
packages/ui-components/src/Common/ChangeHistory/index.module.css Adds a light-theme hover override for inline code styling within dropdown items.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/ui-components/src/Common/ChangeHistory/index.module.css Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: btea <2356281422@qq.com>

@AugustinMauroy AugustinMauroy 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.

Could you add a story that allow us to see that this issue is fixed

Comment thread packages/ui-components/src/Common/ChangeHistory/index.module.css Outdated
@btea

btea commented Sep 4, 2026

Copy link
Copy Markdown
Author

Could you add a story that allow us to see that this issue is fixed

I added a brief note.

@AugustinMauroy

Copy link
Copy Markdown
Member

oh nice but I mean a story of storybook you have to update this file to have code in children https://github.com/nodejs/nodejs.org/blob/main/packages/ui-components/src/Common/ChangeHistory/index.stories.tsx

we use chromatic to automatically deploy storybook like vercel do for website

@btea

btea commented Sep 4, 2026

Copy link
Copy Markdown
Author

Thank you for your detailed explanation. 👍
I will update it.

decorators: [
withThemeByDataAttribute<ReactRenderer>({
themes: { light: '', dark: 'dark' },
themes: { light: 'light', dark: 'dark' },

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Add specific attribute values ​​to ensure that the newly added class can be matched in the storybook.

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.

4 participants