Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@1307-Dev
Copy link
Contributor

💡 What is the current behavior?

Currently there is not close function for modal when used in angular, react and vue

GitHub Issue Number: #
JIRA- IX-1318

🆕 What is the new behavior?

Modal now has a close function which can be accessed from outside to close modal based on custom logic.

🏁 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 Sep 22, 2025

🦋 Changeset detected

Latest commit: e1b3f1e

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

This PR includes changesets to release 3 packages
Name Type
@siemens/ix-angular Patch
@siemens/ix-react Patch
@siemens/ix-vue 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

@1307-Dev 1307-Dev marked this pull request as ready for review September 29, 2025 02:51
Copy link
Collaborator

@nuke-ellington nuke-ellington left a comment

Choose a reason for hiding this comment

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

We should add some unit tests where applicable.

return super.open(config);
}

public close<TReason = any>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this really needed? Will be inherited from base ModalService, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have implemented it similar to the open service, should changes be made there too?

@nuke-ellington
Copy link
Collaborator

/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 introduces a valuable feature for programmatically closing modals. The implementation for Angular is solid. However, there are a few points of improvement for the React and Vue wrappers to ensure consistency and robustness. I've noted a potential runtime error in the Vue implementation and suggested aligning the React and Vue APIs with the other frameworks by exposing a closeModal function.

@sonarqubecloud
Copy link

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