First off, thanks for taking the time to contribute!
The following is a set of guidelines for contributing to FormSchema and its packages, which are hosted in the FormSchema Organization on GitLab. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
I don't want to read this whole thing, I just have a question!!!
What should I know before I get started?
Note: Please don't file an issue to ask a question. You'll get faster results by using the resources below.
We have an official message board with a detailed FAQ and where the community chimes in with helpful advice if you have questions.
If chat is more your speed, you can join the FormSchema Gitter team:
- Join the FormSchema Team
- Even though Gitter is a chat service, sometimes it takes several hours for community members to respond — please be patient!
- Use the
general
room for general questions or discussion about FormSchema - Use the
native
room for questions about@formschema/native
- Use the
elementui
room for questions about@formschema/components/elementui
- There are many other rooms available, check the room list
When you initially consider contributing to FormSchema, you might be unsure about which of repositories implements the functionality you want to change or report a bug for. This section should help you with that.
Here's a list of the big ones:
- formschema/components/core - FormSchema Core
- formschema/native - A native HTML wrapping of FormSchema Core
- formschema/components/elementui - A ElementUI wrapping of FormSchema Core
There are other UI wrappers that aren't being actively maintained:
- formschema/components/material - A VueMaterial wrapping of FormSchema Core
- formschema/components/bulma - A Bulma wrapping of FormSchema Core
- formschema/components/buefy - A Buefy wrapping of FormSchema Core
This section guides you through submitting a bug report for FormSchema. Following these guidelines helps maintainers and the community understand your report 📝, reproduce the behavior 💻 💻, and find related reports 🔎.
Before creating bug reports, please check this list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. Fill out the required template, the information it asks for helps us resolve issues faster.
Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
- Check if you can reproduce the problem in the latest version of FormSchema.
- Determine which repository the problem should be reported in.
- Perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one.
Bugs are tracked as GitLab issues. After you've determined which repository your bug is related to, create an issue on that repository and provide the following information by filling in the template.
Explain the problem and include additional details to help maintainers reproduce the problem:
- Use a clear and descriptive title for the issue to identify the problem.
- Give a code sample that reproduce the problem. You can use CodeSandbox for example or include links to files or GitLab projects, or copy/pasteable snippets, which you use. If you're providing snippets in the issue, use Markdown code blocks.
- Explain which behavior you expected to see instead and why.
Provide more context by answering these questions:
- Can you reproduce the problem in the last version?
- Did the problem start happening recently (e.g. after updating to a new version of FormSchema) or was this always a problem?
- If the problem started happening recently, can you reproduce the problem in an older version of FormSchema? What's the most recent version in which the problem doesn't happen?
Include details about your configuration and environment:
- Which version of FormSchema are you using?
This section guides you through submitting an enhancement suggestion for FormSchema, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible.
- Check if you're using the latest version of FormSchema and if you can get the desired behavior.
- Determine which repository the enhancement should be suggested in.
- Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
Enhancement suggestions are tracked as GitLab issues. After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
- Describe the current behavior and explain which behavior you expected to see instead and why.
- Explain why this enhancement would be useful to most FormSchema users and isn't something that can or should be implemented as a community package.
Unsure where to begin contributing to FormSchema? You can start by looking through these beginner
and help-wanted
issues:
- Beginner issues - issues which should only require a few lines of code, and a test or two.
- Help wanted issues - issues which should be a bit more involved than
beginner
issues.
Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.
FormSchema can be developed locally. For that, just fork the project and add your contributions. The .gitlab-ci.yml
file describe the build steps.
- Fill in the required template
- Do not include issue numbers in the PR title
- Follow the JavaScript styleguide.
- Include thoughtfully-worded, well-structured Jasmine specs in the
./test/specs
folder. Run them usingnpm test
. See the Specs Styleguide below. - Document new code based on the Documentation Styleguide
- End all files with a newline
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- When only changing documentation, include
[ci skip]
in the commit title
All JavaScript must adhere to JavaScript Standard Style.
- Prefer the object spread operator (
{ ...anotherObj }
) toObject.assign()
- Inline
export
s with expressions whenever possible
// Use this:
export default class ClassName {
}
// Instead of:
class ClassName {
}
export default ClassName
- Include thoughtfully-worded, well-structured Jasmine specs in the
./test/specs
folder. - Treat
describe
as a noun or situation. - Treat
it
as a statement about state or how an operation changes state.
describe('a dog', () => {
it('barks', () => {
// spec here
})
describe('when the dog is happy', () => {
it('wags its tail', () => {
// spec here
})
})
})
This section lists the labels we use to help us track and manage issues and pull requests. Most labels are used across all FormSchema repositories.
GitLab search makes it easy to use labels for finding groups of issues or pull requests you're interested in.
The labels are loosely grouped by their purpose, but it's not required that every issue have a label from every group or that an issue can't have more than one label from the same group.
Please open an issue on formschema/native
if you have suggestions for new labels, and if you notice some labels are missing on some repositories, then please open an issue on that repository.