Skip to content

Commit

Permalink
Merge 069cfe5 into 55680b6
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Jan 22, 2020
2 parents 55680b6 + 069cfe5 commit ba74680
Show file tree
Hide file tree
Showing 86 changed files with 1,627 additions and 2,351 deletions.
15 changes: 4 additions & 11 deletions .eslintrc.json
@@ -1,15 +1,8 @@
{
"extends": "vaadin",
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": [
"html"
],
"globals": {
"Polymer": false,
"Vaadin": false
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018,
"project": "./tsconfig.json"
}
}
12 changes: 3 additions & 9 deletions .gemini.yml
@@ -1,22 +1,16 @@
rootUrl: http://localhost:8080/components/vaadin-tabs/test/visual/
rootUrl: http://localhost:8080/test/visual/
gridUrl: http://localhost:4444/wd/hub
screenshotsDir: ./test/visual/screens

system:
plugins:
polyserve:
esm:
port: 8080
sauce: true

browsers:
chrome:
desiredCapabilities:
browserName: "chrome"
version: "67.0"
platform: "Windows 10"

firefox:
desiredCapabilities:
browserName: "firefox"
version: "47.0"
version: "69.0"
platform: "Windows 10"
20 changes: 19 additions & 1 deletion .gitignore
Expand Up @@ -3,4 +3,22 @@ node_modules
package-lock.json
yarn.lock
coverage
analysis.json
custom-elements.json
vaadin-*.js
vaadin-*.d.ts
vaadin-*.d.ts.map
vaadin-*.js.map
/src/**/*.js
/src/**/*.js.map
/src/**/*.d.ts
/src/**/*.d.ts.map
/theme/**/*.js
/theme/**/*.js.map
/theme/**/*.d.ts
/theme/**/*.d.ts.map
/test/**/*.js
/test/**/*.js.map
/test/**/*.d.ts
/test/**/*.d.ts.map
/dist
entrypoint.hashmanifest.json
4 changes: 4 additions & 0 deletions .prettierrc
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"printWidth": 120
}
66 changes: 10 additions & 56 deletions .travis.yml
@@ -1,67 +1,21 @@
sudo: false
dist: xenial
language: node_js
node_js: 8.11

cache:
directories:
- node_modules
node_js: lts/*

addons:
firefox: "66.0"
firefox: latest
chrome: stable

jobs:
include:
- if: type = push
env: TEST_SUITE=unit_tests POLYMER=2
- if: type = push
env: TEST_SUITE=visual_tests POLYMER=2
- if: type = push
env: TEST_SUITE=unit_tests POLYMER=3
- if: type = pull_request
env: POLYMER=2
addons:
firefox: "66.0"
chrome: stable
- if: type = pull_request
env: POLYMER=3
addons:
firefox: "66.0"
chrome: stable
- if: type = cron
env: TEST_SUITE=unit_tests POLYMER=2

script:
- if [[ "$POLYMER" = "2" ]]; then
npm -q i && npm i -q --no-save bower polymer-cli && bower -q i &&
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
if [[ "$TEST_SUITE" = "visual_tests" ]]; then
npm i -q --no-save gemini@^4.0.0 gemini-sauce gemini-polyserve &&
gemini test test/visual;
else
wct --env saucelabs;
fi;
else
npm run check &&
npm run lint &&
xvfb-run -s '-screen 0 1024x768x24' wct;
fi &&
if [[ "$TRAVIS_EVENT_TYPE" = "cron" && "$TEST_SUITE" = "unit_tests" ]]; then
wct --env saucelabs-cron;
fi;
fi
- if [[ "$POLYMER" = "3" ]]; then
npm --no-save -q install -g yarn bower magi-cli web-component-tester polymer-modulizer &&
rm -rf node_modules &&
magi p3-convert --out . --import-style=name &&
yarn install --flat &&
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
wct --npm --env saucelabs;
else
xvfb-run -s '-screen 0 1024x768x24' wct --npm;
fi;
fi

- if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
npm run test:sauce && npm run test:visual;
else
npm run check:version &&
npm run lint &&
npm test;
fi

after_success:
- "cat ${TRAVIS_BUILD_DIR}/coverage/lcov.info | coveralls"
3 changes: 1 addition & 2 deletions ISSUE_TEMPLATE.md
Expand Up @@ -8,7 +8,7 @@
<!-- Example: `vaadin-tabs` throws error. -->

### Live Demo
<!-- The template, click "Remix This" to edit it: https://glitch.com/edit/#!/pyrite-wilderness -->
<!-- The template, click "Remix This" to edit it: https://glitch.com/edit/#!/vaadin-tabs-demo -->

### Steps to reproduce
<!-- Example
Expand All @@ -22,6 +22,5 @@
- [ ] Firefox
- [ ] Safari
- [ ] Edge
- [ ] IE 11
- [ ] iOS Safari
- [ ] Android Chrome
93 changes: 29 additions & 64 deletions README.md
@@ -1,33 +1,24 @@
[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-tabs)](https://www.npmjs.com/package/@vaadin/vaadin-tabs)
[![Bower version](https://badgen.net/github/release/vaadin/vaadin-tabs)](https://github.com/vaadin/vaadin-tabs/releases)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/vaadin/vaadin-tabs)
[![Build Status](https://travis-ci.org/vaadin/vaadin-tabs.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-tabs)
[![Coverage Status](https://coveralls.io/repos/github/vaadin/vaadin-tabs/badge.svg?branch=master)](https://coveralls.io/github/vaadin/vaadin-tabs?branch=master)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-tabs)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-tabs.svg)](https://vaadin.com/directory/component/vaadinvaadin-tabs)

# &lt;vaadin-tabs&gt;

[&lt;vaadin-tabs&gt;](https://vaadin.com/components/vaadin-tabs) is a Web Component providing item navigation part of the [Vaadin components](https://vaadin.com/components). It is designed for menu and tab components.

[Live Demo ↗](https://vaadin.com/components/vaadin-tabs/html-examples)
|
[API documentation ↗](https://vaadin.com/components/vaadin-tabs/html-api)

[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-tabs)](https://www.npmjs.com/package/@vaadin/vaadin-tabs)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/vaadin/vaadin-tabs)
[![Build Status](https://travis-ci.org/vaadin/vaadin-tabs.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-tabs)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-tabs)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/stars/vaadinvaadin-tabs.svg)](https://vaadin.com/directory/component/vaadinvaadin-tabs)

[&lt;vaadin-tabs&gt;](https://vaadin.com/components/vaadin-tabs) is a Web Component providing item navigation part of the [Vaadin components](https://vaadin.com/components). It is designed for menu and tab components.
> ⚠️ This is a pre-release version built with [`LitElement`](https://github.com/Polymer/lit-element), part of the [next generation of Vaadin web components](https://vaadin.com/blog/next-generation-vaadin-components).
>
> Looking for Vaadin 14 compatible version? Please see the following branches:
> - [3.0 branch](https://github.com/vaadin/vaadin-tabs/tree/3.0) (latest stable)
> - [3.1 branch](https://github.com/vaadin/vaadin-tabs/tree/3.1) (next minor version with incremental improvements)
<!--
```
<custom-element-demo>
<template>
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="vaadin-tabs.html">
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
-->
```html
<vaadin-tabs selected="3">
<vaadin-tab>Page 1</vaadin-tab>
Expand All @@ -41,28 +32,6 @@

## Installation

The Vaadin components are distributed as Bower and npm packages.
Please note that the version range is the same, as the API has not changed.
You should not mix Bower and npm versions in the same application, though.

Unlike the official Polymer Elements, the converted Polymer 3 compatible Vaadin components
are only published on npm, not pushed to GitHub repositories.

### Polymer 2 and HTML Imports Compatible Version

Install `vaadin-tabs`:

```sh
bower i vaadin/vaadin-tabs --save
```

Once installed, import it in your application:

```html
<link rel="import" href="bower_components/vaadin-tabs/vaadin-tabs.html">
```
### Polymer 3 and ES Modules Compatible Version

Install `vaadin-tabs`:

```sh
Expand All @@ -85,46 +54,42 @@ To use the Material theme, import the correspondent file from the `theme/materia

- The components with the Lumo theme:

`theme/lumo/vaadin-tab.html`
`theme/lumo/vaadin-tabs.html`
`theme/lumo/vaadin-tab.js`
`theme/lumo/vaadin-tabs.js`

- The components with the Material theme:

`theme/material/vaadin-tab.html`
`theme/material/vaadin-tabs.html`
`theme/material/vaadin-tab.js`
`theme/material/vaadin-tabs.js`

- Alias for `theme/lumo/vaadin-tab.html`
`theme/lumo/vaadin-tabs.html`:
- Alias for `theme/lumo/vaadin-tab.js`
`theme/lumo/vaadin-tabs.js`:

`vaadin-tab.html`
`vaadin-tabs.html`
`vaadin-tab.js`
`vaadin-tabs.js`


## Running demos and tests in a browser
## Running demos and API docs in a browser

1. Fork the `vaadin-tabs` repository and clone it locally.

1. Make sure you have [npm](https://www.npmjs.com/) and [Bower](https://bower.io) installed.
1. Make sure you have [npm](https://www.npmjs.com/) installed.

1. When in the `vaadin-tabs` directory, run `npm install` and then `bower install` to install dependencies.
1. When in the `vaadin-tabs` directory, run `npm install` to install dependencies.

1. Run `npm start`, browser will automatically open the component API documentation.

1. You can also open demo or in-browser tests by adding **demo** or **test** to the URL, for example:

- http://127.0.0.1:3000/components/vaadin-tabs/demo
- http://127.0.0.1:3000/components/vaadin-tabs/test


## Running tests from the command line

1. When in the `vaadin-tabs` directory, run `polymer test`
- When in the `vaadin-tabs` directory, run `npm test`

- To debug tests in the browser, run `npm run test:debug`

## Following the coding style

We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files.
## Following the coding style

We are using [ESLint](http://eslint.org/) for linting TypeScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.ts` files.

## Big Thanks

Expand All @@ -133,7 +98,7 @@ Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs](https

## Contributing

To contribute to the component, please read [the guideline](https://github.com/vaadin/vaadin-core/blob/master/CONTRIBUTING.md) first.
To contribute to the component, please read [the guideline](https://github.com/vaadin/vaadin-core/blob/master/CONTRIBUTING.md) first.


## License
Expand Down
12 changes: 12 additions & 0 deletions babel.config.js
@@ -0,0 +1,12 @@
module.exports = {
presets: ['@babel/preset-typescript'],
plugins: [
[
'@babel/plugin-proposal-decorators',
{
decoratorsBeforeExport: true
}
],
'@babel/plugin-proposal-class-properties'
],
};
52 changes: 0 additions & 52 deletions bower.json

This file was deleted.

8 changes: 0 additions & 8 deletions demo/.eslintrc.json

This file was deleted.

0 comments on commit ba74680

Please sign in to comment.