fix(ktoaster): deprecate zindex prop, set z-index on toaster container#3093
fix(ktoaster): deprecate zindex prop, set z-index on toaster container#3093
Conversation
✅ Deploy Preview for kongponents-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kongponents ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Preview package from this PR in consuming applicationIn consuming application project install preview version of kongponents generated by this PR: |
| message: 'This is toaster with timeout (10s)', | ||
| appearance: 'info', | ||
| timeoutMilliseconds: 10000, | ||
| timeoutMilliseconds: 1000000, |
There was a problem hiding this comment.
issue: why is this changing to 1,000 seconds? (I know this is sandbox only)
| /** | ||
| * The z-index of the toaster. | ||
| * @default 10000 | ||
| * @deprecated zIndex provided through ToasterOptions is set on the shared container on initialization. This prop is no longer used. |
There was a problem hiding this comment.
Leave the @default 10000 comment in place along with this new @deprecated
| expect(container).to.have.css('z-index', '10000') | ||
|
|
||
| // Cleanup | ||
| toastManager.destroy() |
There was a problem hiding this comment.
nit: would it make sense to call destroy in an afterEach hook for the whole file?
| * Increments the reference count for tracking active instances. | ||
| */ | ||
| function getOrCreateSharedContainer(): HTMLElement { | ||
| function getOrCreateSharedContainer(zIndex: number): HTMLElement { |
There was a problem hiding this comment.
suggestion: make this an object interface in case we need to add more properties later
| function getOrCreateSharedContainer(zIndex: number): HTMLElement { | |
| function getOrCreateSharedContainer({ zIndex }: { zIndex: number }): HTMLElement { |
Also, should the default value be enforced here?
🔴 PR audit failed. 🔴🔥 Old Open Renovate PRs detected.There are 5 open renovate PRs created more than 30 days ago. PR cannot be merged until those old open renovate PRs are resolved. |
Summary
zIndexon nested.k-toasterelement, set it on shared toaster container (top-level element)