Skip to content
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

IX css is affecting non-ix components #1398

Open
2 tasks done
daniel-dinges opened this issue Jul 22, 2024 · 5 comments · Fixed by #1758
Open
2 tasks done

IX css is affecting non-ix components #1398

daniel-dinges opened this issue Jul 22, 2024 · 5 comments · Fixed by #1758
Labels
type: enhancement New feature or request Workflow: Issue created JIRA issue is created and will be analyzed

Comments

@daniel-dinges
Copy link

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

Problem

An Insights Hub application started to use IX for their UI.
The IX css applies styles to native elements like lables, inputs without the use of any namespacing.
Thus, it is overriding elements of non-IX components.
This becomes an issue, as Insights Hub applications have to include the "OS Header" from Insights Hub.
Furthermore this will prevent existing applications from adopting IX in a step-wise way.

Example

image
image

Possible Solution(s)

  • Namespacing the CSS so that developers have to add a class to a container (can be body or html too) which should use IX within.
  • Do not apply styles to native elements by default, rather provide an additional class so developers can actively choose to use this rather error prone approach

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

Others

Which version of iX do you use?

x.x.x

Code to produce this issue.

unfortunately I do not have access to the specific application that raised the issue.
@daniel-dinges daniel-dinges added the triage We discuss this topic in our internal weekly label Jul 22, 2024
@matthiashader matthiashader added type: enhancement New feature or request Workflow: Issue created JIRA issue is created and will be analyzed and removed triage We discuss this topic in our internal weekly labels Jul 23, 2024
Copy link
Contributor

github-actions bot commented Jul 23, 2024

🤖 Hello @daniel-dinges

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-1503

@ruqzuq
Copy link

ruqzuq commented Oct 31, 2024

@matthiashader Are there any plans to solve this issue in the near future?

In my view, it is a showstopper for integrating Siemens iX into enterprise code bases. I would like to include iX in our stack and promote it, but side effects on the overall HMI are unacceptable.
You could rebuild the entire styles without compromising on flexibility and performance, as fluentui does, for example:
https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-button/library/src/components/Button/useButtonStyles.styles.ts

Would help be welcome here? @danielleroux @nuke-ellington

@daniel-dinges
Copy link
Author

Hello @danielleroux @matthiashader i am happy to see some progress on this issue after ~7 months (apologies for the sarcasm ;-))

We just saw another similar problem today, in which the box-sizing is overwritten with a wildcard selector
Image

Is this also fixed with pull request?

@danielleroux
Copy link
Collaborator

Hello @danielleroux @matthiashader i am happy to see some progress on this issue after ~7 months (apologies for the sarcasm ;-))

We just saw another similar problem today, in which the box-sizing is overwritten with a wildcard selector Image

Is this also fixed with pull request?

No problem we try to solve it as fast as possible and have to keep in mind not to break existing applications. Any contributions in form of pull requests are super welcome.

@danielleroux
Copy link
Collaborator

Regarding box-size we followed the way like bootstrap did it: https://getbootstrap.com/docs/5.3/getting-started/introduction/#box-sizing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request Workflow: Issue created JIRA issue is created and will be analyzed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants