Skip to content

✨ Preview settings#171

Merged
patou merged 1 commit into
masterfrom
new-preview-settings
Dec 10, 2025
Merged

✨ Preview settings#171
patou merged 1 commit into
masterfrom
new-preview-settings

Conversation

@patou

@patou patou commented Dec 10, 2025

Copy link
Copy Markdown
Owner

Add a preview in the settings page.
Capture d'écran 2025-12-10 182002

@patou patou requested a review from Copilot December 10, 2025 22:39
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @patou, 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 significantly enhances the user experience of the Gitmoji plugin by integrating a live preview feature directly into the settings page. Users can now instantly see how their Gitmoji-enhanced commit messages will render based on their chosen preferences, such as whether to use Unicode emojis, include descriptions, or insert at the cursor's position. This visual feedback mechanism simplifies configuration and ensures that the generated commit messages align perfectly with user expectations.

Highlights

  • Real-time Preview: Introduced a dynamic preview area in the settings page to visualize Gitmoji commit messages as configuration options are adjusted.
  • Dynamic Updates: The preview updates automatically based on selections for Unicode usage, cursor position, description inclusion, and language.
  • UI Enhancements: Added new UI components and layout adjustments to the GitMojiConfig settings panel, including separators for better organization.
  • Localization Support: Extended localization files to include new strings for the 'Settings' and 'Preview' sections, supporting multiple languages.
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

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 helpful preview feature to the settings page, allowing users to see how their gitmoji commit messages will be formatted. The implementation is mostly solid, using modern IntelliJ UI components. However, I've found a couple of issues: a significant maintainability problem with hardcoded translations for the preview text, and a minor logic bug in the preview generation itself. My review includes suggestions to address both of these points by refactoring the translation handling to use resource bundles and fixing the preview logic.

Comment thread src/main/kotlin/com/github/patou/gitmoji/GitMojiConfig.kt
Comment thread src/main/kotlin/com/github/patou/gitmoji/GitMojiConfig.kt

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.

Pull request overview

This PR adds a preview feature to the Gitmoji plugin settings page, allowing users to see how their configuration choices will affect the commit message format in real-time.

  • Adds a visual preview area in the settings UI that demonstrates commit message formatting
  • Implements dynamic preview updates when settings are changed
  • Adds internationalization support for preview text in multiple languages

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/kotlin/com/github/patou/gitmoji/GitMojiConfig.kt Adds preview panel with JTextArea, implements updatePreview() method with real-time updates, and adds getTranslatedString() for preview text localization
src/main/resources/messages/GitmojiBundle.properties Adds English translations for "Settings" and "Preview" separator labels
src/main/resources/messages/GitmojiBundle_fr_FR.properties Adds French translations for "Settings" and "Preview" separator labels
src/main/resources/messages/GitmojiBundle_zh_CN.properties Adds Chinese translations for "Settings" and "Preview" separator labels
CHANGELOG.md Documents the new preview feature in the unreleased changes section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/kotlin/com/github/patou/gitmoji/GitMojiConfig.kt
@github-actions

Copy link
Copy Markdown
Contributor

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.2.3
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@patou patou merged commit eb6192b into master Dec 10, 2025
12 checks passed
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.

2 participants