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: update select to not use button #3612

Merged
merged 7 commits into from
Apr 7, 2022

Conversation

web-padawan
Copy link
Member

Description

Updated vaadin-select-value-button to use mixins instead of extending vaadin-button directly.

Fixes #3607

Type of change

  • Refactor

@web-padawan web-padawan force-pushed the refactor/select-value-button branch 2 times, most recently from d55e82c to 83f4996 Compare March 27, 2022 13:00
@vursen
Copy link
Contributor

vursen commented Mar 28, 2022

Regression: The select loses focus after pressing Enter or Space several times

Steps:

  1. Open a page with the snippet below.
  2. Set focus on the select with Tab.
  3. Press Enter or Space several times.

Actual: The select component loses focus after you press an activation key several times.

Expected: The select component keeps focused regardless of how many times you press an activation key.

Recording:

Screen.Recording.2022-03-28.at.16.05.19.mov

Snippet:

<script type="module">
  import '@vaadin/select';
</script>

<vaadin-select label="New"></vaadin-select>

<script>
  const select = document.querySelector('vaadin-select');
  select.renderer = (root, _, model) => {
    root.innerHTML = `
      <vaadin-list-box>
        <vaadin-item value="xs" disabled>XS (out of stock)</vaadin-item>
        <vaadin-item value="s">S</vaadin-item>
        <vaadin-item value="m">M</vaadin-item>
        <vaadin-item value="l">L</vaadin-item>
        <vaadin-item value="xl">XL</vaadin-item>
      </vaadin-list-box>
    `;
  };
</script>

@web-padawan web-padawan force-pushed the refactor/select-value-button branch from 83f4996 to b42361c Compare March 29, 2022 10:58
@web-padawan
Copy link
Member Author

@vursen Updated the code to use ButtonMixin for providing common button functionality.

@web-padawan web-padawan force-pushed the refactor/select-value-button branch from b42361c to c1654bc Compare March 29, 2022 11:17
@vursen vursen force-pushed the refactor/select-value-button branch from a8eae85 to 2959229 Compare April 6, 2022 13:00
@vursen vursen force-pushed the refactor/select-value-button branch from 0d4f228 to eb51b9f Compare April 6, 2022 13:09
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 7, 2022

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 0 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 Vaadin 23.1.0.alpha2 and is also targeting the upcoming stable 23.1.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.

Refactor vaadin-select to not use vaadin-button
3 participants