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

fix: move setAttribute calls for proxy elements to connectedCallback #3494

Merged
merged 5 commits into from
Jul 11, 2020

Conversation

chrisdholt
Copy link
Member

@chrisdholt chrisdholt commented Jul 10, 2020

Description

This PR fixes an issue where attributes were defined too early for the custom element, specifically as it relates to form associated elements. This work moves the work to set proxy attributes to the connected callback.

Closes #3456

Motivation & context

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Adding or modifying component(s) in @microsoft/fast-components checklist

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@chrisdholt chrisdholt force-pushed the users/chhol/constructor-attribute-audit branch from 026d3c1 to 9421d16 Compare July 10, 2020 19:50
@janechu
Copy link
Collaborator

janechu commented Jul 10, 2020

I have created a branch with createElement and applied your changes - users/janechu/custom-element-test, still getting an error.

@janechu
Copy link
Collaborator

janechu commented Jul 10, 2020

By setting appearance as undefined in the button this appears to fix the problem, I think this indicates these attr default settings are happening during the ctor phase, causing an issue. See 726db0c

@chrisdholt
Copy link
Member Author

By setting appearance as undefined in the button this appears to fix the problem, I think this indicates these attr default settings are happening during the ctor phase, causing an issue. See 726db0c

Yes, as I was building your branch I realized that I had started working on that, but it was on your branch. I jumped back to apply some changes and spaced. I think we'll need to set the default appearance differently.

@chrisdholt chrisdholt force-pushed the users/chhol/constructor-attribute-audit branch from 9421d16 to da05f11 Compare July 10, 2020 22:02
@chrisdholt
Copy link
Member Author

@janechu pushed an update. I don't get an error thrown here when testing on your branch. @EisenbergEffect can you take one more look at this when available? One slight change made since you signed off.

@EisenbergEffect EisenbergEffect self-requested a review July 10, 2020 22:13
Copy link
Collaborator

@janechu janechu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've built and verified, looks good!

@chrisdholt chrisdholt merged commit cdaf0ba into master Jul 11, 2020
@chrisdholt chrisdholt deleted the users/chhol/constructor-attribute-audit branch July 11, 2020 01:08
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.

Runtime error in <fast-button> and <fast-anchor>
3 participants