Skip to content

Comments

refactor(schematics): update schematics for modal initialstate#1539

Draft
akashsonune wants to merge 1 commit intomainfrom
refactor/update-schematics-for-modal-initialstate
Draft

refactor(schematics): update schematics for modal initialstate#1539
akashsonune wants to merge 1 commit intomainfrom
refactor/update-schematics-for-modal-initialstate

Conversation

@akashsonune
Copy link
Member

Describe in detail what your merge request does and why. Add relevant
screenshots and reference related issues via Closes #XY or Related to #XY.


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 adds a schematic to migrate the initialState property of ModalOptions to inputValues. The implementation is a good start, and the suggestion to make the module matching more robust by anchoring the regex has been retained. Additionally, this change would benefit from having tests to ensure the migration works as expected and to prevent future regressions. Please consider adding a test case for this migration.

]
},
{
module: /@(siemens|simpl)\/element-ng(\/modal)?/,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The regular expression for the module path is not anchored. This could lead to incorrect matches if a module path contains @(siemens|simpl)/element-ng(/modal)? as a substring. To ensure an exact match, it's better to anchor the regex with ^ and $.

Suggested change
module: /@(siemens|simpl)\/element-ng(\/modal)?/,
module: /^@(siemens|simpl)\/element-ng(\/modal)?$/,

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