Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CONTRIBUTING.md : WIP #800

Merged
merged 7 commits into from
Jan 15, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Kiwix JS Contribution Guide

If you have some development experience with HTML and JavaScript, we welcome Pull Requests on existing issues. Please look at this repository's Issue
tracker, in particular those marked "good first issue". If you have found a bug, check first that we do not have an existing issue covering it, and if not, feel free to create an issue.

Please follow these guidelines when contributing:

- Ask to be assigned to an issue you wish to work on first (we have lots of back issues, some of which are no longer relevant or wanted);
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
- We ask you only to pick issues for which you are confident that you have a solution;
- If you are a newcomer to the repo, create a personal fork and clone it locally. Check out a new branch with a name relevant to the issue you are working on;
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
- Follow the coding style of the area you are editing, including indentation, and be consistent with quotation marks and spacing;
- Use no higher than [ECMAScript 5](https://caniuse.com/es5) - notably, do not use arrow functions or `async` functions. However, Promises *are*
supported via a polyfill;
- Do not prettify code you are not working on;
- You must test your code yourself before asking for review, like this:
- set up a local Web server (we recommend Node/NPM's [http-server](https://www.npmjs.com/package/http-server));
- serve the root directory of the repository (e.g. `http-server .`);
- in a browser, navigate to the URL of the main `index.html` (e.g. http://localhost:8080/www/index.html);
- manually test your fix in at least Firefox and Chromium (Edge or Chrome), ideally also in IE11 or in "IE Mode" in Edge;
- be sure to test your fix in both "JQuery" mode and "Service Worker" mode (see Configuration);
- run the Unit tests (see below) in at least the above browsers.
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved

If all the tests are working fine, you can test the actual extension version in the end, like this:
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved

- Remove the '-WIP' from the version key from the manifest.json file present in the root of this repo;
- In Chromium, you can install the extension by loading the root folder with Extensions -> Load Unpacked(with Developer Mode turned ON) -> selecting the root folder of the repository;
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
- In Firefox, you can load an extension with Manage Your Extensions -> Debug Add-ons -> Load Temporary Add-on, and then pick any file in the repository.

gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
If your feature works and tests are passing, make a PR, describe the testing you have done, and ask for a code review.

Please note that the app caches its own code so that it can run as an offline-first Progressive Web App. This can complicate development, because you
may not see your changes, even after you refresh the browser. In Configuration, under "Expert settings", you will find a button that allows you to do
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
a full app reset, which will erase the PWA. When Service Worker mode is turned on, there is also a checkbox that bypasses the App Cache. You can turn
this on if you are frequently changing code and refreshing. Remember to turn it off for final testing. You can manually delete the App Cache in
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved
the browser's DevTools (see Application or Storage tabs). We also recommend you disable the browser's built-in cache, using the checkbox in the DevTools Network tab.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ These platforms are deprecated. We still partially test against them, and we'll
This application is released under the GPL v3 license. See http://www.gnu.org/licenses/ or the included LICENSE-GPLv3.txt file
The source code can be found at https://github.com/kiwix/kiwix-js

## Contributing

Kiwix JS is an open-source project. We encourage individuals with experience of HTML and JavaScript development to contribute to the documentation and code in this repository.

For code contributions, read our [CONTRIBUTING](CONTRIBUTING.md) guide.
gaurava05 marked this conversation as resolved.
Show resolved Hide resolved

To get to know the Kiwix project better, please familiarize yourself with the content on https://www.kiwix.org. There is also a Kiwix [Slack](https://join.slack.com/t/kiwixoffline/shared_invite/enQtOTUyMTg4NzMxMTM4LTU0MzYyZDliYjdmMDYzYWMzNDA0MDc4MWE5OGM0ODFhYjAxNWIxMjVjZTU4MTkyODJlZWFkMmQ2YTZkYTUzZDY) group which you can join.

## Unit tests

Unit tests can be run by opening `tests/index.html` file in Firefox, Edge, or Chromium/Chrome.
Expand Down