-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(datetime): remove ion-buttons to fix CSP violations #30770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
df13f40 to
340c060
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared this test locally with what's on next and saw no differences so this appears to be a Playwright rendering issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared this test locally with what's on next and saw no differences so this appears to be a Playwright rendering issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared this test locally with what's on next and saw no differences so this appears to be a Playwright rendering issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared this test locally with what's on next and saw no differences so this appears to be a Playwright rendering issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was renamed to custom-clear-button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is new - we were not previously capturing how it looks when passing more than 1 custom button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is new - we were not previously capturing how it looks when passing more than 1 custom button. You can compare how this looks to the docs example: https://ionicframework.com/docs/api/datetime#customizing-button-elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the existing test for custom buttons (one button passed) and then added 2 more tests showing how it looks when you pass 2 or 3 buttons to make sure the behavior was the same as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I compared this test locally with what's on next and saw no differences so I think this might just be Playwright: https://ionic-framework-git-next-ionic1.vercel.app/src/components/datetime/test/custom

Issue number: N/A
What is the current behavior?
The Datetime component breaks CSP rules due to the following:
ion-buttonswhich usesscopedencapsulation.ionictheme, it imports Phosphor icons as data URIs, which are blocked byconnect-src 'self' blob:.What is the new behavior?
ion-buttons, removing the dependency on a scoped componention-buttonsion-buttonto change its styles based on being inside of anion-datetimePhosphor icons have not been removed because there is a workaround for it and we will remove its usage across all components in future work.
Does this introduce a breaking change?
This shouldn't cause breaking changes but because we are no longer recommending users use
ion-buttonswith custom buttons I am marking it as a breaking change.