CONTRIBUTING.md 9.3 KB
Newer Older
A
amaitland 已提交
1
##CefSharp Project Contribution Guide
2 3
Thanks for your interest in contributing to the project! Please follow these simple guidelines:

A
amaitland 已提交
4
### General
A
Alex Maitland 已提交
5
- Please use [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cefsharp/CefSharp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) as your first point of call for basic/simple questions.
A
Alex Maitland 已提交
6
- When creating an issue please use the issue template provided.
A
Alex Maitland 已提交
7
- **Please read the full contents of [the FAQ](https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions) before submitting an issue**. Also searching the `GitHub` project is a **must**. It's quite likely your question has already been answered before. If something is unclear in the FAQ, of course feel free to ask; the idea is just to reduce the level of "noise" we have to go through, reading the same questions over and over again.
A
Alex Maitland 已提交
8 9
- Please make sure to **test out the current version** of `CefSharp` to see whether the problem you are encountering still exists.
- Don't cross-post: if you create an issue, and all the information is contained there, that's enough. There's no reason to also post it to Stackoverflow; it just creates "line noise". The project maintainers are very busy people like you and me, and things will sometimes take a few weeks (or in worst case, more) to answer. If you are in a rush - do your very best to investigate the problem thoroughly; if possible, fix the bug yourself and submit a pull request.
10
- Before creating a GitHub issue or pull request, try looking through the list & issue archives to make sure the issue at hand hasn't been raised before. [Google](http://www.google.com) can also be helpful: just typing "cefsharp appdomain" for example (when trying to see whether AppDomain support has been discussed before) will often give you helpful results.
A
Alex Maitland 已提交
11
- We do appreciate cultural/languages differences, that being said **never** demand that someone help you, this is not a commercial application with paid support! Please and thank you go a long way.
12
- This is a volunteer project, we give of our time freely and we ask for you to do the same. Contributions can be simple like updating/adding new entries in the [FAQ](https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions), creating new pages in the [WIKI](https://github.com/cefsharp/CefSharp/wiki), updating the examples. (Anyone with a `GitHub` account can edit the `WIKI`)
A
amaitland 已提交
13 14 15

### `CefSharp` vs `CEF`

A
Alex Maitland 已提交
16
`CefSharp` simply takes the building blocks provided by `CEF` and attempts to provide a usable '.Net' implementation.
A
amaitland 已提交
17 18
The upstream [`CEF` forum](http://magpcss.org/ceforum/) is a valuable resource, if your issues seems fairly low level, then please conduct some research before posting.

A
Alex Maitland 已提交
19
It maybe helpful to run the `cefclient` application and compare output with `CefSharp`. The `WinForms` and `WPF` versions use two different rendering modes, `WPF` uses Offscreen Rendering (`OSR`). `OffScreen` also uses `OSR` mode.
A
amaitland 已提交
20

A
Alex Maitland 已提交
21
- Download **Test App** from http://opensource.spotify.com/cefbuilds/index.html ( or http://cefbuilds.com for older versions)
A
amaitland 已提交
22 23 24 25
- To compare with WPF run `cefclient --multi-threaded-message-loop --off-screen-rendering-enabled`
- To compare with WinForms `cefclient --multi-threaded-message-loop`

To determine which version of `CEF` your build is running, open `chrome://version` and you'll see a number similar to `3.2062.1898`, in this case `2062` represents the branch which corresponds to http://cefbuilds.com/#branch_2062
26

A
amaitland 已提交
27
### What should I include when creating an `Issue`?
28

A
Alex Maitland 已提交
29
When creating an issue please use the provided by report template (the field will be pre-populated).
A
amaitland 已提交
30

A
Alex Maitland 已提交
31
A bug is a _demonstrable problem_ that is caused by the code in the repository. Ideally each issue is a useful resource for references purposes (Don't take offence if someone edits your description).
A
amaitland 已提交
32 33

Your bug report should **always follow this template**:
34 35 36

- **What is the expected output? What do you see instead?**
- **What steps will reproduce the problem?**
A
Alex Maitland 已提交
37
- **Are you using `WinForms`, `WPF` or `OffScreen`?**
38 39
- **What version of the product are you using? On what operating system? x86 or x64?**
    - What version are you using? Nuget? CI Nuget? build from a branch? If so which branch?
A
Alex Maitland 已提交
40
    - Win7, Win 8, Win10, etc?
41 42 43 44
- **Please provide any additional information below.**
    - A stack trace if available, any Exception information.
    - Does the cef log provide any relevant information? (By default there should be a debug.log file in your bin directory)
- Any other background information that's relevant? Are you doing something out of the ordinary? 3rd party controls?
45
- **Does this problem also occur in the `Cef` TestApp from http://cefbuilds.com?**
46

A
amaitland 已提交
47
Your bug report should include **what you were doing** in the software when you encountered it, **what you were expecting** to happen and **what happened instead**.
48

A
amaitland 已提交
49 50
**BE AWARE THAT BUG REPORTS MUST PROVIDE ALL OF THE INFORMATION STATED ABOVE!**

A
Alex Maitland 已提交
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
#### Help us help you

1. Asking the same questions over and over again is **Wasting our time**, search open/closed issues to see if your issue has already been addressed.
2. Having to constantly query users to gather information is **very frustrating**! Use the bug template provided above.
3. We have **very** limited active contributors so please spend as much time looking into your own problem as possible, the more you help yourself, the quicker things will get fixed.
4. Please don't hijack issues, if your problem is distinct then please create a unique issue (after searching previous issues).
5. Good bug reports are extremely helpful. The more information you provide, the more likely your issue will be resolved.
6. Good bug reports shouldn't leave others needing to chase you up for more information. Be sure to include the
details of your environment.
7. 'Ask Don't Tell' : Ask how to achieve something, **don't say it's broken** just because you haven't got it working yet!
8. **Isolate the problem** — ideally create a reproducible example.
9. **Include a screencast if relevant** - Is your issue about a design or front end feature or bug? The most helpful thing in the world is if we can *see* what you're talking about. Use [LICEcap](http://www.cockos.com/licecap/) to quickly and easily record a short screencast (24fps) and save it as an animated gif! Embed it directly into your GitHub issue.
10. When including code limit to small chunks, large blocks post as a [Gist](http://gist.github.com/) or similar
11. Please no links to binaries, e.g. zip files, either contribute your example as a github project, a gist or another public code sharing service.

A
amaitland 已提交
66 67 68 69 70 71 72 73 74
### Change Requests

Change requests cover both architectural and functional changes to how `CefSharp` works. If you have an idea for a refactor, or an improvement to a feature, etc - please be sure to:

1. **Use the GitHub search** and check someone else didn't get there first
2. Take a moment to think about the best way to make a case for, and explain what you're thinking as it's up to you to convince the project's leaders the change is worthwhile. Some questions to consider are:
	- Is it really one idea or is it many?
	- What problem are you solving?
	- Why is what you are suggesting better than what's already there?
A
amaitland 已提交
75 76

### Pull Requests/Feature Branches
A
amaitland 已提交
77

A
Alex Maitland 已提交
78
Pull requests are **awesome**. If you're looking to raise a `PR` for something which doesn't have an open issue, please think carefully about raising an issue which your PR can close, especially if you're fixing a bug. This makes it more likely that there will be enough information available for your PR to be properly tested and merged.
A
amaitland 已提交
79

J
jornh 已提交
80
- Please limit your changes to a logical grouping, keeping changesets small increases the likelihood they will be merged
A
amaitland 已提交
81 82
- If you then want to make subsequent changes, it's actually best to not do them before the feature is merged. Please wait for feedback/review before progressing. This greatly improves our ability to review your changes and dramatically increases the likelihood they will be merged in a timely fashion.
- If you wish to keep progressing on your work, please maintain a feature branch independent of the branch referenced by your pull request. From your WIP branch you can selectively merge in changes to the PR branch as required.
J
jornh 已提交
83
- In general, it's much better to be "too granular" with PR's that contain "change-the-world"-kind of changes, which usually tend to lag behind a lot longer before getting merged (if they ever will...).
A
amaitland 已提交
84
- Small (really, minimalistic) commits. Each individual commit only adds one specific thing. The basic approach to achieving this is to read your commit message. Do you feel the need to add multiple lines? Then you're doing too much at the same time.
A
amaitland 已提交
85 86 87 88 89 90 91 92

### Coding Style
- **Please** follow existing coding style when submitting pull requests.
- Most importantly, **use spaces** - do not use tabs (which is the default setting for C++ projects in Visual Studio).
- The "preview" function when creating a Pull Request on GitHub is very useful for identifying whitespace issues (and for checking out the impact of your changes) - please use it.
- Max number of columns are 132, please format your code accordingly
- Please don't add #Regions to the code
- When adding new files, please prepend the standard license disclaimer (just copy and paste from another source file)
A
Alex Maitland 已提交
93
- Do your best to follow these guidelines but don't be afraid to make mistakes when trying to apply them. We are all novices in the beginning.