Skip to content

feature: item preview color picker - #183

Merged
Aarebecca merged 6 commits into
antvis:mainfrom
taosin:feature/item-preview-color-picker
Jan 26, 2026
Merged

Aarebecca merged 6 commits into
antvis:mainfrom
taosin:feature/item-preview-color-picker

Conversation

@taosin

@taosin taosin commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

Now:
image
After:
image

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @taosin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the ItemPreview component by integrating a color picker, empowering users to customize the primary color of the displayed items. This customization is made persistent across sessions through local storage, improving the overall user experience by allowing for personalized visual themes. The changes are thoroughly tested with newly added unit tests.

Highlights

  • New Color Picker Integration: An Ant Design ColorPicker component has been added to the ItemPreview component, allowing users to dynamically select and apply a primary color to the displayed items.
  • Primary Color Persistence: The selected primary color is now stored in local storage, ensuring that user preferences are saved and automatically reloaded when the ItemPreview component is accessed again.
  • Dynamic Theme Configuration: The themeConfig state in ItemPreview now incorporates the user-selected colorPrimary, enabling real-time visual updates based on the chosen color.
  • Comprehensive Unit Tests: A new test file (__tests__/unit/dev/ItemPreview.test.tsx) has been added, providing extensive unit tests for the color functionality, covering initialization, persistence, color picker integration, and theme color application.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds a color picker to the item preview page, allowing users to change the primary color and persist it in local storage. The implementation of the feature in the component is well done. However, the accompanying tests are not effective as they don't actually test the component's behavior, which is a significant issue that needs to be addressed. I've also included a couple of suggestions to improve code maintainability and style. With the tests fixed, this will be a solid contribution.

Comment thread __tests__/unit/dev/ItemPreview.test.tsx Resolved
Comment thread dev/src/ItemPreview.tsx Resolved
Comment thread dev/src/ItemPreview.tsx Resolved
taosin and others added 4 commits January 24, 2026 13:14
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ditional properties and improve component mock signature
@Aarebecca Aarebecca changed the title Feature/item preview color picker Jan 26, 2026
@Aarebecca

Copy link
Copy Markdown
Contributor

@taosin Good job 👍 Thanks for your contribution 🎉

@Aarebecca
Aarebecca merged commit 176b929 into antvis:main Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants