Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 3.22 KB

CONTRIBUTING.md

File metadata and controls

70 lines (51 loc) · 3.22 KB

How to contribute

Communicating

Setup

  • Install dependencies npm install
  • Run dev Server with npm start and open your browser on localhost:8081/demo
  • Run the tests with npm test
  • To produce a bundle run npm run build

Implementing a new compoment

  • write down a list of all theme and functional variants in tests/component_upstream.html
  • evaluate native elements (e.g. dialog for modals or progress for the progress bar)
  • design a simple api surface (e.g. setting the href or toggle attribute to the button component changes the underlying element) in tests/component.html
  • open an issue (more eyes more ideas ;) )
  • implement the dom and functional parts
    • try to keep it simple
    • prefer slots over attributes/properties
    • provide sane defaults (a11y and user experience wise)
  • implement the styles
    • have a look at the upstream scss
    • have a look at the resulting css in your browser (npm start first)
    • write the base css first, prefix css custom proberties with bs
    • for performance reasons implement static css that selects on host attributes
    • for theme variants loop over styles/colors.js
    • run the screenshot tests npm test, see the results in test-results
  • push early and iterate often (most components so far took me about 3 implementations until it felt right)
  • extra goal: implement functional browser tests

Resources

Bootstrap

Web components

Basics

Best Practices

Other libraries

Styling