From 1dff5e13df0b5660e247348ae6b73914a1a3dbaa Mon Sep 17 00:00:00 2001 From: Wayne Van Son Date: Tue, 15 Sep 2020 03:27:47 +0000 Subject: [PATCH] docs: update github issue templates and contribution guide (#1914) * refactor: remove code formattings config files * docs: add more detail to contribution guidelines * docs: remove custom templates * docs: update bug report issue * docs: add discussion template * docs: update featue template --- .editorconfig | 15 ---- .github/ISSUE_TEMPLATE/bug-report.md | 69 ++++++----------- .github/ISSUE_TEMPLATE/custom-template.md | 48 ------------ .github/ISSUE_TEMPLATE/discussion.md | 39 ++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 36 ++------- .jshintrc | 25 ------ CONTRIBUTING.md | 92 +++++++++++++++++++---- 7 files changed, 146 insertions(+), 178 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .github/ISSUE_TEMPLATE/custom-template.md create mode 100644 .github/ISSUE_TEMPLATE/discussion.md delete mode 100644 .jshintrc diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 09d275186..000000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -# editorconfig.org -root = true - -[*] -indent_style = tab -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false - -[*.yml] -indent_style = space diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 53a033cfd..a35201c37 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,73 +1,48 @@ --- name: Bug report -about: Create a report to help us improve -title: "[bug] " +about: Document a bug with a working example +title: "" labels: "" assignees: "" --- - + + -If it is a bug found from using one of these, please link to the related issue. +### Scenario ---> +\ -**Describe the bug** +### Steps to Reproduce - - -**To Reproduce** -Steps to reproduce the behavior: +Summary of steps if applicable. 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** - - - -**Information** - - +## Describe the bug -Versions - Look in your `package.json` for this information: -sortablejs = ^x.x.x -@types/sortablejs = ^x.x.x - -**Additional context** -Add any other context about the problem here. - -**Reproduction** -codesandbox: - - -Providing a codesandbox really helps us understand your issue. -Bugs with codesandboxes attached are likely to be resolved more quickly than others. +## Expected behavior -Once you've created a public codesandbox, please paste a link in here + -Here are some templates to get you started. +## Version -- Javascript: https://codesandbox.io/s/sortablejs-javascript-jy3tl?file=/src/index.js -- Typescript: https://codesandbox.io/s/sortablejs-typescript-6it9n?file=/src/index.ts +| package | version | +| :------------------ | :------------------ | +| `sortablejs` | `^x.x.x-?` | +| `@types/sortablejs` | `^x.x.x-?` \|\| N/A | ---> +## Additional Context diff --git a/.github/ISSUE_TEMPLATE/custom-template.md b/.github/ISSUE_TEMPLATE/custom-template.md deleted file mode 100644 index 14e2a2239..000000000 --- a/.github/ISSUE_TEMPLATE/custom-template.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: Custom issue template -about: Not a feature request or a bug report. Usually questions, queries or concerns -title: "" -labels: "" -assignees: "" ---- - -**Custom** - - - -**Reproduction** -codesandbox: - - diff --git a/.github/ISSUE_TEMPLATE/discussion.md b/.github/ISSUE_TEMPLATE/discussion.md new file mode 100644 index 000000000..6dfe95723 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/discussion.md @@ -0,0 +1,39 @@ +--- +name: Question/Feedback +about: Ask the community a question or give us some feedback! +title: "" +labels: "" +assignees: "" +--- + +Please answer the following: + +- What result are you trying to achieve and why? +- Where are you getting stuck at? + +## Reproduction + +### Scenario + + + + + + +\ + +### Steps to Reproduce + +Summary of steps if applicable. + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. Looks good + +## Version + +| package | version | +| :------------------ | :------------------ | +| `sortablejs` | `^x.x.x-?` | +| `@types/sortablejs` | `^x.x.x-?` \|\| N/A | diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index a0bbb57d0..88c190fb7 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -6,36 +6,16 @@ labels: "" assignees: "" --- - - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. +## Additional Context diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index ffbcc18f9..000000000 --- a/.jshintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "strict": false, - "newcap": false, - "node": true, - "expr": true, - "supernew": true, - "laxbreak": true, - "esversion": 9, - "white": true, - "globals": { - "define": true, - "test": true, - "expect": true, - "module": true, - "asyncTest": true, - "start": true, - "ok": true, - "equal": true, - "notEqual": true, - "deepEqual": true, - "window": true, - "document": true, - "performance": true - } -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ab512bf0..0d911171e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,26 +1,88 @@ # Contribution Guidelines -### Issue +Thank you for considering to contribute. Please follow the guidelines. +If the guidelines are not followed, your issues or requests may be closed or left on hold until the requirements are fulfilled. - 1. Try [master](https://github.com/SortableJS/Sortable/tree/master/)-branch, perhaps the problem has been solved; - 2. [Use the search](https://github.com/SortableJS/Sortable/search?type=Issues&q=problem), maybe already have an answer; - 3. If not found, create example on [jsbin.com (draft)](https://jsbin.com/kamiwez/edit?html,js,output) and describe the problem. +--- + +## Manners and Etiquette 🎩 + +Please be thoughtful and considerate of others when posting any content within the sortable community. We do this for free, just like you. + +Hate speech and non constructive, negatively loaded critisism will be issued with a warnings and potential bans. --- -### Pull Request +## Issues ❗ + +### Submitting an Issueβœ…βœ… + +We have three broad categories, to which _you should pick the correct template_. Selecting the correct templates help triage issues, allowing us to resolve the issue faster. + +We have **enhancements & features**, **bug reports** and **questions**. + +> _todo: expand on these_ + +#### Enhancements & Featuresβž•βž•βž•βž• βœ…βž•βž•βž•βž•βž•βž• + +These are additions to functionality that do are not documented. + +#### Bugs + +These are related to existing functionality that are documented, but not working correctly. + +Functionality bugs without a codesandbox or a jsfiddle will be marked as low priority unless a description is made. + +#### Questions + +When you have a question about how the code works, or you've become stuck on how to do something. + +--- + +## πŸšƒπŸšƒπŸšƒPull Requests πŸšƒπŸšƒπŸ“₯🌊🌊 + +All pull requests should close an issue, unless it: + +- Fixes a typo in the documentation +- Adds some documentation + +### Workflow + +We're aware that easy use nature of the library brings in many new programmers seeking to contribute. Please read the section below for how to do it properly. + +#### Git and GitHub CLI + +Please read the [GitHub Workflow Guide](https://gist.github.com/Chaser324/ce0505fbed06b947d962) for how to handle git when making changes. This is a great guide and once you learn it here, you can take it everywhere. + +You can use the [GitHub CLI](https://github.com/cli/cli) to skip a few steps, as it would create the fork, clone it locally and add both origin and upstream branches. + +> todo: add some more detailed instructions for the beginners. + +--- + +## Run locally + +The entry points are in `packages/sortablejs`, but most of the code is in `packages/sortable`. We've made this separation in preparation for the future. + +### Bootstrap + +After creating your fork and/or cloning this repository, please bootstrap (initialize) the repository so code can be run and built. + +```sh +# install dependencies with yarn +yarn install - 1. Only request to merge with the [master](https://github.com/SortableJS/Sortable/tree/master/)-branch. - 2. Only modify source files, **do not commit the resulting build**. Build files are Sortable.js, Sortable.min.js and modular/*.js. +# Use the locally downloaded version of lerna +# to install sub package dependencies +yarn lerna bootstrap +``` -### Setup +### Build - 1. Fork the repo on [github](https://github.com) - 2. Clone locally - 3. Run `npm i` in the local repo +Run `yarn build` to build all the files. You should end up with a total of 10 files between the two folders `packages/sortablejs/(dist|modular)` -### Building +_**Note:** Please don't use the following files, as they're deprecated and kept only for backwards compatability:_ - - For development, build the `./Sortable.js` file using the command `npm run build:umd:watch` - - To build everything and minify it, run `npm run build` - - Do not commit the resulting builds in any pull request – they will be generated at release +- Sortable.js +- Sortable.min.js +- modular/\*.js.