You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ## Contributing
  2. Dear contributor, we are glad that you want to improve our product. Our products have high quality requirements, all the changes should satisfy those as well.
  3. Each Vaadin component has it's own GitHub repository, where development is done. The `vaadin-core` project is just a top-level bundle without actual production code.
  4. Familiarize yourself with the code and try to follow the same syntax conventions to make it easier for us to accept your pull requests.
  5. The following instructions are common for all Vaadin components.
  6. ### Submitting a Pull Request
  7. To submit a PR follow these minimum requirements:
  8. - Make sure your code is compliant with our code linters: `gulp lint`
  9. - Check that tests are passing: `polymer test`
  10. - [Submit a pull request](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) with detailed title and description
  11. - Wait for response from one of Vaadin components team members
  12. We will review the PR and make a decision on it.
  13. ### Advanced requirements
  14. Advanced requirements affect the PR handling time. The more requirements are met, the sooner PR will be merged.
  15. Otherwise, we will take care of those missing parts in case of PR approvement.
  16. - Minimal API to fulfill the requirements of the idea
  17. - 100% coverage with automated tests
  18. - Should pass on each supported platform (desktop/mobile):
  19. - Chrome (latest, any platform)
  20. - Firefox (latest, any platform)
  21. - Safari (latest, any platform)
  22. - Edge (latest, any platform)
  23. - IE11 (any platform)
  24. - iOS Safari (9, latest, any platform)
  25. - Chrome on Android (latest, any platform)
  26. - Live Demo with a code example demonstrating the feature
  27. - Not required for a bug fix
  28. - Documented
  29. - visual parts
  30. - elements
  31. - events
  32. - attributes exposed for styling
  33. - public properties and methods
  34. - Accessible
  35. - Visuals are themable:
  36. - **Supports both lumo and material themes**
  37. - themable parts / state attributes are exposed
  38. - documented
  39. - covered with visual tests (optional)
  40. - I18n compatible
  41. - RTL (optional)
  42. ### Converting from HTML Imports to ES modules
  43. Vaadin components use HTML Imports in the mainline codebase. In order to use a Vaadin component
  44. as ES module, the codebase has to be converted first.
  45. Follow these steps to perform the ES modules conversion of a Vaadin component.
  46. Note that the `magi-cli` mentioned below is an internal tool used by Vaadin components team,
  47. in case you want to convert your own set of components, only `polymer-modulizer` is needed.
  48. ```shell
  49. # Install global dependencies
  50. $ npm install -g polymer-modulizer magi-cli yarn
  51. # Commit any changes, make sure your local repository is clean
  52. $ git status
  53. $ magi p3-convert --out . --import-style=name
  54. # Install component dependencies from npm using yarn
  55. $ yarn install --flat
  56. # Run development server
  57. $ polymer serve --npm
  58. ```
  59. - Open http://localhost:8081/components/@vaadin/vaadin-combo-box/test/ for the tests
  60. Note: replace `vaadin-combo-box` with the actual component in the above example.
  61. When done, return back to the HTML Imports codebase using git:
  62. ```shell
  63. $ git reset --hard HEAD^ && git clean -df
  64. ```
  65. ### Contributing to ES module components
  66. To contribute into Polymer 3 Vaadin components, make your changes
  67. on the mainline Polymer 2 codebase, then open a pull request targeting
  68. the master branch.
  69. Note: unlike the official Polymer Elements, the converted Polymer 3 compatible
  70. Vaadin components are only published on npm, not pushed to GitHub repositories.
  71. ### Contributor License Agreement
  72. When you send a pull request to any of our repositories, you get an automated comment response about the CLA.
  73. It will notify you if you haven’t signed the CLA yet, and in that case instructions how to do it.
  74. You need to do this once per each repository. Before we can accept any of your code contributions, you need to sign the CLA.