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

Find a way to test assigning values via properties and attributes #10958

Open
driskull opened this issue Dec 3, 2024 · 0 comments
Open

Find a way to test assigning values via properties and attributes #10958

driskull opened this issue Dec 3, 2024 · 0 comments
Labels
0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@driskull
Copy link
Member

driskull commented Dec 3, 2024

Background

Not all properties are reflected to the DOM, however we have a lot of CSS that relies on attribute selectors on the host.

If a property isn't reflected but a attribute selector is used in styles, we may not catch the rendering issue since all of our tests and stories rely on attributes

We need to figure out a way to test components by assigning via attributes and properties

Example:

Input.scss has the following CSS:

:host([prefix-text]) input {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

However, the property prefixText is not reflected.

The HTML examples use attributes and the screenshot tests use attributes so this error would not be caught if assignign prefixText via a property.

Desired Outcome

Ensuring that assigning values via properties renders the component correctly.

Related to #10959.

@driskull driskull added 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. labels Dec 3, 2024
macandcheese added a commit that referenced this issue Dec 17, 2024
**Related Issue:** #10959 #10958

## Summary
Adds classes to use for specific styling cases in Input. This only
adjusts `suffix-text` and `prefix-text`. There are other styles set on
attributes in the component, but those are reflected attributes. We
could still improve that in the future if needed - and / or, in the
newer `input-x` components.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

1 participant