Skip to content

fix(core/buttons): Update button examples according to new variant naming#2369

Closed
GayatriK2002 wants to merge 6 commits intosiemens:mainfrom
GayatriK2002:fix-3885/update-button-examples-new-naming
Closed

fix(core/buttons): Update button examples according to new variant naming#2369
GayatriK2002 wants to merge 6 commits intosiemens:mainfrom
GayatriK2002:fix-3885/update-button-examples-new-naming

Conversation

@GayatriK2002
Copy link
Collaborator

💡 What is the current behavior?

  • All button preview examples are not according to the new variant naming.

GitHub Issue Number: #
Jira Issue Number: 3885

🆕 What is the new behavior?

  • All button preview examples have been updated to align with the new variant naming.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

⚠️ No Changeset found

Latest commit: b7c72ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @GayatriK2002, 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 refactors the button examples across the Angular standalone, Angular, React, and HTML test applications to adhere to a new, standardized button variant naming convention. It involves renaming existing button examples for consistency and introducing new danger button variants. These changes ensure that all button preview examples accurately reflect the updated design system guidelines, improving clarity and maintainability for developers.

Highlights

  • Button Variant Renaming: Existing button examples (e.g., 'ghost', 'grey', 'grey-ghost', 'grey-secondary') have been systematically renamed to align with a new, consistent variant naming convention (e.g., 'tertiary', 'secondary', 'subtle-tertiary', 'subtle-secondary', 'subtle-primary').
  • Introduction of Danger Button Variants: New example files and corresponding routes have been added for danger-primary, danger-secondary, and danger-tertiary button variants, expanding the available button styles.
  • Test Application Updates: The routing configurations and component/module imports within the Angular standalone, Angular, React, and HTML test applications have been comprehensively updated to reflect all the renamed and newly introduced button examples, ensuring their correct display and navigation.
  • Link Button Example Refinements: The button-with-link examples across all test applications have been adjusted to utilize the new button variant names, replacing older danger, outline, and ghost attributes with danger-primary, secondary, and tertiary variants.
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 updates the button examples across the different test applications to align with the new button variant naming scheme. The changes mostly involve renaming files, updating variant properties in the code, and adjusting application routes.

Overall, the changes are in the right direction. However, I've found a few issues:

  • There are inconsistencies in the route mappings for the updated button examples in both the Angular and React test apps, where some paths seem to be swapped.
  • There's a minor typo in one of the Angular example files.
  • Some redundant CSS files are being added to the Vue test app, which will be overwritten during the build process.

I've left specific comments with suggestions for each of these points. Please address them to ensure consistency and maintainability.

Comment on lines +340 to 354
path: 'button-tertiary',
component: ButtonTertiary,
},
{
path: 'button-grey-ghost',
component: ButtonGreyGhost,
path: 'button-secondary',
component: ButtonSecondary,
},
{
path: 'button-grey-secondary',
component: ButtonGreySecondary,
path: 'button-subtle-secondary',
component: ButtonSubtleSecondary,
},
{
path: 'button-grey',
component: ButtonGrey,
path: 'button-subtle-tertiary',
component: ButtonSubtleTertiary,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The route path updates for button-secondary and button-subtle-tertiary seem to be swapped. The old button-grey-ghost path should now be button-subtle-tertiary, and the old button-grey path should be button-secondary. The current implementation has this reversed. This is inconsistent with the changes in packages/angular-standalone-test-app/src/app/app.routes.ts. Please correct the paths and components.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file names are correctly mapped to their variant values, not to old file names.

Comment on lines +285 to 289
<Route path="/preview/button-secondary" element={<ButtonSecondary />} />
<Route
path="/preview/button-grey-ghost"
element={<ButtonGreyGhost />}
path="/preview/button-tertiary"
element={<ButtonTertiary />}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The route path updates seem to be swapped. The route that was /preview/button-ghost is now /preview/button-secondary, and the one that was /preview/button-grey-ghost is now /preview/button-tertiary. Based on the variant renaming, it should be the other way around (button-ghost -> tertiary, button-grey -> secondary). Please check the mappings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file names are correctly mapped to their variant values, not to old file names.

Comment on lines 32 to 33
<ix-button href="https://siemens.com" variant="secondary"> secondary Link </ix-button>
<ix-button href="https://siemens.com" variant="tertiary"> tertiary Link </ix-button>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There are typos in the button labels. 'secondary' and 'tertiary' should be capitalized for consistency with other examples (e.g., packages/html-test-app/src/preview-examples/button-with-link.html).

Suggested change
<ix-button href="https://siemens.com" variant="secondary"> secondary Link </ix-button>
<ix-button href="https://siemens.com" variant="tertiary"> tertiary Link </ix-button>
<ix-button href="https://siemens.com" variant="secondary"> Secondary Link </ix-button>
<ix-button href="https://siemens.com" variant="tertiary"> Tertiary Link </ix-button>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Comment on lines 1 to 20
/*
* SPDX-FileCopyrightText: 2024 Siemens AG
*
* SPDX-License-Identifier: MIT
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* Styles get overwritten by html-test-app css files each build or dev task.
* If you want to modify the example styles do this only inside the html-test-app
*/

body {
display: flex;
}

ix-button {
margin: 0.25rem;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These new CSS files seem redundant. The vite.config.ts for vue-test-app copies all CSS files from html-test-app/src/preview-examples on build. Since the corresponding new CSS files are already being added to html-test-app, these files in vue-test-app will just be overwritten. To avoid confusion and redundancy, consider removing these newly added CSS files from the vue-test-app directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These CSS files were auto-generated during the build process from html-test-app via vite.config.ts. Vue examples use the copied CSS files now.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 4, 2026

@GayatriK2002
Copy link
Collaborator Author

Closing this PR due to merge conflicts.

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.

1 participant