Skip to content

Commit

Permalink
Updates to release v1.3.1 fix #69 fix #68 fix #67 fix #66 fix #46
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Jun 8, 2018
1 parent 89bec4d commit 601eb06
Show file tree
Hide file tree
Showing 33 changed files with 852 additions and 621 deletions.
63 changes: 63 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Contributing to yii2-markdown
=========================
Looking to contribute something to yii2-markdown? **Here's how you can help.**

Using the issue tracker
-----------------------
When [reporting bugs][reporting-bugs] or
[requesting features][requesting-features], the
[issue tracker on GitHub][issue-tracker] is the recommended channel to use.

The issue tracker **is not** a place for support requests. Refer the
[extension documentation and demos](http://demos.krajee.com/markdown) and/or refer to the
[webtips Q & A forum](http://webtips.krajee.com/questions) which are the better places to get help.

How to contribute via a pull request?
-------------------------------------
Refer this [git workflow for contributors](.github/GIT-WORKFLOW.md).

Reporting bugs with yii2-markdown
---------------------------------
We really appreciate clear bug reports that _consistently_ show an issue
within _yii2-markdown_.

The ideal bug report follows these guidelines:

1. **Use the [GitHub issue search][issue-search]** — Check if the issue
has already been reported.
2. **Check if the issue has been fixed** — Try to reproduce the problem
using the code in the `master` branch.
3. **Isolate the problem** — Try to share a demo or a test case that
consistently reproduces the problem.

Please try to be as detailed as possible in your bug report, especially if an
isolated test case cannot be made. Some useful questions to include the answer
to are:

- What steps can be used to reproduce the issue?
- What is the bug and what is the expected outcome?
- What browser(s) and Operating System have you tested with?
- Does the bug happen consistently across all tested browsers?
- What version of jQuery are you using? And what version of yii2-markdown?
- Are you using yii2-markdown with other plugins?

All of these questions will help others fix and identify any potential bugs.

Requesting features in yii2-markdown
------------------------------------------
Before starting work on a major feature for yii2-markdown, **read the
[documentation](http://demos.krajee.com/markdown) first** or you may risk spending a considerable amount of
time on something which the project developers are not interested in bringing into the project.

Licensing
---------

It should also be made clear that **all code contributed to yii2-markdown** must be
licensable under the [BSD-3 license][licensing]. Code that cannot be released
under this license **cannot be accepted** into the project.

[issue-search]: https://github.com/kartik-v/yii2-markdown/search?q=&type=Issues
[issue-tracker]: https://github.com/kartik-v/yii2-markdown/issues
[licensing]: https://github.com/kartik-v/yii2-markdown/blob/master/LICENSE.md
[reporting-bugs]: #reporting-bugs-with-yii2-markdown
[requesting-features]: #requesting-features-in-yii2-markdown
185 changes: 185 additions & 0 deletions .github/GIT-WORKFLOW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
Git workflow for yii2-markdown contributors
===========================================

So you want to contribute to yii2-markdown? Great! But to increase the chances of your changes being accepted quickly, please
follow the following steps. If you are new to Git and GitHub, you might want to first check out [GitHub help](http://help.github.com/), [try Git](https://try.github.com)
or learn something about [Git internal data model](http://nfarina.com/post/9868516270/git-is-simpler).

Setup the development environment
---------------------------------

Assuming you already have a yii2 development environment, carry out the following steps to create a development environment for the repo.

### 1. [Fork](http://help.github.com/fork-a-repo/) the yii2-markdown repository on GitHub and clone your fork to your development environment

```
git clone [email protected]:YOUR-GITHUB-USERNAME/yii2-markdown.git
```

If you have trouble setting up Git with GitHub in Linux, or are getting errors like "Permission Denied (publickey)",
then you must [setup your Git installation to work with GitHub](http://help.github.com/linux-set-up-git/)

> Tip: if you're not fluent with Git, we recommend reading excellent free [Pro Git book](https://git-scm.com/book/en/v2).
### 2. Add the main yii2-markdown repository as an additional git remote called "upstream"

Change to the directory where you cloned yii2-markdown, normally, "yii2-markdown". Then enter the following command:

```
git remote add upstream git://github.com/kartik-v/yii2-markdown.git
```

### 3. Prepare the testing environment

- You should have a working yii 2 development environment in which you have already installed `yii2-markdown` and includes latest and updated `yii2-markdown` fork from source.
- Ensure you have the latest `dev-master` releases of all dependent extensions via your composer updates
- Ensure you use the above cloned latest `yii2-markdown` code in your testing environment

**Now you have a working playground for hacking on yii2-markdown.**

Working on bugs and features
----------------------------

Having prepared your development environment as explained above you can now start working on the feature or bugfix.

### 1. Make sure there is an issue created for the thing you are working on if it requires significant effort to fix

All new features and bug fixes should have an associated issue to provide a single point of reference for discussion
and documentation. Take a few minutes to look through the existing issue list for one that matches the contribution you
intend to make. If you find one already on the issue list, then please leave a comment on that issue indicating you
intend to work on that item. If you do not find an existing issue matching what you intend to work on, please
open a new issue or create a pull request directly if it is straightforward fix. This will allow the team to
review your suggestion, and provide appropriate feedback along the way.

> For small changes or documentation issues or straightforward fixes, you don't need to create an issue, a pull request is enough in this case.
### 2. Fetch the latest code from the main yii2-markdown branch

```
git fetch upstream
```

You should start at this point for every new contribution to make sure you are working on the latest code.

### 3. Create a new branch for your feature based on the current yii2-markdown master branch

> That's very important since you will not be able to submit more than one pull request from your account if you'll
use master.

Each separate bug fix or change should go in its own branch. Branch names should be descriptive and start with
the number of the issue that your code relates to. If you aren't fixing any particular issue, just skip number.
For example:

```
git checkout upstream/master
git checkout -b 999-name-of-your-branch-goes-here
```

### 4. Do your magic, write your code

Make sure you have first updated the testing environment as mentioned in [prepare-the-testing-environment][prepare-the-testing-environment].

Then make sure you have the updated code with your change and it works :).

Unit tests are always welcome. Tested and well covered code greatly simplifies the task of checking your contributions.
Failing unit tests as issue description are also accepted.

### 5. Update the CHANGE log

Edit the `CHANGE.md` file to include your change, you should insert this at the top of the file under the
first heading (the version that is currently under development), the line in the change log should look like one of the following:

```
Bug #999: a description of the bug fix (Your Name)
Enh #999: a description of the enhancement (Your Name)
```

`#999` is the issue number that the `Bug` or `Enh` is referring to.
The changelog should be grouped by type (`Bug`,`Enh`) and ordered by issue number.

For very small fixes, e.g. typos and documentation changes, there is no need to update the `CHANGE.md`.

### 6. Commit your changes

add the files/changes you want to commit to the [staging area](http://gitref.org/basic/#add) with

```
git add path/to/my/file.php
```

You can use the `-p` option to select the changes you want to have in your commit.

Commit your changes with a descriptive commit message. Make sure to mention the ticket number with `#XXX` so GitHub will
automatically link your commit with the ticket:

```
git commit -m "A brief description of this change which fixes #999 goes here"
```

### 7. Pull the latest yii2-markdown code from upstream into your branch

```
git pull upstream master
```

This ensures you have the latest code in your branch before you open your pull request. If there are any merge conflicts,
you should fix them now and commit the changes again. This ensures that it's easy for the yii2-markdown team to merge your changes
with one click.

### 8. Having resolved any conflicts, push your code to GitHub

```
git push -u origin 999-name-of-your-branch-goes-here
```

The `-u` parameter ensures that your branch will now automatically push and pull from the GitHub branch. That means
if you type `git push` the next time it will know where to push to. This is useful if you want to later add more commits
to the pull request.

### 9. Open a [pull request](http://help.github.com/send-pull-requests/) against upstream.

Go to your repository on GitHub and click "Pull Request", choose your branch on the right and enter some more details
in the comment box. To link the pull request to the issue put anywhere in the pull comment `#999` where 999 is the
issue number.

> Note that each pull-request should fix a single change. For multiple, unrelated changes, please open multiple pull requests.
### 10. Someone will review your code

Someone will review your code, and you might be asked to make some changes, if so go to step #6 (you don't need to open
another pull request if your current one is still open). If your code is accepted it will be merged into the main branch
and become part of the next yii2-markdown release. If not, don't be disheartened, different people need different features and yii2-markdown
can't be everything to everyone, your code will still be available on GitHub as a reference for people who need it.

### 11. Cleaning it up

After your code was either accepted or declined you can delete branches you've worked with from your local repository
and `origin`.

```
git checkout master
git branch -D 999-name-of-your-branch-goes-here
git push origin --delete 999-name-of-your-branch-goes-here
```

### Command overview (for advanced contributors)

```
git clone [email protected]:YOUR-GITHUB-USERNAME/yii2-markdown.git
git remote add upstream git://github.com/kartik-v/yii2-markdown.git
```

```
git fetch upstream
git checkout upstream/master
git checkout -b 999-name-of-your-branch-goes-here
/* do your magic, update changelog if needed */
git add path/to/my/file.php
git commit -m "A brief description of this change which fixes #999 goes here"
git pull upstream master
git push -u origin 999-name-of-your-branch-goes-here
```

[prepare-the-testing-environment]: #3-prepare-the-testing-environment
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Prerequisites

- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [ ] The issue still exists against the latest `master` branch of yii2-markdown.
- [ ] This is not an usage question. I confirm having gone through and read the [documentation](http://demos.krajee.com/markdown) and [demos](http://demos.krajee.com/markdown-demo).
- [ ] This is not a general programming / coding question. (Those should be directed to the [webtips Q & A forum](http://webtips.krajee.com/questions)).
- [ ] I have attempted to find the simplest possible steps to reproduce the issue.
- [ ] I have included a failing test as a pull request (Optional).

## Steps to reproduce the issue

1.
2.
3.

## Expected behavior and actual behavior

When I follow those steps, I see...

I was expecting...

## Environment

#### Browsers

- [ ] Google Chrome
- [ ] Mozilla Firefox
- [ ] Internet Explorer
- [ ] Safari

#### Operating System

- [ ] Windows
- [ ] Mac OS X
- [ ] Linux
- [ ] Mobile

#### Libraries

- jQuery version:
- yii2-markdown version:

## Isolating the problem

- [ ] This bug happens [on the demos page](https://demos.krajee.com/markdown-demo)
- [ ] The bug happens consistently across all tested browsers
- [ ] This bug happens when using yii2-markdown without other plugins.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Scope
This pull request includes a

- [ ] Bug fix
- [ ] New feature
- [ ] Translation

## Changes
The following changes were made (this change is also documented in the [change log](https://github.com/kartik-v/yii2-markdown/blob/master/CHANGE.md)):

-
-
-

## Related Issues
If this is related to an existing ticket, include a link to it as well.
48 changes: 30 additions & 18 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
version 1.3.1
=============
*Date:* 13-Feb-2015

Change Log: `yii2-markdown`
==========================

## Version 1.3.1

*Date:* 08-Jun-2018

- (enh #69): Reorganize/Optimize code and convert to a jquery plugin.
- (bug #66, #67, #68): Correct preview action response.
- (enh #63): Add Marathi Translations.
- (enh #61): Fix 'modules' in Readme.
- (enh #57): Use `$(..).on("load",…)` instead of `$(..).load()`.
- (enh #56): Add Polish Translations.
- (enh #53): Update German Translations.
- (enh #52): Update Dutch Translations.
- (enh #51): Correct typo in example in docs.
- (enh #50): Fix namespace.
- (enh #46): Correct composer dependencies.
- (enh #43, #44): Correct Smarty templates.
- (enh #34): Allow markdown to be used as a sub-module.
- Set copyright year to current.

version 1.3.0
=============
## Version 1.3.0

*Date:* 12-Jan-2015

- (enh #32): Add Ukranian translations.
Expand All @@ -15,28 +30,25 @@ version 1.3.0
- Change message file category name to begin with `kv` prefix.
- Code formatting updates as per Yii2 coding style.

version 1.2.0
=============
## Version 1.2.0

*Date:* 16-Dec-2014

- (enh #9): German translations updated
- (enh #13): French translations included
- (enh #19): Russian translations included
- (enh #20): Italian translations included
- (enh #29): Hungarian translations included
- (enh #30): Set dependency on Bootstrap Plugin Asset
- (enh #29): Hungarian translations included
- (enh #20): Italian translations included
- (enh #19): Russian translations included
- (enh #13): French translations included
- (enh #9): German translations updated

version 1.1.0
=============
## Version 1.1.0

*Date:* 09-Nov-2014

- Enhance dependency validation using common code base.
- Set release to stable.


version 1.0.0
=============
## Version 1.0.0

*Date:* 01-Dec-2013

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015, Kartik Visweswaran
Copyright (c) 2015 - 2018, Kartik Visweswaran
Krajee.com
All rights reserved.

Expand Down
Loading

0 comments on commit 601eb06

Please sign in to comment.