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

Adopt best practices or considerations for modifying EDS components responsibly #3709

Open
v3gard opened this issue Dec 18, 2024 · 0 comments

Comments

@v3gard
Copy link

v3gard commented Dec 18, 2024

Is your feature request related to a problem? Please describe.

In our team discussions, we are evaluating the extent to which custom styling should be applied to EDS components. We aim to balance customization with maintaining compatibility and adhering to best practices.

Specifically, we’re curious if there are existing guidelines or governance policies for EDS components that discourage or outright recommend against applying custom styles. For example, one scenario we’re considering involves disabling the hover effect on Table.Row for one particular usecase. While this is technically straightforward to implement using styled-components, we are mindful of potential risks such as breaking compatibility with future EDS updates.

Describe the solution you'd like

We would like to have official guidelines on the topic, preferably with references to the Lindesnes IT strategy and the Equinor governance. Additionally, if there are best practices or considerations for modifying EDS components responsibly, we would greatly appreciate your insights. 🙏

The specific reason we have for disabling the hover effect in our use case, is that the hover color does not harmonize well with <Button variant='ghost'/>. Disabling the hover effect in that particular use case gave us the look we desired.

Example from CodeSandbox:

https://codesandbox.io/p/sandbox/trusting-frost-3qmhf3?file=%2Fsrc%2FApp.tsx%3A13%2C29-13%2C34

Default Hover disabled
Image Image

Describe alternatives you've considered

  1. Prefer <Button variant='outline'/> over <Button variant='ghost'/> in this particular usecase.
  2. Every developer team applies custom stylings themselves without any overall guidance and best practices, leading to future issues that can impact shared EDS features such as dark/compact mode.

Additional context

See discussion on Slack: https://equinor.slack.com/archives/CJT20H1B9/p1734503983745689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant