CONTRIBUTING.md 13.7 KB

NOTA : this document is still in work in progress

Contributing to Maarch

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

The following is a set of guidelines for contributing to Maarch and its packages, which are hosted in the Maarch Organization on Maarch GitLab. Use your best judgment, and feel free to propose changes to this document in a merge request.

Table Of Contents

What should I know before I get started?

How Can I Contribute?

Styleguides

What should I know before I get started?

Contributor Agreement

Anyone wishing to contribute to Maarch Courrier must read & sign our Contributor License Agreement. The Maarch team is legally prevented from accepting any merge requests from users who have not signed the CLA first.

About Maarch Courrier

Maarch Courrier is a professional DMS that natively answers a vast majority of the needs for operational document management. It is released under the terms of the free and open source license GNU/GPLv3. One of the consequence is that Maarch software is affordable for any kind of organisation.

How Can I Contribute?

Reporting Bugs

This section guides you through submitting a bug report for Maarch. 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.

Before Submitting A Bug Report

  • Check the FAQs on the wiki. You might be able to find the cause of the problem and fix things yourself. Most importantly, check if you can reproduce the problem in the latest version of Maarch.
  • 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, add a comment to the existing issue instead of opening a new one.

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.
  • Describe the exact steps which reproduce the problem in as many details as possible. For example, start by explaining how you started Maarch, e.g. which command method you used in the browser. When listing steps, don't just say what you did, but explain how you did it. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut, and if so which one?
  • Provide specific examples to demonstrate the steps. Include links to files or GitLab projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
  • Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
  • Explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem. If you use the keyboard while following the steps. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • If you're reporting that Maarch crashed, include a crash report with a stack trace from the operating system. Include the crash report in the issue in a code block, a file attachment, or put it in a gist and provide link to that gist.
  • If the problem is related to performance, include a CPU profile capture and a screenshot with your report.
  • If the Firefox or Chrome's developer tools pane is shown without you triggering it, that normally means that an exception was thrown. The Console tab will include an entry for the exception. Expand the exception so that the stack trace is visible, and provide the full exception and stack trace in a code blocks and as a screenshot.
  • If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.

Provide more context by answering these questions:

  • Did the problem start happening recently (e.g. after updating to a new version of Maarch) or was this always a problem?
  • If the problem started happening recently, can you reproduce the problem in an older version of Maarch? What's the most recent version in which the problem doesn't happen?.
  • Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.

Include details about your configuration and environment:

  • Which version of Maarch are you using?.
  • What's the name and version of the OS and Maarch prerequisites you're using?
  • Are you running Maarch in a virtual machine? If so, which VM software are you using and which operating systems and versions are used for the host and the guest?

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Maarch, 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. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.

Before Submitting An Enhancement Suggestion

  • Check the Maarch wiki for tips — you might discover that the enhancement is already available. Most importantly, check if you're using the latest version of Maarch.
  • 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.

How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as GitLab issues. 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.
  • Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of Maarch which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
  • Explain why this enhancement would be useful to most Maarch users and isn't something that can or should be implemented as a community package.
  • List some other text editors or applications where this enhancement exists.
  • Specify which version of Maarch you're using.
  • Specify the name and version of the OS you're using.

Your First Code Contribution

Unsure where to begin contributing to Maarch? You can start by looking through these beginner and help-wanted issues:

  • [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two.
  • [Help wanted issues][help-wanted] - 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.

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
  • When only changing documentation, include [ci skip] in the commit description
  • Consider starting the commit message with an applicable emoji:
    • 🎨 :art: when improving the format/structure of the code
    • 🐎 :racehorse: when improving performance
    • 🚱 :non-potable_water: when plugging memory leaks
    • 📝 :memo: when writing docs
    • 🐧 :penguin: when fixing something on Linux
    • 🍎 :apple: when fixing something on macOS
    • 🏁 :checkered_flag: when fixing something on Windows
    • 🐛 :bug: when fixing a bug
    • 🔥 :fire: when removing code or files
    • 💚 :green_heart: when fixing the CI build
    • :white_check_mark: when adding tests
    • 🔒 :lock: when dealing with security
    • :arrow_up: when upgrading dependencies
    • :arrow_down: when downgrading dependencies
    • 👕 :shirt: when removing linter warnings

php Styleguide

We are following stadards defined by Framework Interoperability Group - PHP-FIG. The group was bootstrapped by a number of framework developers at php|tek in 2009. Each voting member of the group represents a popular PHP framework (or similar) project. They are working together to create easily reusable code that can be used across other projects.

  • PSR standards

There are five PSR standards described by PHP-FIG.

  • PSR-0 / Autoloading standard

The following describes the mandatory requirements that must be adhered to for autoloader interoperability. More information can be found here.

  • PSR-1 / Basic Coding Standard

This standard describes what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code. It describes Class Names, Namespaces, Methods, Constants, Properties naming conventions. More information can be found here.

  • PSR-2 / Coding Style Guide

This guide extends and expands on PSR-1, the basic coding standard. Provides a Coding Style Guide for projects looking to standardize their code. It additionaly includes definitions for Control Structures, Closures and other structures. More information can be found here.

  • PSR-3 / Logger Interface

Describes a common interface for logging libraries. More information can be found here.

  • PSR-4 / Improved Autoloading

This PSR describes a specification for autoloading classes from file paths. It is fully interoperable, and can be used in addition to any other autoloading specification, including PSR-0. More information can be found here.

  • Additional notes

For objects properties and variables we are using camelCase convention.

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 js // Use this: export default class ClassName {

}

// Instead of: class ClassName {

} export default ClassName

Documentation Styleguide

TODO