Skip to content

Conversation

@alexkaduk
Copy link
Collaborator

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

🦋 Changeset detected

Latest commit: 0a7f7c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@siemens/ix Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @alexkaduk, 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 resolves an issue where the invalidText property was not being correctly applied to the ix-date-input and ix-time-input components when internal validation errors occurred. Previously, internationalization (i18n) error messages would always be shown, overriding any custom invalidText set by the user. The changes ensure that the custom invalidText property now takes precedence, providing a more consistent and customizable error message experience for users.

Highlights

  • Invalid Text Precedence Fix: The invalidText property in ix-date-input and ix-time-input components now correctly takes precedence over i18n error messages when internal validation fails (e.g., unparsable dates/times or min/max violations).
  • Logic Update in Render Method: The render method in both date-input.tsx and time-input.tsx was updated to prioritize the invalidText property, ensuring it is displayed if provided, before falling back to i18n error messages.
  • New Regression Tests: Dedicated regression tests were added for both ix-date-input and ix-time-input to verify that the custom invalidText property is correctly displayed when an invalid input is provided and internal validation triggers an error.
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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 fixes an issue where the invalidText property was not being applied on ix-date-input and ix-time-input for internal validation errors. The changes correctly prioritize the invalidText prop over the default i18n error messages. The addition of regression tests for both components is great and ensures this behavior is maintained. I've added a couple of suggestions to improve the readability of the new logic in both components, making the code more maintainable.

@alexkaduk
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 addresses a bug where the invalidText property was not being correctly applied in the ix-date-input and ix-time-input components during internal validation failures. The proposed changes correctly prioritize the user-provided invalidText over the default i18n error messages. The logic is sound, and the inclusion of new regression tests is a great addition to prevent future issues. My main feedback is to separate stylistic changes, such as reordering imports, from functional code changes to maintain a clean and focused commit history.

@alexkaduk
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 effectively addresses the issue where the invalidText property was not being applied on ix-date-input and ix-time-input during internal validation failures. The introduction of the getValidationText utility function centralizes the logic for determining the validation message, and the changes in the components correctly apply this new function. The addition of regression tests for both components is excellent, ensuring this behavior is maintained. I have one suggestion to improve the readability of the new getValidationText function for better long-term maintainability.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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