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

[Carbon Web Components]: Investigation of a stable selector model for components #17581

Open
2 tasks done
jeffchew opened this issue Mar 7, 2023 · 2 comments
Open
2 tasks done
Labels
package: @carbon/web-components @carbon/web-components

Comments

@jeffchew
Copy link
Member

jeffchew commented Mar 7, 2023

The problem

This is in tandem with the following issue opened for Carbon React:
#13300

Access to the DOM currently is based on classes and other means, which ultimately may have things like unit tests, e2e tests, a/b tests, personalization campaigns, etc, become brittle when UI code changes occur.

The solution

The Carbon for IBM.com team has adopted early on a stable selector approach, which has since been heavily adopted as a model even outside of the Carbon for IBM.com library by the digital insights team in Marketing.

https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/docs/stable-selectors.md

This issue (which may ultimately become an epic) will explore a way of adding stable selector identifiers within the code base for the benefit of testing and campaigns.

Application/website

Head of Engineering, Carbon Design System

Business priority

Medium Priority = upcoming release but is not pressing

What time frame would this ideally be needed by (if applicable)

This should hopefully be something added into 2.x of Carbon Web Components

Examples

Carbon for IBM.com storybooks:

Web Components:
https://www.ibm.com/standards/carbon/web-componensts

React:
https://www.ibm.com/standards/carbon/react

Code of Conduct

@stale
Copy link

stale bot commented May 26, 2023

We've marked this issue as stale because there hasn't been any activity for 60 days. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@kennylam kennylam transferred this issue from carbon-design-system/carbon-for-ibm-dotcom Sep 25, 2024
@kennylam
Copy link
Member

React effort tracked in #9648.

@kennylam kennylam added the package: @carbon/web-components @carbon/web-components label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: @carbon/web-components @carbon/web-components
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

6 participants