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!: move button to new package #2373

Merged
merged 17 commits into from
Aug 30, 2021
Merged

refactor!: move button to new package #2373

merged 17 commits into from
Aug 30, 2021

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Aug 23, 2021

Description

  • Added README.md and JSDoc annotations for the new @vaadin/button package.
  • Moved vaadin-button custom element to the new package.
  • Forwarded old imports in @vaadin/vaadin-button to the new package.

Part of #2224

Type of change

  • Breaking change

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@vursen vursen force-pushed the breaking/button branch 2 times, most recently from 0b613dc to cf71c2b Compare August 27, 2021 08:59
@vursen vursen changed the title refactor!: move button to new package (WIP) refactor!: move button to new package Aug 27, 2021
@vursen vursen force-pushed the breaking/button branch 2 times, most recently from 235b1e2 to 15a1697 Compare August 29, 2021 10:07
@vursen vursen marked this pull request as ready for review August 29, 2021 10:08
@vursen
Copy link
Contributor Author

vursen commented Aug 29, 2021

Oh, as always, there is a problem with keyboard navigation tests in Firefox (build).

@web-padawan Do you have any ideas why keyboard navigation tests fail only in the CI (Firefox) but pass locally?

I have already run yarn install, but nothing has changed.

May I ask you to check if the problem reproduces for you locally?

packages/vaadin-upload/test/keyboard-navigation.test.js:

 ❌ keyboard navigation > should focus on the file
      AssertionError: expected null to equal <vaadin-upload-file></vaadin-upload-file>
        at r (node_modules/@esm-bundle/chai/node_modules/.pnpm/[email protected]/node_modules/chai/chai.js:9574:12)
        at n.exports<[3]</t.exports/i.prototype.assert (node_modules/@esm-bundle/chai/node_modules/.pnpm/[email protected]/node_modules/chai/chai.js:250:12)
        at p (node_modules/@esm-bundle/chai/node_modules/.pnpm/[email protected]/node_modules/chai/chai.js:1409:11)
        at c (node_modules/@esm-bundle/chai/node_modules/.pnpm/[email protected]/node_modules/chai/chai.js:7884:24)
        at packages/vaadin-upload/test/keyboard-navigation.test.js:38:55

@web-padawan
Copy link
Member

Creating a button element and moving focus there seems to solve the Firefox keyboard tests issue (build is green).

@vursen
Copy link
Contributor Author

vursen commented Aug 29, 2021

@web-padawan Thank you so much! That's such a bizarre workaround by the way :)

@web-padawan web-padawan added the a11y Accessibility issue label Aug 30, 2021
packages/button/src/vaadin-button.d.ts Outdated Show resolved Hide resolved
// TODO: Remove in https://github.com/vaadin/web-components/issues/2224.
customElements.define(Button.is, Button);
import '../../../theme/lumo/vaadin-button.js';
import '../../../src/vaadin-button.js';
Copy link
Member

Choose a reason for hiding this comment

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

The src import can be removed as it should be already included by the lumo import above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

packages/button/test/visual/material/button.test.js Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

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

Successfully merging this pull request may close these issues.

2 participants