You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly:
3
+
Welcome! Thanks for your interest in contributing to jQuery Mobile. You're **almost** in the right place. More information on how to contribute to this and all other jQuery Foundation projects is over at [contribute.jquery.org](http://contribute.jquery.org). You'll definitely want to take a look at the articles on contributing [code](http://contribute.jquery.org/code).
4
+
5
+
You may also want to take a look at our [commit & pull request guide](http://contribute.jquery.org/commits-and-pull-requests/) and [style guides](http://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](http://contribute.jquery.org/cla).
6
+
7
+
You can find us on [IRC](http://irc.jquery.org), specifically in #jqueryui-dev should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](http://contribute.jquery.org/open-source/).
8
+
9
+
10
+
## Getting Involved
11
+
12
+
More information about the project, the jQuery Mobile team, our weekly meetings, and how to get more involved can be found on the "[About](http://jquerymobile.com/about/)" page on the project website. On this page we provide project specific information regarding [reporting bugs](#issues), [suggesting new features](#feature-requests), and [contributing code or content](#pull-requests). Please take a moment to read this before opening a ticket or submitting a pull request.
If you encounter a bug in the framework you can report it on the issue tracker here on Github. Questions about how to use the framework or problems with your custom code can be posted on the [forum](https://forum.jquery.com/jquery-mobile).
11
-
The jQuery Mobile [API Documentation](https://github.com/jquery/api.jquerymobile.com), [ThemeRoller](https://github.com/jquery/web-jquery-mobile-theme-roller) and [Download Builder](https://github.com/jquery/jquery-mobile-builder) have their own repo where you can report issues.
18
+
The jQuery Mobile [API Documentation](https://github.com/jquery/api.jquerymobile.com), [ThemeRoller](https://github.com/jquery/themeroller.jquerymobile.com) and [Download Builder](https://github.com/jquery/jquerymobile.com) have their own repo where you can report issues.
12
19
13
20
Before opening a new issue please check if the same or a similar issue already has been reported. Tip: Besides the search tool of the issue tracker you can filter issues by label.
14
21
@@ -23,7 +30,8 @@ When [submitting an issue](https://github.com/jquery/jquery-mobile/issues/new) i
23
30
7. jQuery Mobile and jQuery core version used
24
31
8. Other relevant information, e.g. using PhoneGap
25
32
26
-
In the interest of creating more readable issues please include code snippets inside a triple backtick box appropriate for the JavaScript/HTML/CSS snippet you wish to discuss. More information is available at the [introduction page](http://github.github.com/github-flavored-markdown/) for github flavored markdown (see Syntax Highlighting).
33
+
In the interest of creating readable issues please include code snippets inside a triple backtick box appropriate for the JavaScript, CSS, or HTML snippet you wish to discuss. More information is available on the [introduction page](http://github.github.com/github-flavored-markdown/) for GitHub Flavored Markdown (see Syntax Highlighting).
34
+
27
35
28
36
### Test page
29
37
@@ -33,7 +41,7 @@ It is IMPORTANT that you always provide a test page when submitting an issue!
33
41
34
42
* What? - Keep the test page as simple as possible. Only include markup/code that is required to reproduce the issue.
35
43
36
-
* How? - Use our [JS Bin template](http://jsbin.com/IFolanOW/1/edit) which uses latest code on branch "master". Do not replace the links to the the framework CSS and JavaScript: always test with latest code!
44
+
* How? - Use our [JS Bin template](http://jsbin.com/acIRUBo/1/edit) which uses latest code on branch "master". Do not replace the links to the the framework CSS and JavaScript: always test with latest code!
37
45
38
46
* You will notice if the issue has been fixed already
39
47
* It enables us to edit your code if necessary
@@ -42,6 +50,7 @@ It is IMPORTANT that you always provide a test page when submitting an issue!
42
50
43
51
JS Bin instructions: When you start editing the JS Bin, the url will update and contain a new version number. As long as you keep the JS Bin open in your browser this url won't change. Copy the url in your issue report when you are done editing. If your test case requires multiple "single" jQuery Mobile pages, open the JS Bin on multiple tabs on your browser and each of them will get an unique url. Link to this url without "/edit" at the end on your other page(s).
44
52
53
+
45
54
## Feature Requests
46
55
47
56
If you have an idea for a new feature or a suggestion how to improve an existing feature, let us know!
@@ -51,34 +60,109 @@ If you have an idea for a new feature or a suggestion how to improve an existing
51
60
52
61
Please note that we will flag the issue as feature request and then close it. We check requests on regular base and when we decide to implement a feature we set a milestone and re-open the ticket.
53
62
63
+
54
64
## Pull Requests
55
65
56
-
When submitting a pull request for review there are a few important steps you can take to ensure that it gets reviewed quickly and increase the chances that it will be merged (in order of descending importance):
66
+
When submitting a pull request for review there are a few important steps you have to take to ensure that it gets reviewed quickly and increase the chances that it will be merged:
67
+
68
+
* If you are new to contributing code or content to jQuery projects, read the information at [contribute.jquery.org](http://contribute.jquery.org/) first
69
+
* Make sure you have signed the [CLA](http://contribute.jquery.org/CLA/)
70
+
* Before opening a pull request for a bug fix or new feature, make sure there is a ticket for it (don't include a bug report in a pull request)
71
+
* Limit the scope to one issue/feature
72
+
* Add and run unit tests
73
+
* Follow the [style guides](http://contribute.jquery.org/style-guide/)
74
+
* Follow the [commit message guidelines](http://contribute.jquery.org/commits-and-pull-requests/#commit-guidelines)
75
+
76
+
If you need help or feedback, or want to get more involved in the jQuery Mobile project, don't hesitate to reach out to us. You can find us on [IRC](http://irc.jquery.org/) in #jqueryui-dev (Freenode).
77
+
78
+
79
+
### Tips For Bug Patching
80
+
81
+
82
+
#### Environment: localhost with PHP, Node.js, and Grunt
83
+
84
+
jQuery Mobile uses Node.js and Grunt to automate the building and validation of source code.
85
+
86
+
The Demos depend on PHP running locally, so make sure you have the following installed:
87
+
88
+
* A web server with PHP support (any will do, such as [XAMPP](http://www.apachefriends.org/en/xampp.html) or [MAMP](http://www.mamp.info/en/index.html))
89
+
*[Node.js](http://nodejs.org/) (includes NPM, necessary for the next step)
Get in the habit of pulling in the "upstream" master to stay up to date as jQuery Mobile receives new commits.
124
+
125
+
```bash
126
+
$ git pull upstream master
127
+
```
128
+
129
+
Install the dependencies.
130
+
131
+
```bash
132
+
npm install
133
+
```
134
+
135
+
To lint the JavaScript and CSS, as well as build the Demos, run grunt:
136
+
137
+
```bash
138
+
$ grunt
139
+
```
140
+
141
+
142
+
#### Testing
143
+
144
+
You can run all the test suites by running the following command:
57
145
58
-
1. Include tests (see [Testing](https://github.com/jquery/jquery-mobile/blob/master/README.md#testing))
59
-
2. Follow the [jQuery Core style guide](http://docs.jquery.com/JQuery_Core_Style_Guidelines)
60
-
3. Limit the scope to one Issue/Feature
61
-
4. Small focused commits, ideally less than 10 to 20 lines
62
-
5. Avoid merge commits (see Pro Git's [chapter on rebasing](http://git-scm.com/book/ch3-6.html), section [Rebasing](#rebasing) below)
63
-
6. Add the appropriate commit message (see below)
146
+
```bash
147
+
$ grunt test
148
+
```
64
149
65
-
Taken together, the above reduces the effort that's required of the contributor reviewing your pull request.
150
+
You can choose to run only a subset of the tests by adding the `--suites` option like:
66
151
67
-
### Commit messages
152
+
```bash
153
+
$ grunt test --suites=button,checkboxradio
154
+
```
68
155
69
-
Commit messages should include four components:
156
+
will only run the tests under `tests/unit/button/` and `tests/unit/checkboxradio/`.
70
157
71
-
* The WHERE - a single word that categorizes and provides context for the commit and its message, followed by a colon (:). This is typically the name of the plugin being worked on, but sometimes might be something like Build: or Docs:
72
-
* The WHAT - a sufficient summary of the fix or change made (example: modified the foo to no longer bar), followed by a period (.)
73
-
* The WHY #Num - the ticket number with a #sign so Trac creates a hyperlink (example: #1234), followed by a hyphen/dash (-)
74
-
* The WHY Name - the name of the ticket. Notice this is different than summary of the fix. This is a short description of the issue (example: dialog: IE6 crashed when foo is set to bar)
158
+
You can also specify which versions of jQuery you want to test jQuery Mobile with by using the `--jqueries` option:
75
159
76
-
Combined into one, here's a full example:
160
+
```bash
161
+
$ grunt test --jqueries=1.10.2,git
162
+
```
77
163
78
-
"Dialog: modified the foo to no longer bar. Fixed #1234 - dialog: IE6 crashed when foo is set to bar"
79
-
\WHERE/:\------------- WHAT -------------/.\ WHY #Num /-\---------------- WHY Name ----------------/
80
164
81
-
### Rebasing
165
+
####Rebasing
82
166
83
167
Often times when working on a feature or bug fix branch it's useful to pull in the latest from the parent branch. If you're doing this _before_ submitting a pull request it's best to use git's rebase to apply your commits onto the latest from the parent branch. For example, working on `new-feature` branch where `upstream` is the remote at `git://github.com/jquery/jquery-mobile.git`:
0 commit comments