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: create default helper element lazily #2714

Merged
merged 11 commits into from
Oct 4, 2021
Merged

Conversation

web-padawan
Copy link
Member

Description

Fixes #2382

This is an attempt to make the new behavior more or less aligned with that we used to have previously, i.e.

<slot name="helper">[[helperText]]</slot>

Notable changes:

  1. Setting helperText property (or attribute) only updates text content for the default helper, not for custom one.
  2. Text content from the custom helper is set to helperText property when it is inserted, but not updated later.
  3. When the custom helper is removed, the default one is restored. I had to use FlattenedNodesObserver for it.

Type of change

  • Bugfix

@web-padawan web-padawan added the a11y Accessibility issue label Oct 1, 2021
@web-padawan web-padawan requested a review from vursen October 1, 2021 17:55
packages/field-base/src/field-mixin.js Outdated Show resolved Hide resolved
packages/field-base/src/field-mixin.js Outdated Show resolved Hide resolved
packages/field-base/src/field-mixin.js Outdated Show resolved Hide resolved
packages/field-base/src/field-mixin.js Outdated Show resolved Hide resolved
packages/radio-group/test/radio-group.test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@vursen vursen left a comment

Choose a reason for hiding this comment

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

Added several more comments but they aren't very important and the PR looks good to me. Approved 👍

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 4, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 22.0.0.alpha7 and is also targeting the upcoming stable 22.0.0 version.

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

Successfully merging this pull request may close these issues.

[field-base] Do not override ID attribute on the custom helper
4 participants