Skip to content

Commit 6ee3654

Browse files
committed
Updates to release v1.3.1 fix #69 fix #68 fix #67 fix #66 fix #46
1 parent 89bec4d commit 6ee3654

33 files changed

+853
-596
lines changed

.github/CONTRIBUTING.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Contributing to yii2-markdown
2+
=========================
3+
Looking to contribute something to yii2-markdown? **Here's how you can help.**
4+
5+
Using the issue tracker
6+
-----------------------
7+
When [reporting bugs][reporting-bugs] or
8+
[requesting features][requesting-features], the
9+
[issue tracker on GitHub][issue-tracker] is the recommended channel to use.
10+
11+
The issue tracker **is not** a place for support requests. Refer the
12+
[extension documentation and demos](http://demos.krajee.com/markdown) and/or refer to the
13+
[webtips Q & A forum](http://webtips.krajee.com/questions) which are the better places to get help.
14+
15+
How to contribute via a pull request?
16+
-------------------------------------
17+
Refer this [git workflow for contributors](.github/GIT-WORKFLOW.md).
18+
19+
Reporting bugs with yii2-markdown
20+
---------------------------------
21+
We really appreciate clear bug reports that _consistently_ show an issue
22+
within _yii2-markdown_.
23+
24+
The ideal bug report follows these guidelines:
25+
26+
1. **Use the [GitHub issue search][issue-search]** — Check if the issue
27+
has already been reported.
28+
2. **Check if the issue has been fixed** — Try to reproduce the problem
29+
using the code in the `master` branch.
30+
3. **Isolate the problem** — Try to share a demo or a test case that
31+
consistently reproduces the problem.
32+
33+
Please try to be as detailed as possible in your bug report, especially if an
34+
isolated test case cannot be made. Some useful questions to include the answer
35+
to are:
36+
37+
- What steps can be used to reproduce the issue?
38+
- What is the bug and what is the expected outcome?
39+
- What browser(s) and Operating System have you tested with?
40+
- Does the bug happen consistently across all tested browsers?
41+
- What version of jQuery are you using? And what version of yii2-markdown?
42+
- Are you using yii2-markdown with other plugins?
43+
44+
All of these questions will help others fix and identify any potential bugs.
45+
46+
Requesting features in yii2-markdown
47+
------------------------------------------
48+
Before starting work on a major feature for yii2-markdown, **read the
49+
[documentation](http://demos.krajee.com/markdown) first** or you may risk spending a considerable amount of
50+
time on something which the project developers are not interested in bringing into the project.
51+
52+
Licensing
53+
---------
54+
55+
It should also be made clear that **all code contributed to yii2-markdown** must be
56+
licensable under the [BSD-3 license][licensing]. Code that cannot be released
57+
under this license **cannot be accepted** into the project.
58+
59+
[issue-search]: https://github.com/kartik-v/yii2-markdown/search?q=&type=Issues
60+
[issue-tracker]: https://github.com/kartik-v/yii2-markdown/issues
61+
[licensing]: https://github.com/kartik-v/yii2-markdown/blob/master/LICENSE.md
62+
[reporting-bugs]: #reporting-bugs-with-yii2-markdown
63+
[requesting-features]: #requesting-features-in-yii2-markdown

.github/GIT-WORKFLOW.md

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
Git workflow for yii2-markdown contributors
2+
===========================================
3+
4+
So you want to contribute to yii2-markdown? Great! But to increase the chances of your changes being accepted quickly, please
5+
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)
6+
or learn something about [Git internal data model](http://nfarina.com/post/9868516270/git-is-simpler).
7+
8+
Setup the development environment
9+
---------------------------------
10+
11+
Assuming you already have a yii2 development environment, carry out the following steps to create a development environment for the repo.
12+
13+
### 1. [Fork](http://help.github.com/fork-a-repo/) the yii2-markdown repository on GitHub and clone your fork to your development environment
14+
15+
```
16+
git clone [email protected]:YOUR-GITHUB-USERNAME/yii2-markdown.git
17+
```
18+
19+
If you have trouble setting up Git with GitHub in Linux, or are getting errors like "Permission Denied (publickey)",
20+
then you must [setup your Git installation to work with GitHub](http://help.github.com/linux-set-up-git/)
21+
22+
> Tip: if you're not fluent with Git, we recommend reading excellent free [Pro Git book](https://git-scm.com/book/en/v2).
23+
24+
### 2. Add the main yii2-markdown repository as an additional git remote called "upstream"
25+
26+
Change to the directory where you cloned yii2-markdown, normally, "yii2-markdown". Then enter the following command:
27+
28+
```
29+
git remote add upstream git://github.com/kartik-v/yii2-markdown.git
30+
```
31+
32+
### 3. Prepare the testing environment
33+
34+
- 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.
35+
- Ensure you have the latest `dev-master` releases of all dependent extensions via your composer updates
36+
- Ensure you use the above cloned latest `yii2-markdown` code in your testing environment
37+
38+
**Now you have a working playground for hacking on yii2-markdown.**
39+
40+
Working on bugs and features
41+
----------------------------
42+
43+
Having prepared your development environment as explained above you can now start working on the feature or bugfix.
44+
45+
### 1. Make sure there is an issue created for the thing you are working on if it requires significant effort to fix
46+
47+
All new features and bug fixes should have an associated issue to provide a single point of reference for discussion
48+
and documentation. Take a few minutes to look through the existing issue list for one that matches the contribution you
49+
intend to make. If you find one already on the issue list, then please leave a comment on that issue indicating you
50+
intend to work on that item. If you do not find an existing issue matching what you intend to work on, please
51+
open a new issue or create a pull request directly if it is straightforward fix. This will allow the team to
52+
review your suggestion, and provide appropriate feedback along the way.
53+
54+
> 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.
55+
56+
### 2. Fetch the latest code from the main yii2-markdown branch
57+
58+
```
59+
git fetch upstream
60+
```
61+
62+
You should start at this point for every new contribution to make sure you are working on the latest code.
63+
64+
### 3. Create a new branch for your feature based on the current yii2-markdown master branch
65+
66+
> That's very important since you will not be able to submit more than one pull request from your account if you'll
67+
use master.
68+
69+
Each separate bug fix or change should go in its own branch. Branch names should be descriptive and start with
70+
the number of the issue that your code relates to. If you aren't fixing any particular issue, just skip number.
71+
For example:
72+
73+
```
74+
git checkout upstream/master
75+
git checkout -b 999-name-of-your-branch-goes-here
76+
```
77+
78+
### 4. Do your magic, write your code
79+
80+
Make sure you have first updated the testing environment as mentioned in [prepare-the-testing-environment][prepare-the-testing-environment].
81+
82+
Then make sure you have the updated code with your change and it works :).
83+
84+
Unit tests are always welcome. Tested and well covered code greatly simplifies the task of checking your contributions.
85+
Failing unit tests as issue description are also accepted.
86+
87+
### 5. Update the CHANGE log
88+
89+
Edit the `CHANGE.md` file to include your change, you should insert this at the top of the file under the
90+
first heading (the version that is currently under development), the line in the change log should look like one of the following:
91+
92+
```
93+
Bug #999: a description of the bug fix (Your Name)
94+
Enh #999: a description of the enhancement (Your Name)
95+
```
96+
97+
`#999` is the issue number that the `Bug` or `Enh` is referring to.
98+
The changelog should be grouped by type (`Bug`,`Enh`) and ordered by issue number.
99+
100+
For very small fixes, e.g. typos and documentation changes, there is no need to update the `CHANGE.md`.
101+
102+
### 6. Commit your changes
103+
104+
add the files/changes you want to commit to the [staging area](http://gitref.org/basic/#add) with
105+
106+
```
107+
git add path/to/my/file.php
108+
```
109+
110+
You can use the `-p` option to select the changes you want to have in your commit.
111+
112+
Commit your changes with a descriptive commit message. Make sure to mention the ticket number with `#XXX` so GitHub will
113+
automatically link your commit with the ticket:
114+
115+
```
116+
git commit -m "A brief description of this change which fixes #999 goes here"
117+
```
118+
119+
### 7. Pull the latest yii2-markdown code from upstream into your branch
120+
121+
```
122+
git pull upstream master
123+
```
124+
125+
This ensures you have the latest code in your branch before you open your pull request. If there are any merge conflicts,
126+
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
127+
with one click.
128+
129+
### 8. Having resolved any conflicts, push your code to GitHub
130+
131+
```
132+
git push -u origin 999-name-of-your-branch-goes-here
133+
```
134+
135+
The `-u` parameter ensures that your branch will now automatically push and pull from the GitHub branch. That means
136+
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
137+
to the pull request.
138+
139+
### 9. Open a [pull request](http://help.github.com/send-pull-requests/) against upstream.
140+
141+
Go to your repository on GitHub and click "Pull Request", choose your branch on the right and enter some more details
142+
in the comment box. To link the pull request to the issue put anywhere in the pull comment `#999` where 999 is the
143+
issue number.
144+
145+
> Note that each pull-request should fix a single change. For multiple, unrelated changes, please open multiple pull requests.
146+
147+
### 10. Someone will review your code
148+
149+
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
150+
another pull request if your current one is still open). If your code is accepted it will be merged into the main branch
151+
and become part of the next yii2-markdown release. If not, don't be disheartened, different people need different features and yii2-markdown
152+
can't be everything to everyone, your code will still be available on GitHub as a reference for people who need it.
153+
154+
### 11. Cleaning it up
155+
156+
After your code was either accepted or declined you can delete branches you've worked with from your local repository
157+
and `origin`.
158+
159+
```
160+
git checkout master
161+
git branch -D 999-name-of-your-branch-goes-here
162+
git push origin --delete 999-name-of-your-branch-goes-here
163+
```
164+
165+
### Command overview (for advanced contributors)
166+
167+
```
168+
git clone [email protected]:YOUR-GITHUB-USERNAME/yii2-markdown.git
169+
git remote add upstream git://github.com/kartik-v/yii2-markdown.git
170+
```
171+
172+
```
173+
git fetch upstream
174+
git checkout upstream/master
175+
git checkout -b 999-name-of-your-branch-goes-here
176+
177+
/* do your magic, update changelog if needed */
178+
179+
git add path/to/my/file.php
180+
git commit -m "A brief description of this change which fixes #999 goes here"
181+
git pull upstream master
182+
git push -u origin 999-name-of-your-branch-goes-here
183+
```
184+
185+
[prepare-the-testing-environment]: #3-prepare-the-testing-environment

.github/ISSUE_TEMPLATE.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Prerequisites
2+
3+
- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
4+
- [ ] The issue still exists against the latest `master` branch of yii2-markdown.
5+
- [ ] 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).
6+
- [ ] This is not a general programming / coding question. (Those should be directed to the [webtips Q & A forum](http://webtips.krajee.com/questions)).
7+
- [ ] I have attempted to find the simplest possible steps to reproduce the issue.
8+
- [ ] I have included a failing test as a pull request (Optional).
9+
10+
## Steps to reproduce the issue
11+
12+
1.
13+
2.
14+
3.
15+
16+
## Expected behavior and actual behavior
17+
18+
When I follow those steps, I see...
19+
20+
I was expecting...
21+
22+
## Environment
23+
24+
#### Browsers
25+
26+
- [ ] Google Chrome
27+
- [ ] Mozilla Firefox
28+
- [ ] Internet Explorer
29+
- [ ] Safari
30+
31+
#### Operating System
32+
33+
- [ ] Windows
34+
- [ ] Mac OS X
35+
- [ ] Linux
36+
- [ ] Mobile
37+
38+
#### Libraries
39+
40+
- jQuery version:
41+
- yii2-markdown version:
42+
43+
## Isolating the problem
44+
45+
- [ ] This bug happens [on the demos page](https://demos.krajee.com/markdown-demo)
46+
- [ ] The bug happens consistently across all tested browsers
47+
- [ ] This bug happens when using yii2-markdown without other plugins.

.github/PULL_REQUEST_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Scope
2+
This pull request includes a
3+
4+
- [ ] Bug fix
5+
- [ ] New feature
6+
- [ ] Translation
7+
8+
## Changes
9+
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)):
10+
11+
-
12+
-
13+
-
14+
15+
## Related Issues
16+
If this is related to an existing ticket, include a link to it as well.

CHANGE.md

+30-18
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
version 1.3.1
2-
=============
3-
*Date:* 13-Feb-2015
4-
1+
Change Log: `yii2-markdown`
2+
==========================
3+
4+
## Version 1.3.1
5+
6+
*Date:* 08-Jun-2018
7+
8+
- (enh #69): Reorganize/Optimize code and convert to a jquery plugin.
9+
- (bug #66, #67, #68): Correct preview action response.
10+
- (enh #63): Add Marathi Translations.
11+
- (enh #61): Fix 'modules' in Readme.
12+
- (enh #57): Use `$(..).on("load",…)` instead of `$(..).load()`.
13+
- (enh #56): Add Polish Translations.
14+
- (enh #53): Update German Translations.
15+
- (enh #52): Update Dutch Translations.
16+
- (enh #51): Correct typo in example in docs.
17+
- (enh #50): Fix namespace.
18+
- (enh #46): Correct composer dependencies.
19+
- (enh #43, #44): Correct Smarty templates.
520
- (enh #34): Allow markdown to be used as a sub-module.
621
- Set copyright year to current.
722

8-
version 1.3.0
9-
=============
23+
## Version 1.3.0
24+
1025
*Date:* 12-Jan-2015
1126

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

18-
version 1.2.0
19-
=============
33+
## Version 1.2.0
34+
2035
*Date:* 16-Dec-2014
2136

22-
- (enh #9): German translations updated
23-
- (enh #13): French translations included
24-
- (enh #19): Russian translations included
25-
- (enh #20): Italian translations included
26-
- (enh #29): Hungarian translations included
2737
- (enh #30): Set dependency on Bootstrap Plugin Asset
38+
- (enh #29): Hungarian translations included
39+
- (enh #20): Italian translations included
40+
- (enh #19): Russian translations included
41+
- (enh #13): French translations included
42+
- (enh #9): German translations updated
2843

29-
version 1.1.0
30-
=============
44+
## Version 1.1.0
3145

3246
*Date:* 09-Nov-2014
3347

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

37-
38-
version 1.0.0
39-
=============
51+
## Version 1.0.0
4052

4153
*Date:* 01-Dec-2013
4254

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015, Kartik Visweswaran
1+
Copyright (c) 2015 - 2018, Kartik Visweswaran
22
Krajee.com
33
All rights reserved.
44

0 commit comments

Comments
 (0)