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

refactor: use new mixins, simplify keyboard handling logic #2976

Merged
merged 6 commits into from
Nov 5, 2021

Conversation

web-padawan
Copy link
Member

Description

  • Changed to use ActiveMixin and FocusMixin so that we handle these consistently for all components.
  • Added some necessary tweaks to preserve setting focus-ring when focusing an item inside a list-box
    • Previously, the focus-ring was always set unless there was a mousedown event before focusin,
    • Now, the focus-ring is set only if there was a keydown (same as in button, input fields etc),
    • But we still need to have focus-ring set by vaadin-select, vaadin-list-box, vaadin-menu-bar.

Type of change

  • Refactor

@@ -214,7 +214,6 @@ describe('edit column editor type', () => {
grid.enterNextRow = true;
const item = editor._overlayElement.querySelector('vaadin-item');
enter(item);
item.click();
Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't necessary because click is called on Enter anyways.

@web-padawan web-padawan changed the title refactor: update ItemMixin to use other mixins refactor: use new mixins, simplify keyboard handling logic Nov 4, 2021
@sonarcloud
Copy link

sonarcloud bot commented Nov 5, 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

@web-padawan web-padawan merged commit fe53668 into master Nov 5, 2021
@web-padawan web-padawan deleted the refactor/item-mixin branch November 5, 2021 11:39
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 22.0.0.beta2 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.

None yet

3 participants