-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Palindrom/initial-reviewable-code
Initial reviewable code
- Loading branch information
Showing
12 changed files
with
588 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### Steps to reproduce | ||
|
||
#### Live Demo | ||
<!-- Fork this JSBin, or provide your own URL --> | ||
https://jsbin.com/ligimo/3/edit?html,output | ||
|
||
### Expected result | ||
|
||
### Actual result | ||
|
||
### Browsers affected | ||
|
||
<!-- Check all that apply --> | ||
- [ ] Chrome | ||
- [ ] Firefox | ||
- [ ] Edge | ||
- [ ] Safari 9 | ||
- [ ] Safari 8 | ||
- [ ] IE 11 | ||
|
||
### Screenshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
language: node_js | ||
sudo: required | ||
dist: trusty | ||
before_script: | ||
- npm install web-component-tester | ||
- npm install bower | ||
- export PATH=$PWD/node_modules/.bin:$PATH | ||
- bower install | ||
node_js: 8 | ||
addons: | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
script: | ||
- xvfb-run wct | ||
env: | ||
global: | ||
- secure: udu+o3NNMHha79ytgmQxCKH99hTEO2egjCPyy97cCMY0b7jkaMM87UtGvrdxJtZGpkSLRPDxIseafZ0Z9Kvn8splH/cNe23m34LuW97BOeI6R9/1HQBJAyG17luVI8wlW2aYq1xD0xJqpxdTyG/hAKB3D3/8KoAIe9r/fH53cNEHi0mfuOqfWuuQmvmrzKD+DFgPj4SmQPLMxBba6O83kmXZw5NIQYYuoEszP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vdplRmIband0bL9tuerHxmNtVq/au2z21WOdsHVrqZEjhrv4XwTkLiw8QUGkPJ44W4I= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Contributing | ||
|
||
We welcome and truly appreciate contribution in all forms - issues, pull requests, questions, or fancy examples of apps/elements build on to of your elements. | ||
|
||
## Filing bugs | ||
|
||
Our team heavily uses Github for all of our software management. We use Github issues to track all bugs and features. | ||
|
||
If you find an issue, please do file it on the repository. | ||
|
||
We love examples for addressing issues - issues with a Plunkr, [jsFiddle](http://jsfiddle.net), or [jsBin](http://jsbin.com) will be much easier for us to work on quickly. | ||
|
||
Occasionally we'll close issues if they appear stale or are too vague - please don't take this personally! Please feel free to re-open issues we've closed if there's something we've missed and they still need to be addressed. | ||
|
||
## Developing the element | ||
|
||
If you would like to start to fiddle with element's code, here is the flow we use. | ||
|
||
- Make a local clone of this repo: `git clone git@github.com:Palindrom/palindrom-error-catcher.git` | ||
|
||
In order to develop it locally we suggest to use [polyserve](https://npmjs.com/polyserve) tool to handle bower paths gently. | ||
|
||
0. Go to the repo's directory: `cd palindrom-error-catcher` | ||
1. Install [bower](http://bower.io/) & [polyserve](https://npmjs.com/polyserve): `$ npm install -g bower polyserve` | ||
2. Install local dependencies: `$ bower install` | ||
3. Start development server `$ polyserve -p 8000` | ||
4. Open the demo/preview: [http://localhost:8000/components/palindrom-error-catcher/](http://localhost:8000/components/palindrom-error-catcher/) | ||
5. Open the test suite: [http://localhost:8000/components/palindrom-error-catcher/test/](http://localhost:8000/components/palindrom-error-catcher/test/) | ||
|
||
## Contributing Pull Requests | ||
|
||
1. Fork it! | ||
2. Create your feature branch: `git checkout -b my-new-feature` | ||
3. Commit your changes: `git commit -m 'Add some feature'` | ||
4. Push to the branch: `git push origin my-new-feature` | ||
5. Open corresponding issue if needed | ||
6. Submit a pull request :D | ||
|
||
|
||
## Unit tests | ||
|
||
This project uses [`web-component-tester`](https://github.com/Polymer/web-component-tester) for unit tests. | ||
The [`polyserve`](https://github.com/PolymerLabs/polyserve) utility is helpful for running tests in the browser](#developing-the-element). | ||
|
||
|
||
### Running element unit tests from CLI | ||
|
||
To run the element unit tests from CLI, you need to: | ||
|
||
0. Install `web-component-tester` globally: `npm install -g web-component-tester` | ||
1. Clone the element repo. | ||
2. Install the dependencies. `bower install` | ||
3. Run the tests: `wct` | ||
|
||
#### Configuring `web-component-tester` | ||
|
||
By default, `web-component-tester` runs tests on all installed browsers. You can configure it | ||
to run tests on a subset of available browsers, or to run tests remotely using Sauce Labs. | ||
|
||
See the [`web-component-tester` README](https://github.com/Polymer/web-component-tester) for | ||
information on configuring the tool. | ||
|
||
## Releasing a new version | ||
|
||
**The release is done from `master` branch.** | ||
|
||
1. Make sure that the browser tests pass in Chrome, Firefox, Edge and IE. This can be done manually or using `npm run test` (see instructions above). | ||
2. Call `git status` to verify that there are no uncommited files in the directory | ||
3. Call `grunt bump:patch`, `grunt bump:minor` or `grunt bump:major`. This command: | ||
- increments the version number in the relevant files | ||
- commits changes to Git with the version number as the commit message | ||
- creates a Git tag wit the version | ||
4. Call `git push` to push the changes to `origin master` | ||
5. Call `git push --tags` to push the tag to `origin master` | ||
6. Explain the changes (at least an summary of the commit log) in [GitHub Releases](https://github.com/Palindrom/palindrom-error-catcher). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
bump: { | ||
options: { | ||
files: ['bower.json', 'palindrom-error-catcher.html'], | ||
commit: true, | ||
commitMessage: '%VERSION%', | ||
commitFiles: ['bower.json', 'palindrom-error-catcher.html'], | ||
createTag: true, | ||
tagName: '%VERSION%', | ||
tagMessage: 'Version %VERSION%', | ||
push: false, | ||
globalReplace: false, | ||
prereleaseName: false, | ||
regExp: false | ||
} | ||
} | ||
}); | ||
|
||
|
||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-bump'); | ||
|
||
grunt.registerTask('default', ['watch']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# <palindrom-error-catcher> [![Build Status](https://travis-ci.org/Palindrom/palindrom-error-catcher.svg?branch=gh-pages)](https://travis-ci.org/Palindrom/palindrom-error-catcher) | ||
|
||
--- | ||
|
||
> Handles palindrom-client disconnection events and creates the needed UI to give the user control over them | ||
Custom Element that binds with [palindrom-client](https://github.com/Palindrom/palindrom-client) connection events and shows a simple UI that allows the user to interact with the events. It is can be used as an example of designing your own error-preseting UI. | ||
|
||
Please check the code at `palindrom-error-catcher.html` file to see how events are handled. | ||
|
||
## Creating your own | ||
|
||
If you want to gain control over the appearance of your errors UI. You can fork this element, put it in the `wwwroot/sys/` folder of your app. And edit it as desired. Once you have an element in this folder with the same name, it will supersede the default one and your UI will be shows. | ||
|
||
## Install | ||
|
||
Install the component using [Bower](http://bower.io/): | ||
|
||
```sh | ||
$ bower install palindrom-error-catcher --save | ||
``` | ||
|
||
Or [download as ZIP](https://github.com/Palindrom/palindrom-error-catcher/archive/master.zip). | ||
|
||
## Usage | ||
|
||
1. Import polyfill: | ||
|
||
```html | ||
<script src="bower_components/webcomponentsjs/webcomponent-lite.js"></script> | ||
``` | ||
|
||
2. Import custom element: | ||
|
||
```html | ||
<link rel="import" href="bower_components/palindrom-error-catcher/palindrom-error-catcher.html"> | ||
``` | ||
|
||
3. Start using it! | ||
|
||
```html | ||
<palindrom-error-catcher></palindrom-error-catcher> | ||
``` | ||
|
||
## Options | ||
|
||
Attribute | Options | Default | Description | ||
--- | --- | --- | --- | ||
`target-selector` | *string* | `palindrom-client` | CSS selector of `palindrom-client` element. | ||
|
||
## Methods | ||
|
||
Method | Parameters | Returns | Description | ||
--- | --- | --- | --- | ||
`cancelReloading()` | None. | Nothing. | Cancels reloading timer and hides the disconnection bar. | ||
|
||
## [Contributing and Development](CONTRIBUTING.md) | ||
|
||
## History | ||
|
||
For detailed changelog, check [Releases](https://github.com/Palindrom/palindrom-error-catcher/releases). | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "palindrom-error-catcher", | ||
"version": "1.0.0", | ||
"description": | ||
"Handles palindrom-client disconnection events and creates the needed UI to give the user control over them", | ||
"private": true, | ||
"authors": ["Omar Alshaker"], | ||
"keywords": [ | ||
"web-components", | ||
"polymer", | ||
"json-patch", | ||
"palindrom", | ||
"binding", | ||
"puppetjs", | ||
"template", | ||
"web-socket", | ||
"http", | ||
"json" | ||
], | ||
"main": "palindrom-error-catcher.html", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/Palindrom/palindrom-error-catcher.git" | ||
}, | ||
"license": "MIT", | ||
"homepage": "https://github.com/Palindrom/palindrom-error-catcher", | ||
"ignore": ["**/.*", "node_modules", "bower_components", "test/"], | ||
"devDependencies": { | ||
"test-fixture": "PolymerElements/test-fixture#^3.0.0", | ||
"web-component-tester": "^6.0.0", | ||
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta http-equiv="refresh" content="0;URL='/components/palindrom-error-catcher/test/" /> | ||
</head> | ||
|
||
</html> |
Oops, something went wrong.