-
Notifications
You must be signed in to change notification settings - Fork 161
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
Parse template initial attribute values as properties, not attributes #8974
Comments
This ticket may have dramatic impact on the templates behavior . With the current implementation (exactly as described) the following happens:
What we should do : treat |
Should this be used as a reference for global attributes? : I'm going to add |
Read template attributes as properties Fixes #8974
Read template attributes as properties Fixes #8974 # Conflicts: # flow-server/src/main/java/com/vaadin/flow/component/littemplate/LitTemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/IdCollector.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateInitializer.java # flow-server/src/test/java/com/vaadin/flow/component/polymertemplate/PolymerTemplateTest.java # flow-tests/test-root-context/frontend/AttributeTemplate.js # flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeView.java # flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeIT.java
Read template attributes as properties Fixes #8974 # Conflicts: # flow-server/src/main/java/com/vaadin/flow/component/littemplate/LitTemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/IdCollector.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateInitializer.java # flow-server/src/test/java/com/vaadin/flow/component/polymertemplate/PolymerTemplateTest.java # flow-tests/test-root-context/frontend/AttributeTemplate.js # flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeView.java # flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeIT.java
Read template attributes as properties Fixes #8974 # Conflicts: # flow-server/src/main/java/com/vaadin/flow/component/littemplate/LitTemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/IdCollector.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateInitializer.java # flow-server/src/test/java/com/vaadin/flow/component/polymertemplate/PolymerTemplateTest.java # flow-tests/test-root-context/frontend/AttributeTemplate.js # flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeView.java # flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeIT.java
Read template attributes as properties Fixes #8974 # Conflicts: # flow-server/src/main/java/com/vaadin/flow/component/littemplate/LitTemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/IdCollector.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateDataAnalyzer.java # flow-server/src/main/java/com/vaadin/flow/component/polymertemplate/TemplateInitializer.java # flow-server/src/test/java/com/vaadin/flow/component/polymertemplate/PolymerTemplateTest.java # flow-tests/test-root-context/frontend/AttributeTemplate.js # flow-tests/test-root-context/src/main/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeView.java # flow-tests/test-root-context/src/test/java/com/vaadin/flow/uitest/ui/template/TemplateAttributeIT.java
Follow up on #8957, given template with contents
the initial attribute for the element should be mapped as properties*. Thus
As can be seen for instance with https://vaadin.com/components/vaadin-text-field/html-api/elements/Vaadin.TextFieldElement the web component API has properties, but not attributes. So this needs to be the default.
*The special cases that are not properties are at least:
id
(handled by Read attribute value from template #8957)class
(handled by Read attribute value from template #8957)style
(handled by Read attribute value from template #8957)theme
(handled by Read attribute value from template #8957)disabled
(handled by Parse initial disabled attribute value from templates #8973)The text was updated successfully, but these errors were encountered: