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

Add failing test for default-valued properties #297

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

ryecroft
Copy link

@ryecroft ryecroft commented Nov 1, 2022

@attr properties with a default value (specified using a getter method) incorrectly have their setter method called with an empty string after setting the property in the connectedCallback

This incorrect behaviour does not happen if:

  • the property is in the html definition eg <initialize-attr-test has-foo='' />
  • the property does not have a getter method supplying a default value

@attrable properties with a default value specified using a getter
method incorrectly have their setter method called with an empty
string.

This incorrect behaviour does not happen if:

- the property is in the html definition
- the property does not have a default value supplied by a getter method
@ryecroft ryecroft requested review from a team and koddsson as code owners November 1, 2022 06:03
@primer-css
Copy link

👋 Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Design Infrastructure first responder will review it soon.

  • 🎨 If this is a PR that includes a visual change, please make sure to add screenshots in the description or deploy this code to a lab machine with instructions for how to test.
  • If this is a PR that includes changes to an interaction, please include a video recording in the description.
  • ⚠️ If this is urgent, please visit us in #primer on Slack and tag the first responders listed in the channel topic.

@keithamus
Copy link
Member

Thanks for filing this @ryecroft. I'll be looking into this soon hopefully!

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

Successfully merging this pull request may close these issues.

3 participants