Skip to content

fix(ktoaster): deprecate zindex prop, set z-index on toaster container#3093

Open
portikM wants to merge 1 commit intomainfrom
fix/ktoaster-zindex-on-shared-container
Open

fix(ktoaster): deprecate zindex prop, set z-index on toaster container#3093
portikM wants to merge 1 commit intomainfrom
fix/ktoaster-zindex-on-shared-container

Conversation

@portikM
Copy link
Member

@portikM portikM commented Feb 17, 2026

Summary

  • Deprecate zIndex prop in KToaster component
  • Instead of setting provided zIndex on nested .k-toaster element, set it on shared toaster container (top-level element)

@portikM portikM self-assigned this Feb 17, 2026
@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit 6c4141f
🔍 Latest deploy log https://app.netlify.com/projects/kongponents-sandbox/deploys/6994aa496391010008ada38a
😎 Deploy Preview https://deploy-preview-3093--kongponents-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit 6c4141f
🔍 Latest deploy log https://app.netlify.com/projects/kongponents/deploys/6994aa498ac9d70007814588
😎 Deploy Preview https://deploy-preview-3093--kongponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kongponents-bot
Copy link
Collaborator

Preview package from this PR in consuming application

In consuming application project install preview version of kongponents generated by this PR:

@kong/kongponents@pr-3093

message: 'This is toaster with timeout (10s)',
appearance: 'info',
timeoutMilliseconds: 10000,
timeoutMilliseconds: 1000000,
Copy link
Member

Choose a reason for hiding this comment

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

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.
Copy link
Member

Choose a reason for hiding this comment

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

Leave the @default 10000 comment in place along with this new @deprecated

expect(container).to.have.css('z-index', '10000')

// Cleanup
toastManager.destroy()
Copy link
Member

Choose a reason for hiding this comment

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

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 {
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: make this an object interface in case we need to add more properties later

Suggested change
function getOrCreateSharedContainer(zIndex: number): HTMLElement {
function getOrCreateSharedContainer({ zIndex }: { zIndex: number }): HTMLElement {

Also, should the default value be enforced here?

@kongponents-bot
Copy link
Collaborator

🔴 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.

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.

3 participants