Write a codemod for moving from core-react Dialog to itwinui-react Dialog. Similar codemods should be written for core-react GlobalDialog and ModelessDialog.
List of unsupported* core-react Dialog attributes:
inset [can be just removed]
buttonCluster [will be handled initially but it is highly recommended for the user to manually parse buttons contained in the button cluster]
alignment [itwinui-react Dialog has attribute "placement" but it supports only 4 sides of the screen when core-dialog supports 8]
x & y [could probably be achieved through Dialog.Main style changes to "top" and "left"]
modelessId [should just be removed or integrated in some other way]
onModelessPointerDown [should just be removed or integrated in some other way]
onEscape [should be changed to "closeOnEsc={true}" if relevant]
spread operator [there is no way for codemod to discern what attributes the spread operator contains, attributes should be written explicitly for codemod to work]
codemod will not affect these attributes and will leave them unmodified (api will break if these attributes were present) - consumer will have to decide how to handle these attributes
Write a codemod for moving from core-react Dialog to itwinui-react Dialog. Similar codemods should be written for core-react GlobalDialog and ModelessDialog.
List of unsupported* core-react Dialog attributes:
inset [can be just removed]
buttonCluster [will be handled initially but it is highly recommended for the user to manually parse buttons contained in the button cluster]
alignment [itwinui-react Dialog has attribute "placement" but it supports only 4 sides of the screen when core-dialog supports 8]
x & y [could probably be achieved through Dialog.Main style changes to "top" and "left"]
modelessId [should just be removed or integrated in some other way]
onModelessPointerDown [should just be removed or integrated in some other way]
onEscape [should be changed to "closeOnEsc={true}" if relevant]
spread operator [there is no way for codemod to discern what attributes the spread operator contains, attributes should be written explicitly for codemod to work]
codemod will not affect these attributes and will leave them unmodified (api will break if these attributes were present) - consumer will have to decide how to handle these attributes