UNPKG

12.5 kBMarkdownView Raw
1# Contributing to Bootstrap Table
2
3Looking to contribute something to Bootstrap Table?
4
5**Here's how you can help.**
6
7Please take a moment to review this document in order to make the contribution
8process easy and effective for everyone involved.
9
10Following these guidelines helps to communicate that you respect the time of
11the developers managing and developing this open source project. In return,
12they should reciprocate that respect in addressing your issue or assessing
13patches and features.
14
15
16## Using the issue tracker
17
18The [issue tracker](https://github.com/wenzhixin/bootstrap-table/issues) is
19the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests)
20and [submitting pull requests](#pull-requests), but please respect the following
21restrictions:
22
23* Please **do not** use the issue tracker for personal support requests. Stack
24 Overflow ([`bootstrap-table`](http://stackoverflow.com/questions/tagged/bootstrap-table) tag is better place to get help.
25
26* Please **do not** derail or troll issues. Keep the discussion on topic and
27 respect the opinions of others.
28
29* Please **do not** open issues or pull requests regarding the code in [`bootstrap-table-examples`](https://github.com/wenzhixin/bootstrap-table-examples) and [`extensions plugin dependence`](https://github.com/wenzhixin/bootstrap-table/tree/develop/src/extensions) (open them in their respective repositories), the dependence list:
30 * Table Editable: [x-editable](https://github.com/vitalets/x-editable)
31 * Table Export: [tableExport.jquery.plugin](https://github.com/hhurz/tableExport.jquery.plugin)
32 * Table Filter: [bootstrap-table-filter](https://github.com/lukaskral/bootstrap-table-filter)
33 * Table flat-json: [bootstrap-table-flat-json](https://github.com/djhvscf/bootstrap-table-flatJSON)
34 * Table Reorder: [jquery-ui](https://code.jquery.com/ui/) and [dragTable](https://github.com/akottr/dragtable/)
35 * Table Resizable: [colResizable](https://github.com/alvaro-prieto/colResizable)
36
37## Issues and labels
38
39Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them:
40
41- `awaiting reply` - Issues that are awaiting reply, will be closed if there is no any response in 7 days.
42- `browser bug` - Issues that are reported to us, but actually are the result of a browser-specific bug. These are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker.
43- `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in Bootstrap Table.
44- `css` - Issues stemming from our compiled CSS or source CSS files.
45- `docs` - Issues for improving or updating our documentation.
46- `example` - Issues that contains an important example.
47- `extension` - Issues for adding or updating our extension.
48- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified.
49- `fixed` - Issues already fixed in a pull request.
50- `grunt` - Issues with our included JavaScript-based Gruntfile, which is used to run all our tests, concatenate and compile source files, and more.
51- `help wanted` - Issues we need or would love help from the community to resolve.
52- `invalid` - Issues we can't resolve because it is not related to Bootstrap Table or the information provided is not completed.
53- `js` - Issues stemming from our compiled or source JavaScript files.
54- `locale` - Issues regarding errors in locale extensions.
55- `needs example` - Issues don't have an example but we need an example in order to confirm the issue or test the pull request.
56- `needs review` - Issues missing some important information about errors in the code, steps to reproduce the issue, etc.
57- `resource` - Issues with helpful resources to improve Bootstrap Table.
58- `update to latest version` - Issues need to update to latest version in order to be fixed.
59
60For a complete look at our labels, see the [project labels page](https://github.com/wenzhixin/bootstrap-table/labels).
61
62
63## Bug reports
64
65A bug is a _demonstrable problem_ that is caused by the code in the repository.
66Good bug reports are extremely helpful, so thanks!
67
68Guidelines for bug reports:
69
700. **Validate and lint your code** — [validate your HTML](http://html5.validator.nu)
71 and [lint your HTML](https://github.com/twbs/bootlint) to ensure your
72 problem isn't caused by a simple error in your own code.
73
741. **Use the GitHub issue search** — check if the issue has already been
75 reported.
76
772. **Check if the issue has been fixed** — try to reproduce it using the
78 latest `master` or development branch in the repository.
79
803. **Isolate the problem** — ideally create a live example.
81 The web tool [jsfiddle](http://jsfiddle.net/) is a very helpful for this. Consider to use these templates:
82 * [Table from html](http://jsfiddle.net/wenyi/e3nk137y/11/light/)
83 * [Table from data](http://jsfiddle.net/wenyi/e3nk137y/13/light/)
84 * [Table from url](http://jsfiddle.net/wenyi/e3nk137y/14/light/)
85
86
87A good bug report shouldn't leave others needing to chase you up for more
88information. Please try to be as detailed as possible in your report. What is
89your environment? What steps will reproduce the issue? What browser(s) and OS
90experience the problem? Do other browsers show the bug differently? What
91would you expect to be the outcome? All these details will help people to fix
92any potential bugs.
93
94Example:
95
96> Short and descriptive example bug report title
97>
98> A summary of the issue and the browser/OS environment in which it occurs. If
99> suitable, include the steps required to reproduce the bug.
100>
101> 1. This is the first step
102> 2. This is the second step
103> 3. Further steps, etc.
104>
105> `<url>` - a link to the reduced test case
106>
107> Any other information you want to share that is relevant to the issue being
108> reported. This might include the lines of code that you have identified as
109> causing the bug, and potential solutions (and your opinions on their
110> merits).
111
112
113## Feature requests
114
115Feature requests are welcome. But take a moment to find out whether your idea
116fits with the scope and aims of the project. It's up to *you* to make a strong
117case to convince the project's developers of the merits of this feature. Please
118provide as much detail and context as possible.
119
120
121## Pull requests
122
123Good pull requests—patches, improvements, new features—are a fantastic
124help. They should remain focused in scope and avoid containing unrelated
125commits.
126
127**Please ask first** before embarking on any significant pull request (e.g.
128implementing features, refactoring code, porting to a different language),
129otherwise you risk spending a lot of time working on something that the
130project's developers might not want to merge into the project.
131
132Please adhere to the [coding guidelines](#code-guidelines) used throughout the
133project (indentation, accurate comments, etc.) and any other requirements
134(such as test coverage).
135
136**Do not edit files of `dist` directly!** Those files are automatically generated. You should edit the
137source files in [`/src/`](https://github.com/wenzhixin/bootstrap-table/tree/develop/src) instead.
138
139Similarly, when contributing to Bootstrap's documentation, you should edit the
140documentation source files in
141[the `/docs/` directory of the `develop` branch](https://github.com/wenzhixin/bootstrap-table/tree/develop/docs).
142
143Adhering to the following process is the best way to get your work
144included in the project:
145
1461. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork,
147 and configure the remotes:
148
149 ```bash
150 # Clone your fork of the repo into the current directory
151 git clone https://github.com/<your-username>/bootstrap-table.git
152 # Navigate to the newly cloned directory
153 cd bootstrap-table
154 # Assign the original repo to a remote called "upstream"
155 git remote add upstream https://github.com/wenzhixin/bootstrap-table.git
156 ```
157
1582. If you cloned a while ago, get the latest changes from upstream:
159
160 ```bash
161 git checkout develop
162 git pull upstream develop
163 ```
164
1653. Create a new topic branch (off the main project development branch) to
166 contain your feature, change, or fix:
167
168 ```bash
169 git checkout -b <topic-branch-name>
170 ```
171
1724. Commit your changes in logical chunks. Please adhere to these [git commit
173 message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
174 or your code is unlikely be merged into the main project. Use Git's
175 [interactive rebase](https://help.github.com/articles/about-git-rebase/)
176 feature to tidy up your commits before making them public.
177
1785. Locally merge (or rebase) the upstream development branch into your topic branch:
179
180 ```bash
181 git pull [--rebase] upstream develop
182 ```
183
1846. Push your topic branch up to your fork:
185
186 ```bash
187 git push origin <topic-branch-name>
188 ```
189
1907. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
191 with a clear title and description against the `develop` branch.
192
193**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
194license your work under the terms of the [MIT License](LICENSE) (if it
195includes code changes) and under the terms of the
196[Creative Commons Attribution 3.0 Unported License](docs/LICENSE)
197(if it includes documentation changes).
198
199
200## Code guidelines
201
202- Readability
203- Need semicolons
204- 4 spaces (no tabs)
205- strict mode
206- "Attractive"
207
208
209## License
210
211By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
212By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE).
213
214
215## Financial contributions
216
217We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/bootstrap-table).
218Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
219
220
221## Credits
222
223
224### Contributors
225
226Thank you to all the people who have already contributed to bootstrap-table!
227<a href="graphs/contributors"><img src="https://opencollective.com/bootstrap-table/contributors.svg?width=890" /></a>
228
229
230### Backers
231
232Thank you to all our backers! [[Become a backer](https://opencollective.com/bootstrap-table#backer)]
233
234<a href="https://opencollective.com/bootstrap-table#backers" target="_blank"><img src="https://opencollective.com/bootstrap-table/backers.svg?width=890"></a>
235
236
237### Sponsors
238
239Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/bootstrap-table#sponsor))
240
241<a href="https://opencollective.com/bootstrap-table/sponsor/0/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/0/avatar.svg"></a>
242<a href="https://opencollective.com/bootstrap-table/sponsor/1/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/1/avatar.svg"></a>
243<a href="https://opencollective.com/bootstrap-table/sponsor/2/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/2/avatar.svg"></a>
244<a href="https://opencollective.com/bootstrap-table/sponsor/3/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/3/avatar.svg"></a>
245<a href="https://opencollective.com/bootstrap-table/sponsor/4/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/4/avatar.svg"></a>
246<a href="https://opencollective.com/bootstrap-table/sponsor/5/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/5/avatar.svg"></a>
247<a href="https://opencollective.com/bootstrap-table/sponsor/6/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/6/avatar.svg"></a>
248<a href="https://opencollective.com/bootstrap-table/sponsor/7/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/7/avatar.svg"></a>
249<a href="https://opencollective.com/bootstrap-table/sponsor/8/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/8/avatar.svg"></a>
250<a href="https://opencollective.com/bootstrap-table/sponsor/9/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/9/avatar.svg"></a>
251
\No newline at end of file