siemens / ix

Siemens Industrial Experience is a design system for designers and developers, to consistently create the perfect digital experience for industrial software products.
https://ix.siemens.io/
MIT License
203 stars 69 forks source link

setToastPosition doesn't work when project launched from index.html #1381

Open James-Richardson opened 3 months ago

James-Richardson commented 3 months ago

Prerequisites

What happened?

If you're using Siemens iX toasts, and you're using setToastPosition('top-right'), if you then npm run build your project, and double-click on index.html, toasts are still positioned in the default bottom-right corner.

If you npm start on the code I've added to reproduce the issue, and click on the button, toasts appear in the top-right. But if you npm run build the application, and double-click on index.html, toasts appear in the bottom-right.

The workaround is to add an <IxToastContainer /> to App.js as follows:

  return (
    <>
      <IxToastContainer />
      <IxApplication>
        ⋮
      </IxApplication>
    </>
  );

What type of frontend framework are you seeing the problem on?

React

Which version of iX do you use?

v2.3.0

Code to produce this issue.

https://code.siemens.com/j.richardson/react-siemens-ix-toast
github-actions[bot] commented 3 months ago

🤖 Hello @James-Richardson

Your issue will be analyzed and is part of our internal workflow. To get informed about our workflow please checkout the Contributing Guidelines

JIRA: IX-1460