Skip to content

Latest commit

 

History

History
213 lines (138 loc) · 11.8 KB

CONTRIBUTING.md

File metadata and controls

213 lines (138 loc) · 11.8 KB

Contributing to FormSchema

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.

Table Of Contents

I don't want to read this whole thing, I just have a question!!!

What should I know before I get started?

How Can I Contribute?

Styleguides

Additional Notes

I don't want to read this whole thing I just have a question!!!

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

What should I know before I get started?

FormSchema

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:

There are other UI wrappers that aren't being actively maintained:

How Can I Contribute?

Reporting Bugs

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.

Before Submitting A Bug Report

How Do I Submit A (Good) Bug Report?

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?

Suggesting Enhancements

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.

Before Submitting An Enhancement Suggestion

How Do I Submit A (Good) Enhancement Suggestion?

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.

Your First Code Contribution

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.

Local development

FormSchema can be developed locally. For that, just fork the project and add your contributions. The .gitlab-ci.yml file describe the build steps.

Pull Requests

Styleguides

Git Commit Messages

  • 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

JavaScript Styleguide

All JavaScript must adhere to JavaScript Standard Style.

  • Prefer the object spread operator ({ ...anotherObj }) to Object.assign()
  • Inline exports with expressions whenever possible
// Use this:
export default class ClassName {

}

// Instead of:
class ClassName {

}
export default ClassName

Specs Styleguide

  • 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.

Example

describe('a dog', () => {
  it('barks', () => {
    // spec here
  })
  
  describe('when the dog is happy', () => {
    it('wags its tail', () => {
      // spec here
    })
  })
})

Documentation Styleguide

Additional Notes

Issue and Pull Request Labels

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.